Total probability formula. Total probability formula: theory and examples of problem solving

Example No. 1. A computer manufacturing company receives identical components from three suppliers. The first one supplies 50% of all components, the second one - 20%, the third one - 30% of parts.
It is known that the quality of supplied parts varies, and in the products of the first supplier the percentage of defects is 4%, the second - 5%, and the third - 2%. Determine the probability that a part selected at random from all those received will be defective.

Solution. Let us denote the events: A - “the selected part is defective”, H i - “the selected part is received from the i-th supplier”, i = 1, 2, 3 Hypotheses H 1, H 2, H 3 form full group Not joint events. By condition
P(H 1) = 0.5; P(H2) = 0.2; P(H 3) = 0.3
P(A|H 1) = 0.04; P(A|H 2) = 0.05; P(A|H 3) = 0.02

According to the formula full probability(1.11) the probability of event A is equal to
P(A) = P(H 1) P(A|H 1) + P(H 2) P(A|H 2) + P(H 3) P(A|H 3) = 0.5 0.04 + 0.2 · 0.05 + 0.3 · 0.02=0.036
The probability that a part selected at random will be defective is 0.036.

Suppose that under the conditions of the previous example, event A has already occurred: the selected part turned out to be defective. What is the probability that it came from the first supplier? The answer to this question is given by Bayes' formula.
We began the analysis of probabilities with only preliminary, a priori values ​​of the probabilities of events. Then an experiment was carried out (a part was selected), and we received additional information about the event that interests us. With this new information, we can refine our prior probabilities. New values ​​of the probabilities of the same events will already be a posteriori (post-experimental) probabilities of the hypotheses (Fig. 1.5).

Hypothesis re-evaluation scheme
Let event A be realized only together with one of the hypotheses H 1 , H 2 , …, H n (a complete group of incompatible events). We denoted the prior probabilities of hypotheses as P(H i) and the conditional probabilities of event A - P(A|H i), i = 1, 2,…, n. If the experiment has already been carried out and as a result of it event A has occurred, then the posterior probabilities of the hypotheses will be the conditional probabilities P(H i |A), i = 1, 2,…, n. In the notation of the previous example, P(H 1 |A) is the probability that the selected part that turned out to be defective was received from the first supplier.
We are interested in the probability of the event H k |A Let's consider the joint occurrence of events H k and A, that is, the event AH k. Its probability can be found in two ways, using multiplication formulas (1.5) and (1.6):
P(AH k) = P(H k)P(A|H k);
P(AH k) = P(A)P(H k |A).

Let us equate the right sides of these formulas
P(H k) P(A|H k) = P(A) P(H k |A),

hence the posterior probability of the hypothesis H k is equal to

The denominator contains the total probability of event A. Substituting its value instead of P(A) according to the total probability formula (1.11), we obtain:
(1.12)
Formula (1.12) is called Bayes formula and is used to re-estimate the probabilities of hypotheses.
In the conditions of the previous example, we will find the probability that the defective part was received from the first supplier. Let's put the conditions known to us into one table prior probabilities hypotheses P(H i) conditional probabilities P(A|H i) calculated during the solution process joint probabilities P(AH i) = P(H i) P(A|H i) and posterior probabilities P(H k |A) calculated using formula (1.12), i,k = 1, 2,…, n (Table 1.3).

Table 1.3 - Re-evaluation of hypotheses

Hypotheses H iProbabilities
A priori P(H i)Conditional P(A|H i)Joint P(AH i)A posteriori P(H i |A)
1 2 3 4 5

H 1 - part received from first supplier

0.5 0.04 0.02

H 2 - part received from a second supplier

0.2 0.05 0.01

H 3 - part received from a third supplier

0.3 0.02 0.006
Sum1.0 - 0.036 1
Let's look at the last row of this table. The second column contains the sum of the probabilities of incompatible events H1, H2, H3, forming a complete group:
P(Ω) = P(H 1 + H 2 + H 3) = P(H 1) + P(H 2) + P(H 3) = 0.5 + 0.2 + 0.3 = 1
In the fourth column, the value in each row (joint probabilities) is obtained using the rule for multiplying probabilities by multiplying the corresponding values ​​in the second and third columns, and in last line 0.036 - is the total probability of event A (according to the total probability formula).
Column 5 calculates the posterior probabilities of the hypotheses using the Bayes formula (1.12):

The posterior probabilities P(H 2 |A) and P(H 3 |A) are calculated similarly, with the numerator of the fraction being the joint probabilities written in the corresponding lines of column 4, and the denominator being the total probability of event A written in the last line of column 4.
The sum of the probabilities of the hypotheses after the experiment is equal to 1 and is written in the last line of the fifth column.
So, the probability that the defective part was received from the first supplier is 0.555. The post-experimental probability is greater than the a priori one (due to the large volume of supply). The post-experiment probability that the defective part was received from the second supplier is 0.278 and is also greater than the pre-experiment probability (due to the large number of defects). The post-test probability that the defective part was received from a third supplier is 0.167.

Example No. 3. There are three identical urns; the first urn contains two white and one black balls; in the second - three white and one black; in the third there are two white and two black balls. For the experiment, one urn is chosen at random and a ball is drawn from it. Find the probability that this ball is white.
Solution. Consider three hypotheses: H 1 - the first urn is selected, H 2 - the second urn is selected, H 3 - the third urn is selected and event A - taken out white ball.
Since the hypotheses according to the conditions of the problem are equally possible, then

The conditional probabilities of event A under these hypotheses are respectively equal:
According to the total probability formula

Example No. 4. There are 19 rifles in the pyramid, 3 of them with optical sights. A shooter, shooting from a rifle with an optical sight, can hit the target with a probability of 0.81, and shooting from a rifle without an optical sight, with a probability of 0.46. Find the probability that a shooter will hit a target using a random rifle.
Solution. Here the first test is a random selection of a rifle, the second is shooting at a target. Consider the following events: A - the shooter hits the target; H 1 - the shooter will take a rifle with an optical sight; H 2 - the shooter will take a rifle without an optical sight. We use the total probability formula. We have


Considering that rifles are selected one at a time and using the formula classical probability, we get: P(H 1) = 3/19, P(H 2) = 16/19.
Conditional probabilities are specified in the problem statement: P(A|H 1) = 0.81 and P(A|H 2) = 0.46. Hence,

Example No. 5. From an urn containing 2 white and 3 black balls, two balls are drawn at random and 1 white ball is added to the urn. Find the probability that a ball chosen at random will be white.
Solution. We denote the event “a white ball is drawn” by A. Event H 1 - two white balls are drawn at random; H 2 - two black balls were drawn at random; H 3 - one white ball and one black ball were drawn. Then the probabilities of the hypotheses put forward


The conditional probabilities under these hypotheses are respectively equal: P(A|H 1) = 1/4 - the probability of drawing a white ball if the urn contains at the moment one white and three black balls, P(A|H 2) = 3/4 - the probability of drawing a white ball if there are currently three white and one black balls in the urn, P(A|H 3) = 2/4 = 1/2 - probability of drawing a white ball if there are currently two white and two black balls in the urn. According to the total probability formula

Example No. 6. Two shots are fired at the target. The probability of a hit on the first shot is 0.2, on the second - 0.6. The probability of target destruction with one hit is 0.3, with two - 0.9. Find the probability that the target will be destroyed.
Solution. Let event A - the target is destroyed. To do this, it is enough to hit with one shot out of two or hit the target with two shots in a row without missing. Let's put forward hypotheses: H 1 - both shots hit the target. Then P(H 1) = 0.2 · 0.6 = 0;12. H 2 - either the first time or the second time a miss was made. Then P(H 2) = 0.2 · 0.4 + 0.8 · 0.6 = 0.56. Hypothesis H 3 - both shots were misses - is not taken into account, since the probability of target destruction is zero. Then the conditional probabilities are respectively equal: the probability of target destruction, provided both successful shots are made, is P(A|H 1) = 0.9, and the probability of target destruction, provided only one successful shot is P(A|H 2) = 0.3. Then the probability of destruction of the target according to the total probability formula is equal.

In practice, it is often necessary to determine the probability of an event of interest occurring with one of the events forming a complete group. The following theorem, which is a consequence of the addition and multiplication theorems of probability, leads to the conclusion important formula to calculate the probability of such events. This formula is called the total probability formula.

Let H 1 , H 2 , … , H n is npairwise incompatible events forming a complete group:

1) all events are pairwise incompatible: H iHj= ; i, j= 1,2, … , n; ij;

2) their combination forms space elementary outcomes W:

Such events are sometimes called hypotheses. Let the event happen A, which can only occur if one of the events occurs H i ( i = 1, 2, … , n). Then the theorem is true.

Proof. Indeed, by condition the event A may occur if one of the incompatible events occurs H 1 , H 2 … H n, i.e. occurrence of an event A means the occurrence of one of the events H 1 ∙ A, H 2 ∙ A, … , H n∙ A. Latest events are also incompatible, because from H i∙ H j = ( i j) it follows that ( AH i) ∙ ( AH j) = ( i j). Now we note that

This equality is well illustrated in Fig. 1.19. From the addition theorem it follows . But according to the multiplication theorem, equality is true for any i, 1in. Therefore, the total probability formula (1.14) is valid. The theorem has been proven.

Comment. Probabilities of events (hypotheses) H 1 , H 2 , … , H n , which are included in formula (1.14) when solving specific tasks either given or they must be calculated during the solution process. IN the latter case correctness of calculation r(H i) ( i = 1, 2, … , n) is checked by the relation = 1 and the calculation r(H i) is performed at the first stage of solving the problem. At the second stage it is calculated r(A).

When solving problems using the total probability formula, it is convenient to adhere to the following technique.

Methodology for applying the total probability formula

A). Introduce an event into consideration (we denote it A), the probability of which must be determined by the conditions of the problem.

b). Introduce events (hypotheses) into consideration H 1 , H 2 , … , H n , which form a complete group.

V). Write down or calculate the probabilities of hypotheses r(H 1), r(H 2), … , r(H n). Checking the correctness of the calculation r(H i) checked by condition IN more probability problems r(H i) are specified directly in the problem statement. Sometimes these probabilities, as well as probabilities p(A/H 1), p(A/H 2), …, p(A/H n) multiplied by 100 (the numbers are given as percentages). In this case given numbers must be divided by 100.

G). Calculate the required probability r(A) according to formula (1.14).

Example. The economist calculated that the probability of an increase in the price of his company's shares in next year will be 0.75 if the country's economy is on the rise, and 0.30 if there is a financial crisis. According to experts, the probability of economic recovery is 0.6. Estimate the likelihood that the company's shares will rise in price in the next year.

Solution. At the beginning, the problem condition is formalized in terms of probability. Let A– event “shares will rise in price” (relative to the problem). According to the conditions of the problem, hypotheses are distinguished: H 1 – “the economy will be on the rise”, H 2 – “the economy will enter a period of crisis.” H 1 , H 2 – form a complete group, i.e. H 1 ∙ H 2 = , H 1 + H 2 = . Probability p(H 1) = 0.6, therefore, p(H 2) = 1 – 0.6 = 0.4. Conditional probabilities p(A/H 1) = 0,75, p(A/H 2) = 0.3. Using formula (1.14), we obtain:

p(A) = p(H 1) ∙ p(A/H 1) + p(H 2) ∙ p(A/H 2) = 0,75 ∙ 0,6 + 0,3 ∙ 0,4 = 0,57.

Purpose of the work: develop skills in solving problems in probability theory using the total probability formula and Bayes formula.

Total Probability Formula

Probability of event A, which can occur only if one of the incompatible events occurs B x, B 2,..., B p, forming a complete group is equal to the sum of the products of the probabilities of each of these events by the corresponding conditional probability of event A:

This formula is called the total probability formula.

Probability of hypotheses. Bayes formula

Let the event A may occur subject to the occurrence of one of the incompatible events V b 2 ,..., V n, forming a complete group. Since it is not known in advance which of these events will occur, they are called hypotheses. Probability of event occurrence A determined by the total probability formula:

Let us assume that a test was carried out, as a result of which an event occurred A. It is necessary to determine how the changes (due to the fact that the event A has already arrived) the probability of the hypotheses. Conditional probabilities of hypotheses are found using the formula

In this formula, index / = 1.2

This formula is called Bayes' formula (named after the English mathematician who derived it; published in 1764). Bayes' formula allows us to reestimate the probabilities of hypotheses after it becomes known result test that resulted in an event A.

Task 1. The factory produces a certain type of part, each part has a defect with a probability of 0.05. The part is inspected by one inspector; it detects a defect with a probability of 0.97, and if no defect is detected, it passes the part through finished products. In addition, the inspector may mistakenly reject a part that does not have a defect; the probability of this is 0.01. Find the probabilities of the following events: A - the part will be rejected; B - the part will be rejected, but incorrectly; C - the part will be passed into the finished product with a defect.

Solution

Let us denote the hypotheses:

N= (a standard part will be sent for inspection);

N=(a non-standard part will be sent for inspection).

Event A =(the part will be rejected).

From the problem conditions we find the probabilities

R N (A) = 0,01; Pfi(A) = 0,97.

Using the total probability formula we get

The probability that a part will be rejected incorrectly is

Let's find the probability that a part will be included in the finished product with a defect:

Answer:

Task 2. The product is checked for standardness by one of three commodity experts. The probability that the product will reach the first merchandiser is 0.25, the second - 0.26 and the third - 0.49. The probability that the product will be recognized as standard by the first merchandiser is 0.95, by the second - 0.98, and by the third - 0.97. Find the probability that a standard product is checked by a second inspector.

Solution

Let's denote the events:

L. =(the product will go to the/th merchandiser for inspection); / = 1, 2, 3;

B =(the product will be considered standard).

According to the conditions of the problem, the probabilities are known:

Conditional probabilities are also known

Using the Bayes formula, we find the probability that a standard product is checked by a second inspector:

Answer:“0.263.

Task 3. Two machines produce parts that go onto a common conveyor. The probability of receiving a non-standard part on the first machine is 0.06, and on the second - 0.09. The productivity of the second machine is twice that of the first. A non-standard part was taken from the assembly line. Find the probability that this part was produced by the second machine.

Solution

Let's denote the events:

A. =(a part taken from the conveyor was produced by the /th machine); / = 1.2;

IN= (the part taken will be non-standard).

Conditional probabilities are also known

Using the total probability formula we find

Using the Bayes formula, we find the probability that the selected non-standard part was produced by the second machine:

Answer: 0,75.

Task 4. We are testing a device consisting of two units, the reliability of which is 0.8 and 0.9, respectively. Nodes fail independently of each other. The device failed. Taking this into account, find the probability of the hypotheses:

  • a) only the first node is faulty;
  • b) only the second node is faulty;
  • c) both nodes are faulty.

Solution

Let's denote the events:

D = (7th node will not fail); i = 1,2;

D - corresponding opposite events;

A= (during testing there will be a device failure).

From the conditions of the problem we obtain: P(D) = 0.8; R(L 2) = 0,9.

By the property of the probabilities of opposite events

Event A equal to the sum of the products dependent events

Using the theorem of addition of probabilities of incompatible events and the theorem of multiplication of probabilities independent events, we get

Now we find the probabilities of the hypotheses:

Answer:

Task 5. At the factory, bolts are produced on three machines, which produce 25%, 30% and 45% of the total number of bolts, respectively. In machine tool products, defects are 4%, 3% and 2%, respectively. What is the probability that a bolt randomly taken from an incoming product will be defective?

Solution

Let's denote the events:

4 = (a bolt taken at random was made on the i-th machine); i = 1, 2, 3;

IN= (a bolt taken at random will be defective).

From the conditions of the problem, using the classical probability formula, we find the probabilities of the hypotheses:

Also, using the classical probability formula, we find conditional probabilities:

Using the total probability formula we find

Answer: 0,028.

Task 6. The electronic circuit belongs to one of three parties with probabilities of 0.25; 0.5 and 0.25. The probability that the circuit will operate beyond the warranty service life for each batch is 0.1; 0.2 and 0.4. Find the probability that a randomly chosen circuit will operate beyond its warranty period.

Solution

Let's denote the events:

4 = (randomly taken diagram from th party); i = 1, 2, 3;

IN= (a randomly chosen circuit will work beyond the warranty period).

According to the conditions of the problem, the probabilities of the hypotheses are known:

Conditional probabilities are also known:

Using the total probability formula we find

Answer: 0,225.

Task 7. The device contains two blocks, the serviceability of each of which is necessary for the operation of the device. The probabilities of failure-free operation for these blocks are 0.99 and 0.97, respectively. The device has failed. Determine the probability that both units failed.

Solution

Let's denote the events:

D = ( z-block will fail); i = 1,2;

A= (device will fail).

From the conditions of the problem, according to the property of the probabilities of opposite events, we obtain: DD) = 1-0.99 = 0.01; DD) = 1-0.97 = 0.03.

Event A occurs only when at least one of the events D or A 2. Therefore this event is equal to the sum of the events A= D + A 2 .

By the theorem of addition of probabilities of joint events we obtain

Using the Bayes formula, we find the probability that the device failed due to the failure of both units.

Answer:

Problems to solve independently Task 1. In the warehouse of the television studio there are 70% of picture tubes manufactured by plant No. 1; the remaining picture tubes were manufactured by plant No. 2. The probability that the picture tube will not fail during the warranty service life is 0.8 for picture tubes from factory No. 1 and 0.7 for picture tubes from factory No. 2. The picture tube survived the warranty service life. Find the probability that it was manufactured by plant No. 2.

Task 2. Parts are received for assembly from three machines. It is known that the 1st machine gives 0.3% of defects, the 2nd - 0.2%, the 3rd - 0.4%. Find the probability of receiving a defective part for assembly if 1000 parts were received from the 1st machine, 2000 from the 2nd, and 2500 from the 3rd machine.

Task 3. Two machines produce identical parts. The probability that a part produced on the first machine will be standard is 0.8, and on the second - 0.9. The productivity of the second machine is three times greater than the productivity of the first. Find the probability that a part taken at random from a conveyor that receives parts from both machines will be standard.

Task 4. The head of the company decided to use the services of two of the three transport companies. The probabilities of untimely delivery of cargo for the first, second and third firms are equal to 0.05, respectively; 0.1 and 0.07. Having compared these data with data on the safety of cargo transportation, the manager came to the conclusion that the choice was equivalent and decided to make it by lot. Find the probability that the shipped cargo will be delivered on time.

Task 5. The device contains two blocks, the serviceability of each of which is necessary for the operation of the device. The probabilities of failure-free operation for these blocks are 0.99 and 0.97, respectively. The device has failed. Determine the probability that the second unit failed.

Task 6. The assembly shop receives parts from three machines. The first machine gives 3% of defects, the second - 1% and the third - 2%. Determine the probability of a non-defective part entering the assembly if 500, 200, 300 parts were received from each machine, respectively.

Task 7. The warehouse receives products from three companies. Moreover, the production of the first company is 20%, the second - 46% and the third - 34%. It is also known that the average percentage of non-standard products for the first company is 5%, for the second - 2% and for the third - 1%. Find the probability that a product chosen at random is produced by a second company if it turns out to be standard.

Task 8. Defects in factory products due to a defect A is 5%, and among those rejected based on A products are defective in 10% of cases r. And in products free from defects A, defect r occurs in 1% of cases. Find the probability of encountering a defect R in all products.

Task 9. The company has 10 new cars and 5 old ones that were previously under repair. The probability of proper operation for a new car is 0.94, for an old one - 0.91. Find the probability that a randomly selected car will work properly.

Problem 10. Two sensors send signals into a common communication channel, with the first one sending twice as many signals as the second. The probability of receiving a distorted signal from the first sensor is 0.01, from the second - 0.03. What is the probability of receiving a distorted signal in general channel connections?

Problem 11. There are five batches of products: three batches of 8 pieces, of which 6 are standard and 2 non-standard, and two batches of 10 pieces, of which 7 are standard and 3 are non-standard. One of the batches is selected at random, and a part is taken from this batch. Determine the probability that the part taken will be standard.

Problem 12. The assembler receives on average 50% of the parts from the first plant, 30% from the second plant, and 20% from the third plant. The probability that a part from the first plant is of excellent quality is 0.7; for parts from the second and third factories, 0.8 and 0.9, respectively. The part taken at random turned out to be of excellent quality. Find the probability that the part was manufactured by the first plant.

Problem 13. Customs inspection of vehicles is carried out by two inspectors. On average, out of 100 cars, 45 pass through the first inspector. The probability that during inspection a car corresponding customs regulations, will not be detained, is 0.95 for the first inspector and 0.85 for the second. Find the probability that a car that complies with customs rules will not be detained.

Problem 14. The parts needed to assemble the device come from two machines whose performance is the same. Calculate the probability of receiving a standard part for assembly if one of the machines gives an average of 3% violation of the standard, and the second - 2%.

Problem 15. The weightlifting coach calculated that in order to receive team points in a given weight category, an athlete must push a barbell of 200 kg. Ivanov, Petrov and Sidorov are vying for a place on the team. During training, Ivanov tried to lift such a weight in 7 cases, and lifted it in 3 of them. Petrov lifted in 6 out of 13 cases, and Sidorov has a 35% chance of successfully handling the barbell. The coach randomly selects one athlete for the team.

  • a) Find the probability that the selected athlete will bring scoring points to the team.
  • b) The team did not receive any scoring points. Find the probability that Sidorov performed.

Problem 16. There are 12 red and 6 blue balls in a white box. In black there are 15 red and 10 blue balls. Throwing a dice. If a number of points is a multiple of 3, then a ball is taken at random from the white box. If any other number of points is rolled, a ball is taken at random from the black box. What is the probability of a red ball appearing?

Problem 17. Two boxes contain radio tubes. The first box contains 12 lamps, 1 of which is non-standard; in the second there are 10 lamps, of which 1 is non-standard. A lamp is taken at random from the first box and placed in the second. Find the probability that a lamp randomly removed from the second box will be non-standard.

Problem 18. A white ball is dropped into an urn containing two balls, after which one ball is drawn at random. Find the probability that the extracted ball will be white if all possible assumptions about the initial composition of the balls (based on color) are equally possible.

Problem 19. A standard part is thrown into a box containing 3 identical parts, and then one part is removed at random. Find the probability that a standard part is removed if all possible guesses about the number of standard parts originally in the box are equally probable.

Problem 20. To improve the quality of radio communications, two radio receivers are used. The probability of receiving a signal by each receiver is 0.8, and these events (signal reception by the receiver) are independent. Determine the probability of signal reception if the probability of failure-free operation during a radio communication session for each receiver is 0.9.

Details Views: 2154

Total Probability Formula and Bayes Formulas

On this lesson we will consider important consequence addition and multiplication theorems of probabilities and learn to solve typical tasks on the topic. Readers who have read the article about dependent events, will be simpler, since in it we have already in fact begun to use the total probability formula. If you came from a search engine and/or don’t understand probability theory (link to 1st lesson of the course), then I recommend visiting these pages first.

Actually, let's continue. Let's consider dependent event, which can only occur as a result of the implementation of one of the incompatible hypotheses , which form full group. Let their probabilities and the corresponding conditional probabilities be known. Then the probability of the event occurring is:

This formula is called total probability formulas. In textbooks it is formulated as a theorem, the proof of which is elementary: according to algebra of events, (an event occurred And or an event occurred And after it came an event or an event occurred And after it came an event or …. or an event occurred And after it came an event). Since hypotheses are incompatible, and the event is dependent, then according the theorem of addition of probabilities of incompatible events (first step) And theorem of multiplication of probabilities of dependent events (second step):

Many people probably anticipate the content of the first example =)

Wherever you spit, there is an urn:

Problem 1

There are three identical urns. The first urn contains 4 white and 7 black balls, the second - only white and the third - only black balls. One urn is selected at random and a ball is drawn from it at random. What is the probability that this ball is black?

Solution: consider the event - a black ball will be drawn from a randomly chosen urn. This event may occur as a result of one of the following hypotheses:
- the 1st urn will be selected;
- the 2nd urn will be selected;
- the 3rd urn will be selected.

Since the urn is chosen at random, the choice of any of the three urns equally possible, hence:

Please note that the above hypotheses form full group of events, that is, according to the condition, a black ball can only appear from these urns, and, for example, cannot come from a billiard table. Let's do a simple intermediate check:
, OK, let's move on:

The first urn contains 4 white + 7 black = 11 balls, each classical definition:
- probability of drawing a black ball given that, that the 1st urn will be selected.

The second urn contains only white balls, so if chosen the appearance of the black ball becomes impossible: .

And finally, the third urn contains only black balls, which means the corresponding conditional probability extracting the black ball will be (the event is reliable).



- the probability that a black ball will be drawn from a randomly chosen urn.

Answer:

The analyzed example again suggests how important it is to delve into the CONDITION. Let's take the same problems with urns and balls - despite their external similarity, the methods of solution can be completely different: somewhere you only need to apply classical definition of probability, somewhere events independent, somewhere dependent, and somewhere we are talking about hypotheses. At the same time, there is no clear formal criterion for choosing a solution - you almost always need to think about it. How to improve your skills? We decide, we decide and we decide again!

Problem 2

The shooting range has 5 rifles of varying accuracy. The probabilities of hitting the target for a given shooter are respectively equal and 0.4. What is the probability of hitting the target if the shooter fires one shot from a randomly selected rifle?

A short solution and answer at the end of the lesson.

In the majority thematic tasks hypotheses, of course, are not equally probable:

Problem 3

There are 5 rifles in the pyramid, three of which are equipped with an optical sight. The probability that a shooter will hit the target when firing a rifle with a telescopic sight is 0.95; for a rifle without an optical sight, this probability is 0.7. Find the probability that the target will be hit if the shooter fires one shot from a rifle taken at random.

Solution: in this problem the number of rifles is exactly the same as in the previous one, but there are only two hypotheses:
- the shooter will select a rifle with an optical sight;
- the shooter will select a rifle without an optical sight.
By classical definition of probability: .
Control:

Consider the event: - a shooter hits a target with a rifle taken at random.
According to the condition: .

According to the total probability formula:

Answer: 0,85

In practice, a shortened way of formatting a task, which you are also familiar with, is quite acceptable:

Solution: By classical definition: - the probability of choosing a rifle with an optical sight and without an optical sight, respectively.

According to the condition, - the probability of hitting the target from the corresponding types of rifles.

According to the total probability formula:
- the probability that a shooter will hit a target with a randomly selected rifle.

Answer: 0,85

The following task is for you to solve on your own:

Problem 4

The engine operates in three modes: normal, forced and idling. In idle mode, the probability of its failure is 0.05, in normal operation mode - 0.1, and in forced mode - 0.7. 70% of the time the engine operates in normal mode, and 20% in forced mode. What is the probability of engine failure during operation?

Just in case, let me remind you that to get the probability values, the percentages must be divided by 100. Be very careful! According to my observations, people often try to confuse the conditions of problems involving the total probability formula; and I specifically chose this example. I'll tell you a secret - I almost got confused myself =)

Solution at the end of the lesson (formatted in a short way)

Problems using Bayes' formulas

The material is closely related to the content of the previous paragraph. Let the event occur as a result of the implementation of one of the hypotheses . How to determine the probability that a particular hypothesis occurred?

Given that that event has already happened, hypothesis probabilities overrated according to the formulas that received the name of the English priest Thomas Bayes:


- the probability that the hypothesis took place;
- the probability that the hypothesis took place;

- the probability that the hypothesis took place.

At first glance it seems completely absurd - why recalculate the probabilities of hypotheses if they are already known? But in fact there is a difference:

This a priori(estimated to tests) probability.

This a posteriori(estimated after tests) probabilities of the same hypotheses, recalculated in connection with “newly discovered circumstances” - taking into account the fact that the event definitely happened.

Let's look at this difference with a specific example:

Problem 5

2 batches of products arrived at the warehouse: the first - 4000 pieces, the second - 6000 pieces. The average percentage of non-standard products in the first batch is 20%, and in the second - 10%. The product taken from the warehouse at random turned out to be standard. Find the probability that it is: a) from the first batch, b) from the second batch.

First part solutions consists of using the total probability formula. In other words, calculations are carried out under the assumption that the test not yet produced and event “the product turned out to be standard” not yet.

Let's consider two hypotheses:
- a product taken at random will be from the 1st batch;
- a product taken at random will be from the 2nd batch.

Total: 4000 + 6000 = 10000 items in stock. According to the classical definition:
.

Control:

Let's consider the dependent event: - a product taken at random from the warehouse will be standard.

In the first batch 100% - 20% = 80% standard products, therefore: given that that it belongs to the 1st party.

Similarly, in the second batch 100% - 10% = 90% of standard products and - the probability that a product taken at random from a warehouse will be standard given that that it belongs to the 2nd party.

According to the total probability formula:
- the probability that a product taken at random from a warehouse will be standard.

Part two. Let a product taken at random from a warehouse turn out to be standard. This phrase is directly stated in the condition, and it states the fact that the event happened.

According to Bayes formulas:

a) - the probability that the selected standard product belongs to the 1st batch;

b) - the probability that the selected standard product belongs to the 2nd batch.

After revaluation hypotheses, of course, still form full group:
(examination;-))

Answer:

Ivan Vasilyevich, who again changed his profession and became the director of the plant, will help us understand the meaning of the revaluation of hypotheses. He knows that today the 1st workshop shipped 4,000 products to the warehouse, and the 2nd workshop - 6,000 products, and comes to make sure of this. Let's assume that all products are of the same type and are in the same container. Naturally, Ivan Vasilyevich preliminarily calculated that the product that he would now remove for inspection would most likely be produced by the 1st workshop and most likely by the second. But after the chosen product turns out to be standard, he exclaims: “What a cool bolt! “It was rather released by the 2nd workshop.” Thus, the probability of the second hypothesis is overestimated by better side, and the probability of the first hypothesis is underestimated: . And this revaluation is not unfounded - after all, the 2nd workshop not only produced more products, but also works 2 times better!

Pure subjectivism, you say? In part - yes, moreover, Bayes himself interpreted a posteriori probabilities as level of trust. However, not everything is so simple - there is also an objective grain in the Bayesian approach. After all, the likelihood that the product will be standard (0.8 and 0.9 for the 1st and 2nd workshops, respectively) This preliminary(a priori) and average assessments. But, speaking philosophically, everything flows, everything changes, including probabilities. It is quite possible that at the time of the study the more successful 2nd workshop increased the percentage of production of standard products (and/or the 1st workshop reduced), and if you check more or all 10 thousand products are in stock, then the overestimated values ​​will be much closer to the truth.

By the way, if Ivan Vasilyevich extracts a non-standard part, then on the contrary - he will be more “suspicious” of the 1st workshop and less of the second. I suggest you check this out for yourself:

Problem 6

2 batches of products arrived at the warehouse: the first - 4000 pieces, the second - 6000 pieces. The average percentage of non-standard products in the first batch is 20%, in the second - 10%. The product taken from the warehouse at random turned out to be Not standard. Find the probability that it is: a) from the first batch, b) from the second batch.

The condition is distinguished by two letters, which I have highlighted in bold. The problem can be solved with " clean slate", or use the results of previous calculations. In the sample I carried out complete solution, but so that there is no formal overlap with Task No. 5, the event “a product taken at random from a warehouse will be non-standard” indicated by .

The Bayesian scheme for reestimating probabilities is found everywhere, and it is also actively exploited by various types of scammers. Let’s consider a three-letter joint stock company that has become a household name, which attracts deposits from the public, supposedly invests them somewhere, regularly pays dividends, etc. What's happening? Day after day, month after month passes, and more and more new facts, conveyed through advertising and word of mouth, only increase the level of trust in financial pyramid (posteriori Bayesian reestimation due to past events!). That is, in the eyes of investors there is a constant increase in the likelihood that “this is a serious company”; while the probability of the opposite hypothesis (“these are just more scammers”), of course, decreases and decreases. What follows, I think, is clear. It is noteworthy that the earned reputation gives the organizers time to successfully hide from Ivan Vasilyevich, who was left not only without a batch of bolts, but also without pants.

We will return to equally interesting examples a little later, but for now the next step is perhaps the most common case with three hypotheses:

Problem 7

Electric lamps are manufactured at three factories. 1st plant produces 30% total number lamps, 2nd - 55%, and 3rd - the rest. The products of the 1st plant contain 1% of defective lamps, the 2nd - 1.5%, the 3rd - 2%. The store receives products from all three factories. The purchased lamp turned out to be defective. What is the probability that it was produced by plant 2?

Note that in problems on Bayes formulas in the condition Necessarily there is a certain what happened event, in in this case- buying a lamp.

Events have increased, and solution It’s more convenient to arrange it in a “quick” style.

The algorithm is exactly the same: in the first step we find the probability that the purchased lamp will turn out to be defective.

Using the initial data, we convert percentages into probabilities:
- the probability that the lamp was produced by the 1st, 2nd and 3rd factories, respectively.
Control:

Similarly: - the probability of producing a defective lamp for the corresponding factories.

According to the total probability formula:

- the likelihood that the purchased lamp will be defective.

Step two. Let the purchased lamp turn out to be defective (the event occurred)

According to Bayes' formula:
- the probability that the purchased defective lamp was manufactured by a second plant

Answer:

Why did the initial probability of the 2nd hypothesis increase after revaluation? After all, the second plant produces lamps of average quality (the first is better, the third is worse). So why did it increase a posteriori Is it possible that the defective lamp is from the 2nd plant? This is no longer explained by “reputation”, but by size. Since plant No. 2 produced the most large number lamps (more than half), then the at least subjective nature of the overestimation is logical (“most likely, this defective lamp is from there”).

It is interesting to note that the probabilities of the 1st and 3rd hypotheses were overestimated in the expected directions and became equal:

Control: , which was what needed to be checked.

By the way, about underestimated and overestimated estimates:

Problem 8

IN student group 3 people have high level training, 19 people - average and 3 - low. Probabilities successful completion exam for these students are respectively equal to: 0.95; 0.7 and 0.4. It is known that some student passed the exam. What is the probability that:

a) he was prepared very well;
b) was moderately prepared;
c) was poorly prepared.

Perform calculations and analyze the results of re-evaluating the hypotheses.

The task is close to reality and is especially plausible for a group of part-time students, where the teacher has virtually no knowledge of the abilities of a particular student. In this case, the result can cause quite unexpected consequences. (especially for exams in the 1st semester). If a poorly prepared student is lucky enough to get a ticket, then the teacher is likely to consider him a good student or even strong student, which will bring good dividends in the future (of course, you need to “raise the bar” and maintain your image). If a student studied, crammed, and repeated for 7 days and 7 nights, but was simply unlucky, then further events can develop in the worst possible way - with numerous mulligans and balancing on the brink of elimination.

Needless to say, reputation is the most important capital; it is no coincidence that many corporations bear the names of their founding fathers, who led the business 100-200 years ago and became famous for their impeccable reputation.

Yes, Bayesian approach in to a certain extent subjective, but... this is how life works!

Let’s consolidate the material with a final industrial example, in which I will talk about hitherto unknown technical intricacies of the solution:

Problem 9

Three workshops of the plant produce the same type of parts, which are sent to a common container for assembly. It is known that the first workshop produces 2 times more details than the second workshop, and 4 times more than the third workshop. In the first workshop the defect rate is 12%, in the second - 8%, in the third - 4%. For control, one part is taken from the container. What is the probability that it will be defective? What is the probability that the extracted defective part was produced by the 3rd workshop?

Ivan Vasilyevich is on horseback again =) The film must have a happy ending =)

Solution: unlike Problems No. 5-8, here a question is explicitly asked, which is resolved using the total probability formula. But on the other hand, the condition is a little “encrypted”, and the school skill of composing simple equations will help us solve this puzzle. It is convenient to take the smallest value as “x”:

Let be the share of parts produced by the third workshop.

According to the condition, the first workshop produces 4 times more than the third workshop, so the share of the 1st workshop is .

In addition, the first workshop produces 2 times more products than the second workshop, which means the share of the latter: .

Let's create and solve the equation:

Thus: - the probability that the part removed from the container was produced by the 1st, 2nd and 3rd workshops, respectively.

Control: . In addition, it would not hurt to look at the phrase again “It is known that the first workshop produces products 2 times more than the second workshop and 4 times larger than the third workshop" and make sure that the obtained probability values ​​actually correspond to this condition.

Initially, one could take the share of the 1st or the share of the 2nd workshop as “X” - the probabilities would be the same. But, one way or another, the most difficult part has been passed, and the solution is on track:

From the condition we find:
- the probability of manufacturing a defective part for the relevant workshops.

According to the total probability formula:
- the likelihood that a part randomly removed from a container will turn out to be non-standard.

Question two: what is the probability that the extracted defective part was produced by the 3rd workshop? This question assumes that the part has already been removed and it turned out to be defective. We re-evaluate the hypothesis using Bayes' formula:
- the desired probability. Completely expected - after all, the third workshop not only produces the smallest proportion of parts, but also leads in quality!

Compiled by department teacher higher mathematics Ishchanov T.R. Lesson No. 4. Total probability formula. Probability of hypotheses. Bayes formulas.

Theoretical material
Total Probability Formula
Theorem. The probability of event A, which can occur only if one of the incompatible events that form a complete group occurs, is equal to the sum of the products of the probabilities of each of these events by the corresponding conditional probability of event A:

.
This formula is called the “total probability formula.”

Proof. According to the condition, event A can occur if one of the incompatible events occurs. In other words, the occurrence of event A means the occurrence of one, no matter which, of the incompatible events. Using the addition theorem to calculate the probability of event A, we obtain
. (*)
It remains to calculate each of the terms. By the theorem of multiplication of probabilities of dependent events we have
.
Substituting the right-hand sides of these equalities into relation (*), we obtain the formula for the total probability

Example 1. There are two sets of parts. The probability that the part of the first set is standard is 0.8, and the second is 0.9. Find the probability that a part taken at random (from a set taken at random) is standard.
Solution. Let us denote by A the event “the extracted part is standard.”
The part can be retrieved either from the first set (event) or from the second (event).
The probability that a part is taken from the first set is .
The probability that a part is taken from the second set is .
Conditional probability that a standard part will be extracted from the first set, .
Conditional probability that a standard part will be drawn from the second set .
The desired probability that a part extracted at random is a standard one, according to the total probability formula, is equal to

Example 2. The first box contains 20 radio tubes, of which 18 are standard; in the second box there are 10 lamps, of which 9 are standard. A lamp is taken at random from the second box and placed in the first. Find the probability that a lamp drawn at random from the first box will be standard.
Solution. Let us denote by A the event “a standard lamp is removed from the first box.”
From the second box, either a standard lamp (event) or a non-standard lamp (event) could be removed.
The probability that a standard lamp is removed from the second box is .
The probability that a non-standard lamp was removed from the second box is
The conditional probability that a standard lamp is removed from the first box, provided that a standard lamp was transferred from the second box to the first, is equal to .
The conditional probability that a standard lamp is removed from the first box, provided that a non-standard lamp was transferred from the second box to the first, is equal to .
The required probability that a standard lamp will be removed from the first box, according to the total probability formula, is equal to

Probability of hypotheses. Bayes formulas

Suppose that event A can occur subject to the occurrence of one of the incompatible events that form a complete group. Since it is not known in advance which of these events will occur, they are called hypotheses. The probability of occurrence of event A is determined by the total probability formula:

Let us assume that a test was carried out, as a result of which event A appeared. Let us set our task to determine how the probabilities of the hypotheses have changed (due to the fact that event A has already occurred). In other words, we will look for conditional probabilities

Let's first find the conditional probability. By the multiplication theorem we have

.

Replacing P(A) here using formula (*), we get

Similarly, formulas are derived that determine the conditional probabilities of the remaining hypotheses, i.e. the conditional probability of any hypothesis can be calculated using the formula

The resulting formulas are called Bayes formulas(named after the English mathematician who derived them; published in 1764). Bayes' formulas allow us to reestimate the probabilities of hypotheses after the result of the test that resulted in event A becomes known.

Example. Parts produced by the factory workshop are sent to one of two inspectors to check their standardness. The probability that the part gets to the first inspector is 0.6, and to the second - 0.4. The probability that a suitable part will be recognized as standard by the first inspector is 0.94, and by the second - 0.98. The valid part was found to be standard upon inspection. Find the probability that the first inspector checked this part.
Solution. Let us denote by A the event that a suitable part is recognized as standard. Two assumptions can be made:
1) the part was checked by the first inspector (hypothesis);
2) the part was checked by the second inspector (hypothesis). We find the desired probability that the first inspector checked the part using the Bayes formula:

According to the problem conditions we have:
(probability that the part reaches the first inspector);
(probability that the part will reach the second inspector);
(the probability that a suitable part will be recognized as standard by the first inspector);
(the probability that a suitable part will be recognized as standard by the second inspector).
Required probability

As you can see, before the test the probability of the hypothesis was 0.6; after the test result became known, the probability of this hypothesis (more precisely, the conditional probability) changed and became equal to 0.59. Thus, the use of Bayes' formula made it possible to overestimate the probability of the hypothesis under consideration.

Practical material.
1. (4) The assembler received 3 boxes of parts manufactured by Plant No. 1 and 2 boxes of parts manufactured by Plant No. 2. The probability that a part from Plant No. 1 is standard is 0.8, and that from Plant No. 2 is 0.9, Assembler at random took the part out of a randomly chosen box. Find the probability that a standard part is removed.
Rep. 0.84.
2. (5) The first box contains 20 parts, of which 15 are standard; in the second there are 30 parts, of which 24 are standard; in the third there are 10 parts, of which 6 are standard. Find the probability that a part taken at random from a box taken at random is standard.
Rep. 43/60.
3. (6) There are 4 kinescopes in the television studio. The probabilities that the kinescope will withstand the warranty service life are respectively equal to 0.8; 0.85; 0.9; 0.95. Find the probability that a kinescope taken at random will withstand the warranty period.
Rep. 0.875.
4. (3) The group of athletes consists of 20 skiers, 6 cyclists and 4 runners. The probability of meeting the qualification standard is as follows: for a skier - 0.9, for a cyclist - 0.8. and for the runner - 0.75. Find the probability that an athlete chosen at random will fulfill the norm.
Rep. 0.86.
5. (C) There are 12 red and 6 blue balls in a white box. In black there are 15 red and 10 blue balls. Throwing a dice. If a number of points is a multiple of 3, then a ball is taken at random from the white box. If any other number of points is rolled, a ball is taken at random from the black box. What is the probability of a red ball appearing?
Solution:
Two hypotheses are possible:
– when throwing a dice, the number of points that is a multiple of 3 will appear, i.e. or 3 or 6;
– when throwing the dice, a different number of points will appear, i.e. or 1 or 2 or 4 or 5.
According to the classical definition, the probabilities of hypotheses are equal to:

Since the hypotheses constitute a complete group of events, the equality must be satisfied

Let event A consist of the appearance of a red ball. The conditional probabilities of this event depend on which hypothesis was realized and are accordingly:

Then, according to the total probability formula, the probability of event A will be equal to:

6. (7) Two boxes contain radio tubes. The first box contains 12 lamps, 1 of which is non-standard; in the second there are 10 lamps, of which 1 is non-standard. A lamp is taken at random from the first box and placed in the second. Find the probability that a lamp randomly removed from the second box will be non-standard.
Rep. 13/132.

7. (89 D) A white ball is dropped into an urn containing two balls, after which one ball is drawn at random. Find the probability that the extracted ball will be white if all possible assumptions about the initial composition of the balls (based on color) are equally possible.
Solution. Let us denote by A the event - a white ball is drawn. The following assumptions (hypotheses) about the initial composition of the balls are possible: - no white balls, - one white ball, - two white balls.
Since there are three hypotheses in total, and according to the condition they are equally probable, and the sum of the probabilities of the hypotheses is equal to one (since they form a complete group of events), then the probability of each of the hypotheses is equal to 1/3, i.e. .
The conditional probability that a white ball will be drawn, given that there were no white balls in the urn initially, .
The conditional probability that a white ball will be drawn, given that there was initially one white ball in the urn, .
The conditional probability that a white ball will be drawn given that there were initially two white balls in the urn.
We find the desired probability that a white ball will be drawn using the total probability formula:

8. (10) A standard part is thrown into a box containing 3 identical parts, and then one part is drawn at random. Find the probability that a standard part is removed if all possible guesses about the number of standard parts originally in the box are equally probable.
Rep. 0.625.

9. (6.5.2L) To improve the quality of radio communications, two radio receivers are used. The probability of receiving a signal by each receiver is 0.8, and these events (signal reception by the receiver) are independent. Determine the probability of signal reception if the probability of failure-free operation during a radio communication session for each receiver is 0.9.
Solution.
Let the event A = (the signal will be received). Let's consider four hypotheses:

=(the first receiver is working, the second is not);

=(the second one works, the first one doesn’t);

=(both receivers are working);

=(both receivers do not work).

Event A can only happen under one of these hypotheses. Let us find the probability of these hypotheses by considering the following events:

=(the first receiver is working),

=(the second receiver is working).

Control:

.

The conditional probabilities are respectively equal to:

;

;

Now, using the total probability formula, we find the desired probability

10. (11) If the machine deviates from the normal operating mode, the C-1 alarm is triggered with a probability of 0.8, and the C-11 alarm is triggered with a probability of 1. The probabilities that the machine is equipped with a C-1 or C-11 alarm are respectively equal to 0, 6 and 0.4. A signal has been received to cut the machine gun. What is more likely: the machine is equipped with an S-1 or S-11 signaling device?
Rep. The probability that the machine is equipped with a signaling device S-1 is 6/11, and S-11 is 5/11

11. (12) To participate in student qualifying sports competitions, 4 students were allocated from the first group of the course, 6 from the second, and 5 from the third group. The probabilities that a student of the first, second and third groups gets into the institute’s team are respectively equal to 0.9; 0.7 and 0.8. A randomly selected student ended up in the national team as a result of the competition. Which group did this student most likely belong to?
Rep. The probabilities that a student of the first, second, third groups are selected are respectively: 18/59, 21/59, 20/59.

12. (1.34K)V trading company TVs arrived from three suppliers in a 1:4:5 ratio. Practice has shown that TVs coming from the 1st, 2nd and 3rd suppliers will not require repairs during the warranty period in 98, 88 and 92% of cases, respectively.
1) Find the probability that a TV received by a trading company will not require repairs during the warranty period.
2) The sold TV required repairs during the warranty period. Which supplier did this TV most likely come from?
Solution.
Let's denote the events: - the TV arrived at the trading company from the i-th supplier (i=1,2,3);
A – the TV will not require repairs during the warranty period.
By condition

According to the total probability formula

Event TV will require repairs during the warranty period; .
By condition

According to Bayes' formula

;

Thus, after the occurrence of the event, the probability of the hypothesis increased with to maximum, and the hypothesis decreased from maximum to; if earlier (before the occurrence of event A) the most probable hypothesis was , now, in light of new information(the occurrence of event A), the most likely hypothesis is that this TV will arrive from the 2nd supplier.

13. (1.35K) It is known that on average 95% of manufactured products meet the standard. A simplified control scheme recognizes a product as suitable with a probability of 0.98 if it is standard, and with a probability of 0.06 if it is non-standard. Determine the probability that:
1) a product taken at random will undergo simplified control;
2) a standard product if it: a) has passed simplified control; b) passed simplified control twice.
Solution.
1). Let's denote the events:
- a product taken at random, standard or non-standard, respectively;
- the product has passed simplified control.

By condition

The probability that a product taken at random will pass simplified control, according to the total probability formula:

2, a). The probability that a product that has passed simplified control is standard, according to the Bayes formula:

2, b). Let the event - the product go through simplified control twice. Then, by the probability multiplication theorem:

According to Bayes' formula

is very small, then the hypothesis that a product that has passed simplified control twice is non-standard should be discarded as a practically impossible event.

14. (1.36K) Two shooters shoot at a target independently of each other, each firing one shot. The probability of hitting the target for the first shooter is 0.8; for the second – 0.4. After shooting, one hole was discovered in the target. What is the probability that it belongs to:
a) 1st shooter;
b) 2nd shooter?
Solution.
Let's denote the events:

Both shooters missed the target;

Both shooters hit the target;

The 1st shooter hit the target, the 2nd did not;

The 1st shooter missed the target, the 2nd did;

There is one hole in the target (one hit).



Did you like the article? Share with your friends!