A simple explanation of Bayes' theorem. Total Probability Formula and Bayes Formulas

Bayes formula:

The probabilities P(H i) of the hypotheses H i are called a priori probabilities - probabilities before conducting experiments.
Probabilities P(A/H i) are called posterior probabilities - the probabilities of hypotheses H i, refined as a result of experience.

Example No. 1. The device can be assembled from high-quality parts and from parts of ordinary quality. About 40% of devices are assembled from high-quality parts. If the device is assembled from high-quality parts, its reliability (probability trouble-free operation) for time t is 0.95; if it is made from parts of ordinary quality, its reliability is 0.7. The device was tested for time t and worked flawlessly. Find the probability that it is made from high quality parts.
Solution. Two hypotheses are possible: H 1 - the device is assembled from high-quality parts; H 2 - the device is assembled from parts of ordinary quality. The probabilities of these hypotheses before the experiment: P(H 1) = 0.4, P(H 2) = 0.6. As a result of the experiment, event A was observed - the device worked flawlessly for time t. The conditional probabilities of this event under hypotheses H 1 and H 2 are equal: P(A|H 1) = 0.95; P(A|H 2) = 0.7. Using formula (12), we find the probability of hypothesis H 1 after the experiment:

Example No. 2. Two shooters shoot at the same 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 it is 0.4. After shooting, one hole was found in the target. Assuming that two shooters cannot hit the same point, find the probability that the first shooter hits the target.
Solution. Let event A - after shooting, one hole is detected in the target. Before the shooting begins, hypotheses are possible:
H 1 - neither the first nor the second shooter will hit, the probability of this hypothesis: P(H 1) = 0.2 · 0.6 = 0.12.
H 2 - both shooters will hit, P(H 2) = 0.8 · 0.4 = 0.32.
H 3 - the first shooter will hit, but the second will not hit, P(H 3) = 0.8 · 0.6 = 0.48.
H 4 - the first shooter will not hit, but the second will hit, P (H 4) = 0.2 · 0.4 = 0.08.
The conditional probabilities of event A under these hypotheses are equal:

After the experiment, hypotheses H 1 and H 2 become impossible, and the probabilities of hypotheses H 3 and H 4
will be equal:


So, it is most likely that the target was hit by the first shooter.

Example No. 3. In the installation shop, an electric motor is connected to the device. Electric motors are supplied by three manufacturers. The warehouse contains electric motors from the named factories, respectively, in quantities of 19.6 and 11 pcs., which can operate reliably until the end warranty period respectively, with probabilities of 0.85, 0.76 and 0.71. A worker picks up one motor at random and mounts it to the device. Find the probability that an electric motor installed and operating without failure until the end of the warranty period was supplied by the first, second or third manufacturer, respectively.
Solution. The first test is the choice of electric motor, the second is the operation of the electric motor during the warranty period. Consider the following events:
A - the electric motor operates without failure until the end of the warranty period;
H 1 - the installer will take the engine from the production of the first plant;
H 2 - the installer will take the engine from the production of the second plant;
H 3 - the installer will take the engine from the production of the third plant.
The probability of event A is calculated using the formula full probability:

Conditional probabilities are specified in the problem statement:

Let's find the probabilities


Using Bayes formulas (12), we calculate the conditional probabilities of hypotheses H i:

Example No. 4. The probabilities that during operation of a system that consists of three elements, elements numbered 1, 2 and 3 will fail are in the ratio 3: 2: 5. The probabilities of detecting failures of these elements are equal to 0.95, respectively; 0.9 and 0.6.

b) Under the conditions of this task, a failure was detected during system operation. Which element most likely failed?

Solution.
Let A be a failure event. Let us introduce a system of hypotheses H1 - failure of the first element, H2 - failure of the second element, H3 - failure of the third element.
We find the probabilities of the hypotheses:
P(H1) = 3/(3+2+5) = 0.3
P(H2) = 2/(3+2+5) = 0.2
P(H3) = 5/(3+2+5) = 0.5

According to the conditions of the problem, the conditional probabilities of event A are equal to:
P(A|H1) = 0.95, P(A|H2) = 0.9, P(A|H3) = 0.6

a) Find the probability of detecting a failure in the system.
P(A) = P(H1)*P(A|H1) + P(H2)*P(A|H2) + P(H3)*P(A|H3) = 0.3*0.95 + 0.2*0.9 + 0.5 *0.6 = 0.765

b) Under the conditions of this task, a failure was detected during system operation. Which element most likely failed?
P1 = P(H1)*P(A|H1)/ P(A) = 0.3*0.95 / 0.765 = 0.373
P2 = P(H2)*P(A|H2)/ P(A) = 0.2*0.9 / 0.765 = 0.235
P3 = P(H3)*P(A|H3)/ P(A) = 0.5*0.6 / 0.765 = 0.392

The third element has the maximum probability.

Let's start with an example. In the urn in front of you, with equal probability there may be (1) two white balls, (2) one white and one black, (3) two black. You drag the ball and it turns out to be white. How would you rate it now? probability these three options (hypotheses)? Obviously, the probability of hypothesis (3) with two black balls = 0. But how to calculate the probabilities of the two remaining hypotheses!? This can be done by the Bayes formula, which in our case has the form (the number of the formula corresponds to the number of the hypothesis being tested):

Download the note in or

X– a random variable (hypothesis) taking the following values: x 1- two white ones, x 2– one white, one black; x 3– two black; at– random variable (event) taking values: at 1– a white ball is pulled out and at 2– a black ball is pulled out; P(x 1)– probability of the first hypothesis before drawing the ball ( a priori likelihood or probability to experience) = 1/3; P(x 2)– probability of the second hypothesis before drawing the ball = 1/3; P(x 3)– probability of the third hypothesis before drawing the ball = 1/3; P(y 1|x 1)– conditional probability of drawing a white ball, if the first hypothesis is true (the balls are white) = 1; P(y 1|x 2) probability of drawing a white ball if the second hypothesis is true (one ball is white, the second is black) = ½; P(y 1|x 3) probability of drawing a white ball if the third hypothesis is true (both black) = 0; P(y 1)– probability of drawing a white ball = ½; R(y ​​2)– probability of drawing a black ball = ½; and finally, what we are looking for - P(x 1|y 1) the probability that the first hypothesis is true (both balls are white), given that we drew a white ball ( a posteriori likelihood or probability after experience); P(x 2|y 1) the probability that the second hypothesis is true (one ball is white, the second is black), provided that we drew a white ball.

The probability that the first hypothesis (two white ones) is true, given that we drew a white ball:

The probability that the second hypothesis is true (one is white, the other is black), provided that we drew a white ball:

The probability that the third hypothesis is true (two black ones), given that we drew a white ball:

What does Bayes' formula do? It makes it possible, based on a priori probabilities of hypotheses - P(x 1), P(x 2), P(x 3)– and the probabilities of events occurring – P(y 1), R(y ​​2)– calculate the posterior probabilities of the hypotheses, for example, the probability of the first hypothesis, provided that a white ball is drawn – P(x 1|y 1).

Let's return once again to formula (1). The initial probability of the first hypothesis was P(x 1) = 1/3. With probability P(y 1) = 1/2 we could draw a white ball, and with probability P(y 2) = 1/2- black. We pulled out the white one. Probability of drawing white, provided that the first hypothesis is true P(y 1|x 1) = 1. Bayes' formula says that since white was drawn, the probability of the first hypothesis has increased to 2/3, the probability of the second hypothesis is still 1/3, and the probability of the third hypothesis has become zero.

It’s easy to check that if we pulled out a black ball, the posterior probabilities would change symmetrically: P(x 1|y 2) = 0, P(x 2|y 2) = 1/3, P(x 3|y 2) = 2/3.

Here's what Pierre Simon Laplace wrote about Bayes' formula in a work published in 1814:

This is the basic principle of that branch of contingency analysis that deals with transitions from events to causes.

Why is Bayes' formula so difficult to understand!? In my opinion, because our usual approach is reasoning from causes to effects. For example, if there are 36 balls in an urn, 6 of which are black and the rest are white. What is the probability of drawing a white ball? Bayes' formula allows you to go from events to reasons (hypotheses). If we had three hypotheses, and an event occurred, how exactly did that event (and not the alternative) affect the initial probabilities of the hypotheses? How have these probabilities changed?

I believe that Bayes' formula is not just about probabilities. It changes the paradigm of perception. What is the thought process when using the deterministic paradigm? If an event occurred, what was its cause? If there was an accident, emergency, military conflict. Who or what was their fault? What does a Bayesian observer think? What is the structure of reality that led to given case to such and such a manifestation... The Bayesian understands that in otherwise In this case the result could have been different...

Let's place the symbols in formulas (1) and (2) a little differently:

Let's talk again about what we see. With equal initial (a priori) probability, one of the three hypotheses could be true. With equal probability we could draw a white or black ball. We pulled out the white one. In light of this new additional information, our evaluation of the hypotheses should be reconsidered. Bayes' formula allows us to do this numerically. The prior probability of the first hypothesis (formula 7) was P(x 1), a white ball was drawn, the posterior probability of the first hypothesis became P(x 1|at 1). These probabilities differ by a factor.

Event at 1 called evidence that more or less confirms or refutes a hypothesis x 1. This coefficient is sometimes called the power of evidence. The more powerful the evidence (the more the coefficient differs from unity), the greater the fact of observation at 1 changes the prior probability, the more the posterior probability differs from the prior. If the evidence is weak (coefficient ~1), the posterior probability is almost equal to the prior.

Certificate at 1 V = 2 times changed the prior probability of the hypothesis x 1(formula 4). At the same time, evidence at 1 did not change the probability of the hypothesis x 2, since its power = 1 (formula 5).

In general, the Bayes formula has the following form:

X– a random variable (a set of mutually exclusive hypotheses) taking the following values: x 1, x 2, … , Xn. at– a random variable (a set of mutually exclusive events) taking the following values: at 1, at 2, … , atn. Bayes' formula allows you to find the posterior probability of a hypothesis Xi upon the occurrence of an event y j. The numerator is the product of the prior probability of the hypothesis XiP(xi) on the probability of an event occurring y j, if the hypothesis is true XiP(y j|xi). The denominator is the sum of the products of the same as in the numerator, but for all hypotheses. If we calculate the denominator, we get the total probability of the event occurring atj(if any of the hypotheses is true) – P(y j) (as in formulas 1–3).

Once again about the testimony. Event y j gives additional information, which allows us to revise the prior probability of the hypothesis Xi. Power of evidence – – contains in the numerator the probability of the event occurring y j, if the hypothesis is true Xi. The denominator is the total probability of the event occurring. atj(or the probability of an event occurring atj averaged over all hypotheses). atj above for hypothesis xi, than the average for all hypotheses, then the evidence plays into the hands of the hypothesis xi, increasing its posterior probability P(y j|xi). If the probability of an event occurring atj below for hypothesis xi than the average for all hypotheses, then the evidence lowers the posterior probability P(y j|xi) For hypotheses xi. If the probability of an event occurring atj for a hypothesis xi is the same as the average for all hypotheses, then the evidence does not change the posterior probability P(y j|xi) For hypotheses xi.

Here are a few examples that I hope will reinforce your understanding of Bayes' formula.

Task 2. Two shooters independently shoot at the same target, 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 found in the target. Find the probability that this hole belongs to the first shooter. .

Task 3. The object being monitored can be in one of two states: H 1 = (functioning) and H 2 = (not functioning). The prior probabilities of these states are P(H 1) = 0.7, P(H 2) = 0.3. There are two sources of information that provide conflicting information about the state of the object; the first source reports that the object is not functioning, the second - that it is functioning. It is known that the first source provides correct information with a probability of 0.9, and with a probability of 0.1 - incorrect information. The second source is less reliable: it provides correct information with a probability of 0.7, and incorrect information with a probability of 0.3. Find the posterior probabilities of the hypotheses. .

Problems 1–3 are taken from the textbook by E.S. Ventzel, L.A. Ovcharov. Probability theory and its engineering applications, section 2.6 Hypothesis theorem (Bayes formula).

Problem 4 taken from the book, section 4.3 Bayes' Theorem.

Brief theory

If an event occurs only subject to the occurrence of one of the events forming full group incompatible events, then it is equal to the sum of the products of the probabilities of each event and the corresponding conditional probability wallet.

In this case, events are called hypotheses, and probabilities are called a priori. This formula is called the total probability formula.

Bayes' formula is used to solve practical problems when an event appearing together with any of the events forming a complete group of events has occurred and it is necessary to carry out a quantitative re-evaluation of the probabilities of the hypotheses. A priori (before experiment) probabilities are known. It is required to calculate the posterior (after experiment) probabilities, i.e. essentially you need to find conditional probabilities. Bayes' formula looks like this:

Example of problem solution

Condition of task 1

In a factory, machines 1, 2 and 3 produce 20%, 35% and 45% of all parts, respectively. In their products, defects are 6%, 4%, 2%, respectively. What is the probability that a randomly selected product is defective? What is the probability that it was produced: a) by machine 1; b) machine 2; c) machine 3?

Solution to problem 1

Let us denote by the event that a standard product turns out to be defective.

An event can only occur if one of three events occurs:

The product was produced on machine 1;

The product is produced on machine 2;

The product is produced on machine 3;

Let's write down the conditional probabilities:

Total Probability Formula

If an event can occur only if one of the events that form a complete group of incompatible events occurs, then the probability of the event is calculated by the formula

Using the total probability formula, we find the probability of an event:

Bayes formula

Bayes' formula allows you to “rearrange cause and effect”: according to known fact events, calculate the probability that it was caused by a given cause.

The probability that a defective product is made on machine 1:

Probability that a defective product was made on machine 2:

Probability that a defective product was made on machine 3:

Problem condition 2

The group consists of 1 excellent student, 5 well-performing students and 14 mediocre performing students. An excellent student answers 5 and 4 with equal probability, an excellent student answers 5, 4, and 3 with equal probability, and a mediocre student answers 4,3 and 2 with equal probability. A randomly selected student answered 4. What is the probability that a mediocre performing student was called?

Solution to problem 2

Hypotheses and conditional probabilities

The following hypotheses are possible:

The excellent student answered;

The good guy answered;

- answered the mediocre student;

Let the event -student get 4.

Conditional probabilities:

Answer:


The definition of geometric probability is given and the well-known meeting problem is considered in detail.

If the event A can only happen when one of the events that form a complete group of incompatible events , then the probability of the event A calculated by the formula

This formula is called total probability formula .

Let us again consider the complete group of incompatible events, the probabilities of which . Event A can only happen together with any of the events that we will call hypotheses . Then, according to the total probability formula

If the event A happened, this may change the probabilities of the hypotheses .

By the probability multiplication theorem

.

Similarly, for the remaining hypotheses

The resulting formula is called Bayes formula (Bayes formula ). The probabilities of the hypotheses are called posterior probabilities , whereas - prior probabilities .

Example. The store received new products from three factories. The percentage composition of these products is as follows: 20% - products of the first enterprise, 30% - products of the second enterprise, 50% - products of the third enterprise; further, 10% of the production of the first enterprise premium, at the second enterprise - 5% and at the third - 20% of premium products. Find the probability that a randomly purchased new product will be of the highest quality.

Solution. Let us denote by IN the event that the highest grade products will be purchased, we denote by the events that consist in the purchase of products belonging to the first, second and third enterprises, respectively.

You can apply the total probability formula, and in our notation:

Substituting these values ​​into the total probability formula, we obtain the desired probability:

Example. One of the three shooters is called to the firing line and fires two shots. The probability of hitting the target with one shot for the first shooter is 0.3, for the second - 0.5; for the third - 0.8. The target was not hit. Find the probability that the shots were fired by the first shooter.

Solution. Three hypotheses are possible:

The first shooter is called to the line of fire,

The second shooter is called to the line of fire,

A third shooter is called to the firing line.

Since calling any shooter into the line of fire is equally possible, then

As a result of the experiment, event B was observed - after the shots were fired, the target was not hit. The conditional probabilities of this event under the hypotheses made are equal to:

Using the Bayes formula, we find the probability of the hypothesis after the experiment:

Example. Three automatic machines process parts of the same type, which after processing are transferred to a common conveyor. The first machine produces 2% of defects, the second - 7%, the third - 10%. The productivity of the first machine is 3 times greater than the productivity of the second, and the third is 2 times less than the second.

a) What is the defect rate on the assembly line?

b) What is the proportion of parts from each machine among the defective parts on the conveyor?

Solution. Let's take one part at random from the assembly line and consider event A - the part is defective. It is associated with hypotheses regarding where this part was processed: - a part taken at random was processed on the th machine.

Conditional probabilities (in the problem statement they are given in the form of percentages):

The dependencies between machine productivity mean the following:

And since the hypotheses form a complete group, then .

Having solved the resulting system of equations, we find: .

a) The total probability that a part taken at random from the assembly line is defective:

In other words, among the mass of parts coming off the assembly line, defects amount to 4%.

b) Let it be known that the part taken at random is defective. Using Bayes' formula, we find the conditional probabilities of the hypotheses:

Thus, in the total mass of defective parts on the conveyor, the share of the first machine is 33%, the second – 39%, the third – 28%.

Practical tasks

Task 1

Solving problems in the main branches of probability theory

The goal is to gain practical skills in solving problems in

branches of probability theory

Preparation for practical assignment

Familiarize yourself with theoretical material on this topic, study the content of the theoretical material, as well as the relevant sections in literary sources

Procedure for completing the task

Solve 5 problems according to the number of the task option given in Table 1.

Source data options

Table 1

task number

Composition of the report on task 1

5 solved problems according to option number.

Problems to solve independently

1.. Are the following groups of events cases: a) experience - tossing a coin; events: A1- appearance of the coat of arms; A2- appearance of a number; b) experiment - tossing two coins; events: B1- the appearance of two coats of arms; B2 - the appearance of two numbers; B3- the appearance of one coat of arms and one number; c) experience - throwing a dice; events: C1 - the appearance of no more than two points; C2 - the appearance of three or four points; C3 - appearance of at least five points; d) experience - shooting at a target; events: D1- hit; D2- miss; e) experience - two shots at a target; events: E0- not a single hit; E1- one hit; E2- two hits; f) experience - removing two cards from the deck; events: F1 - the appearance of two red cards; F2- the appearance of two black cards?

2. In the urn A are white and B black balls. One ball is drawn at random from the urn. Find the probability that this ball is white.

3. In urn A white and B black balls. One ball is taken from the urn and set aside. This ball turned out to be white. After this, another ball is taken from the urn. Find the probability that this ball will also be white.

4. In urn A white and B black balls. One ball was taken out of the urn and, without looking, it was put aside. After that, another ball was taken from the urn. He turned out to be white. Find the probability that the first ball put aside is also white.

5. From an urn containing A white and B black balls, take out one by one all the balls except one. Find the probability that the last ball remaining in the urn will be white.

6. From the urn in which A white balls and B black, take out all the balls in it in a row. Find the probability that the white ball will be drawn second in order.

7. There are A white and B black balls in an urn (A > 2). Two balls are taken from the urn at once. Find the probability that both balls are white.

8. In the urn A are white and B black balls (A > 2, B > 3). Five balls are taken from the urn at once. Find probability r that two of them will be white and three black.

9. In a game consisting of X products available I defective. Selected from the batch for control I products. Find probability r which of them is exactly J products will be defective.

10. The die is rolled once. Find the probability of the following events: A - the appearance of an even number of points; IN- appearance of at least 5 points; WITH- appearance no more than 5 points.

11. The dice are rolled twice. Find probability r that the same number of points will appear both times.

12. Two dice are thrown at the same time. Find the probabilities of the following events: A- the sum of the points drawn is 8; IN- the product of the rolled points is 8; WITH- the sum of the rolled points is greater than their product.

13. Two coins are tossed. Which of the following events is more likely: A - the coins will lie on the same sides; IN - will the coins end up on different sides?

14. In urn A white and B black balls (A > 2; B > 2). Two balls are drawn from the urn at the same time. Which event is more likely: A- balls of the same color; IN - balls of different colors?

15. Three players are playing cards. Each of them was dealt 10 cards and two cards were left in the draw. One of the players sees that he has 6 cards of diamonds and 4 non-diamonds in his hands. He discards two of these four cards and takes a draw for himself. Find the probability that he will buy two diamonds.

16. From an urn containing n numbered balls, all the balls in it are taken out at random, one after another. Find the probability that the numbers of the drawn balls will be in order: 1, 2,..., p.

17. The same urn as in the previous problem, but after each ball is taken out, it is put back in and mixed with others, and its number is written down. Find the probability that a natural sequence of numbers will be written: 1, 2,..., n.

18. A full deck of cards (52 sheets) is divided at random into two equal packs of 26 sheets each. Find the probabilities of the following events: A - each pack will contain two aces; IN- one of the packs will not contain a single ace, and the other will not have all four; S-v one of the packs will have one ace, and the other will have three.

19. 18 teams participate in the basketball championship, from which two groups of 9 teams each are randomly formed. There are 5 teams among the competition participants

extra-class. Find the probabilities of the following events: A - all top-class teams will be in the same group; IN- two top-class teams will fall into one of the groups, and three - into the other.

20. Numbers are written on nine cards: 0, 1, 2, 3, 4, 5, 6, 7, 8. Two of them are taken out at random and placed on the table in the order of appearance, then the resulting number is read, for example 07 (seven), 14 ( fourteen), etc. Find the probability that the number will be even.

21. The numbers are written on five cards: 1, 2, 3, 4, 5. Two of them, one after the other, are taken out. Find the probability that the number on the second card will be greater than the number on the first.

22. The same question as in problem 21, but after the first card is taken out, it is put back and mixed with the rest, and the number on it is written down.

23. In urn A white, B black and C red balls. All the balls in it are taken out of the urn one by one and their colors are recorded. Find the probability that white appears in this list before black.

24. There are two urns: in the first A white and B black balls; in the second C white and D black. A ball is drawn from each urn. Find the probability that both balls are white.

25. In the conditions of problem 24, find the probability that the drawn balls will be of different colors.

26. There are seven slots in the revolver drum, five of them contain cartridges, and two are left empty. The drum is driven into rotation, as a result of which one of the nests randomly appears against the trunk. After this, the trigger is pressed; if the cell was empty, the shot does not occur. Find probability r the fact that, having repeated this experiment two times in a row, we will not shoot both times.

27. Under the same conditions (see problem 26), find the probability that the shot will occur both times.

28. The urn contains A; balls marked with numbers 1, 2, ..., To From the urn I one ball at a time is taken out (I<к), The ball number is recorded and the ball is placed back in the urn. Find probability r that all recorded numbers will be different.

29. The word “book” is made from five letters of the split alphabet. A child who cannot read scattered these letters and then collected them in random order. Find probability r that he came up with the word “book” again.

30. The word “pineapple” is made from the letters of the split alphabet. A child who cannot read scattered these letters and then collected them in random order. Find probability r that he has the word “pineapple” again

31. Several cards are drawn from a full deck of cards (52 sheets, 4 suits). How many cards must be taken out in order to say with a probability greater than 0.50 that among them there will be cards of the same suit?

32. N people are randomly seated at a round table (N> 2). Find probability r that two fixed persons A And IN will be nearby.

33. The same problem (see 32), but the table is rectangular, and N people are seated randomly along one of its sides.

34. Lotto barrels have numbers from 1 to N. Of these N Two barrels are randomly selected. Find the probability that both barrels contain numbers less than k (2

35. Lotto barrels have numbers from 1 to N. Of these N Two barrels are randomly selected. Find the probability that one of the barrels contains a number greater than k , and on the other - less than k . (2

36. Battery from M guns fires at a group consisting of N goals (M< N). The guns choose their targets sequentially, randomly, provided that no two guns can fire at the same target. Find probability r that targets numbered 1, 2,... will be fired upon M.

37.. Battery consisting of To guns, fires at a group consisting of I aircraft (To< 2). Each weapon chooses its target randomly and independently of the others. Find the probability that everything To guns will fire at the same target.

38. In the conditions of the previous problem, find the probability that all guns will fire at different targets.

39. Four balls are scattered randomly across four holes; each ball falls into one or another hole with the same probability and independently of the others (there are no obstacles to several balls falling into the same hole). Find the probability that there will be three balls in one of the holes, one in the other, and no balls in the other two holes.

40. Masha quarreled with Petya and does not want to ride on the same bus with him. There are 5 buses from the hostel to the institute from 7 to 8. Anyone who does not catch these buses is late for the lecture. In how many ways can Masha and Petya get to the institute on different buses and not be late for the lecture?

41. The information technology department of the bank employs 3 analysts, 10 programmers and 20 engineers. For overtime on a holiday, the head of the department must allocate one employee. In how many ways can this be done?

42. The head of the bank's security service must place 10 guards at 10 posts every day. In how many ways can this be done?

43. The new president of the bank must appoint 2 new vice presidents from among 10 directors. In how many ways can this be done?

44. One of the warring parties captured 12 and the other 15 prisoners. In how many ways can 7 prisoners of war be exchanged?

45. Petya and Masha collect video discs. Petya has 30 comedies, 80 action films and 7 melodramas, Masha has 20 comedies, 5 action films and 90 melodramas. In how many ways can Petya and Masha exchange 3 comedies, 2 action films and 1 melodrama?

46. ​​Under the conditions of problem 45, in how many ways can Petya and Masha exchange 3 melodramas and 5 comedies?

47. Under the conditions of problem 45, in how many ways can Petya and Masha exchange 2 action films and 7 comedies?

48. One of the warring parties captured 15 and the other 16 prisoners. In how many ways can 5 prisoners of war be exchanged?

49. How many cars can be registered in 1 city if the number has 3 numbers and 3 letters (only those whose spelling matches the Latin ones - A, B, E, K, M, N, O, R, S, T, U, X )?

50. One of the warring parties captured 14 and the other 17 prisoners. In how many ways can 6 prisoners of war be exchanged?

51. How many different words can you form by rearranging the letters in the word “mother”?

52. There are 3 red and 7 green apples in a basket. One apple is taken out of it. Find the probability that it will be red.

53. There are 3 red and 7 green apples in a basket. One green apple was taken out and put aside. Then 1 more apple is taken out of the basket. What is the probability that this apple will be green?

54. In a batch of 1000 products, 4 are defective. For control, a batch of 100 products is selected. What is the probability of LLP that the control lot will not contain any defective ones?

56. In the 80s, the game “Sports Loto 5 out of 36” was popular in the USSR. The player marked 5 numbers on a card from 1 to 36 and received prizes of various denominations if he guessed a different number of numbers announced by the drawing commission. Find the probability that the player did not guess a single number.

57. In the 80s, the game “Sports Loto 5 out of 36” was popular in the USSR. The player marked 5 numbers on a card from 1 to 36 and received prizes of various denominations if he guessed a different number of numbers announced by the drawing commission. Find the probability that the player guessed one number.

58. In the 80s, the game “Sports Loto 5 out of 36” was popular in the USSR. The player marked 5 numbers on a card from 1 to 36 and received prizes of various denominations if he guessed a different number of numbers announced by the drawing commission. Find the probability that the player guessed 3 numbers.

59. In the 80s, the game “Sports Loto 5 out of 36” was popular in the USSR. The player marked 5 numbers on a card from 1 to 36 and received prizes of various denominations if he guessed a different number of numbers announced by the drawing commission. Find the probability that the player did not correctly match all 5 numbers.

60. In the 80s, the game “Sports Loto 6 out of 49” was popular in the USSR. The player marked 6 numbers on a card from 1 to 49 and received prizes of various denominations if he guessed a different number of numbers announced by the drawing commission. Find the probability that the player guessed 2 numbers.

61. In the 80s, the game “Sports Loto 6 out of 49” was popular in the USSR. The player marked 6 numbers on a card from 1 to 49 and received prizes of various denominations if he guessed a different number of numbers announced by the drawing commission. Find the probability that the player did not guess a single number.

62. In the 80s, the game “Sports Loto 6 out of 49” was popular in the USSR. The player marked 6 numbers on a card from 1 to 49 and received prizes of various denominations if he guessed a different number of numbers announced by the drawing commission. Find the probability that the player guessed all 6 numbers.

63. In a batch of 1000 products, 4 are defective. For control, a batch of 100 products is selected. What is the probability of LLP that the control lot will contain only 1 defective one?

64. How many different words can you form by rearranging the letters in the word “book”?

65. How many different words can you form by rearranging the letters in the word “pineapple”?

66. 6 people entered the elevator, and the hostel has 7 floors. What is the probability that all 6 people will exit on the same floor?

67. 6 people entered the elevator; the building has 7 floors. What is the probability that all 6 people will exit on different floors?

68. During a thunderstorm, a wire broke in the section between 40 and 79 km of the power line. Assuming that a cliff is equally possible at any point, find the probability that the cliff occurred between the 40th and 45th kilometers.

69. On a 200-kilometer section of the gas pipeline, a gas leak occurs between compressor stations A and B, which is equally possible at any point in the pipeline. what is the probability that the leak occurs no further than 20 km from A

70. On a 200-kilometer section of the gas pipeline, a gas leak occurs between compressor stations A and B, which is equally possible at any point in the pipeline. What is the probability that the leak occurs closer to A than to B?

71. The traffic police inspector’s radar has an accuracy of 10 km/hour and rounds to the nearest direction. What happens more often - rounding in favor of the driver or the inspector?

72. Masha spends 40 to 50 minutes on the way to the institute, and any time in this interval is equally probable. What is the probability that she will spend 45 to 50 minutes on the road?

73. Petya and Masha agreed to meet at the Pushkin monument from 12 to 13 o’clock, but no one could indicate the exact time of arrival. They agreed to wait for each other for 15 minutes. What is the probability of their meeting?

74. Fishermen caught 120 fish in the pond, 10 of them were ringed. What is the probability of catching a ringed fish?

75. From a basket containing 3 red and 7 green apples, all the apples are taken out one by one. What is the probability that the 2nd apple will be red?

76. From a basket containing 3 red and 7 green apples, all the apples are taken out one by one. What is the probability that the last apple will be green?

77. Students believe that out of 50 tickets, 10 are “good”. Petya and Masha take turns drawing one ticket each. What is the probability that Masha got a “good” ticket?

78. Students believe that out of 50 tickets, 10 are “good”. Petya and Masha take turns drawing one ticket each. What is the probability that they both got a “good” ticket?

79. Masha came to the exam knowing the answers to 20 questions out of 25 in the program. The professor asks 3 questions. What is the probability that Masha will answer 3 questions?

80. Masha came to the exam knowing the answers to 20 questions out of 25 in the program. The professor asks 3 questions. What is the probability that Masha will not answer any questions?

81. Masha came to the exam knowing the answers to 20 questions out of 25 in the program. The professor asks 3 questions. What is the probability that Masha will answer 1 question?

82. The statistics of loan requests from the bank are as follows: 10% - state. authorities, 20% - other banks, the rest - individuals. The probability of non-repayment of loans is 0.01, 0.05 and 0.2, respectively. What percentage of loans are not repaid?

83. the probability that the weekly turnover of an ice cream merchant will exceed 2000 rubles. is 80% in clear weather, 50% in partly cloudy weather and 10% in rainy weather. What is the probability that the turnover will exceed 2000 rubles. if the probability of clear weather is 20%, and partly cloudy and rainy - 40% each.

84. In urn A there are white (b) and B black (h) balls. Two balls are drawn (simultaneously or sequentially) from the urn. Find the probability that both balls are white.

85. In urn A white and B

86. In ballot box A white and B

87. In ballot box A white and B black balls. One ball is taken from the urn, its color is noted and the ball is returned to the urn. After this, another ball is taken from the urn. Find the probability that these balls will be different colors.

88. There is a box of nine new tennis balls. To play, take three balls; After the game they are put back. When choosing balls, played balls are not distinguished from unplayed balls. What is the probability that after three games there will be no unplayed balls left in the box?

89. Leaving the apartment, N each guest will wear his own galoshes;

90. Leaving the apartment, N guests who have the same shoe sizes wear galoshes in the dark. Each of them can distinguish the right galosh from the left, but cannot distinguish his own from someone else's. Find the probability that Each guest will wear galoshes belonging to the same pair (maybe not their own).

91. In the conditions of problem 90, find the probability that everyone will leave in their galoshes if the guests cannot distinguish the right galoshes from the left and simply take the first two galoshes they come across.

92. Shooting is being conducted at an aircraft, the vulnerable parts of which are two engines and the cockpit. In order to hit (disable) an aircraft, it is enough to hit both engines together or the cockpit. Under these firing conditions, the probability of hitting the first engine is equal to p1 second engine p2, cockpit p3. Aircraft parts are affected independently of each other. Find the probability that the plane will be hit.

93. Two shooters, independently of one another, fire two shots (each at its own target). Probability of hitting the target with one shot for the first shooter p1 for the second p2. The winner of the competition is the shooter whose target has the most holes. Find probability Rx that the first shooter wins.

94. behind a space object, the object is detected with probability r. Object detection in each cycle occurs independently of the others. Find the probability that when n cycles the object will be detected.

95. 32 letters of the Russian alphabet are written on cut-out alphabet cards. Five cards are drawn at random one after another and placed on the table in order of appearance. Find the probability that the word "end" will appear.

96. Two balls are scattered randomly and independently of each other into four cells located one after the other in a straight line. Each ball has an equal probability of 1/4 landing in each cell. Find the probability that the balls will fall into neighboring cells.

97. Fire is fired at the aircraft with incendiary shells. The aircraft's fuel is concentrated in four tanks located in the fuselage, one after the other. The areas of the tanks are the same. In order to set the plane on fire, it is enough to hit two shells either in the same tank or in adjacent tanks. It is known that two shells hit the tank area. Find the probability that the plane will catch fire.

98. From a full deck of cards (52 sheets), four cards are taken out at once. Find the probability that all four of these cards will be of different suits.

99. From a full deck of cards (52 sheets), four cards are taken out at once, but each card is returned to the deck after removal. Find the probability that all four of these cards will be of different suits.

100. When the ignition is turned on, the engine starts to run with probability r.

101. The device can operate in two modes: 1) normal and 2) abnormal. Normal mode is observed in 80% of all cases of device operation; abnormal - in 20%. Probability of device failure over time t in normal mode it is 0.1; in abnormal - 0.7. Find the total probability r failure of the device.

102. A store receives goods from 3 suppliers: 55% from the 1st, 20 from the 2nd and 25% from the 3rd. The percentage of defects is 5, 6 and 8 percent, respectively. What is the probability that the purchased defective product came from a second supplier.

103.The flow of cars past gas stations consists of 60% trucks and 40% cars. What is the probability of a truck being at a gas station if the probability of refueling it is 0.1, and the probability of a passenger car is 0.3

104. The flow of cars past gas stations consists of 60% trucks and 40% cars. What is the probability of a truck being at a gas station if the probability of refueling it is 0.1, and the probability of a passenger car is 0.3

105. A store receives goods from 3 suppliers: 55% from the 1st, 20 from the 2nd and 25% from the 3rd. The percentage of defects is 5, 6 and 8 percent, respectively. What is the probability that the purchased defective product came from the 1st supplier.

106. 32 letters of the Russian alphabet are written on cut-out alphabet cards. Five cards are drawn at random one after another and placed on the table in order of appearance. Find the probability that the word “book” will appear.

107. A store receives goods from 3 suppliers: 55% from the 1st, 20 from the 2nd and 25% from the 3rd. The percentage of defects is 5, 6 and 8 percent, respectively. What is the probability that the purchased defective product came from the 1st supplier.

108. Two balls are scattered randomly and independently of each other into four cells located one after the other in a straight line. Each ball has an equal probability of 1/4 landing in each cell. Find the probability that 2 balls will fall into one cell

109. When the ignition is turned on, the engine starts to run with probability r. Find the probability that the engine will start running the second time the ignition is turned on;

110. Fire is fired at the aircraft with incendiary shells. The aircraft's fuel is concentrated in four tanks located in the fuselage, one after the other. The areas of the tanks are the same. In order to set the plane on fire, it is enough to hit two shells in the same tank. It is known that two shells hit the tank area. Find the probability that the plane will catch fire

111. Fire is fired at the aircraft with incendiary shells. The aircraft's fuel is concentrated in four tanks located in the fuselage, one after the other. The areas of the tanks are the same. In order to set the plane on fire, it is enough to hit the adjacent tanks with two shells. It is known that two shells hit the tank area. Find the probability that the plane will catch fire

112.In urn A white and B black balls. One ball is taken from the urn, its color is noted and the ball is returned to the urn. After this, another ball is taken from the urn. Find the probability that both drawn balls will be white.

113. In ballot box A white and B black balls. Two balls are drawn from the urn at once. Find the probability that these balls will be different colors.

114. Two balls are scattered randomly and independently of each other into four cells located one after the other in a straight line. Each ball has an equal probability of 1/4 landing in each cell. Find the probability that the balls will fall into neighboring cells.

115. Masha came to the exam knowing the answers to 20 questions out of 25 in the program. The professor asks 3 questions. What is the probability that Masha will answer 2 questions?

116. Students believe that out of 50 tickets, 10 are “good”. Petya and Masha take turns drawing one ticket each. What is the probability that they both got a “good” ticket?

117. The statistics of loan requests from the bank are as follows: 10% - state. authorities, 20% - other banks, the rest - individuals. The probability of non-repayment of loans is 0.01, 0.05 and 0.2, respectively. What percentage of loans are not repaid?

118. 32 letters of the Russian alphabet are written on cut-out alphabet cards. Five cards are drawn at random one after another and placed on the table in order of appearance. Find the probability that the word "end" will appear.

119 Statistics on loan requests from the bank are as follows: 10% - state. authorities, 20% - other banks, the rest - individuals. The probability of non-repayment of loans is 0.01, 0.05 and 0.2, respectively. What percentage of loans are not repaid?

120. the probability that the weekly turnover of an ice cream merchant will exceed 2000 rubles. is 80% in clear weather, 50% in partly cloudy weather and 10% in rainy weather. What is the probability that the turnover will exceed 2000 rubles. if the probability of clear weather is 20%, and partly cloudy and rainy - 40% each.

Siberian State University of Telecommunications and Informatics

Department of Higher Mathematics

in the discipline: “Probability Theory and Mathematical Statistics”

“The formula of total probability and the formula of Bayes (Bayes) and their application”

Completed:

Head: Professor B.P. Zelentsov

Novosibirsk, 2010


Introduction 3

1. Total probability formula 4-5

2. Bayes formula (Bayes) 5-6

3. Problems with solutions 7-11

4. The main areas of application of the Bayes formula (Bayes) 11

Conclusion 12

Literature 13


Introduction

Probability theory is one of the classical branches of mathematics. It has a long history. The foundations of this branch of science were laid by great mathematicians. I will name, for example, Fermat, Bernoulli, Pascal.
Later, the development of probability theory was determined in the works of many scientists.
Scientists from our country made a great contribution to the theory of probability:
P.L.Chebyshev, A.M.Lyapunov, A.A.Markov, A.N.Kolmogorov. Probabilistic and statistical methods have now penetrated deeply into applications. They are used in physics, technology, economics, biology and medicine. Their role has especially increased in connection with the development of computer technology.

For example, to study physical phenomena, observations or experiments are made. Their results are usually recorded in the form of values ​​of some observable quantities. When repeating experiments, we discover a scattering of their results. For example, by repeating measurements of the same quantity with the same device while maintaining certain conditions (temperature, humidity, etc.), we obtain results that are at least slightly different from each other. Even repeated measurements do not make it possible to accurately predict the result of the next measurement. In this sense, they say that the result of a measurement is a random variable. An even more obvious example of a random variable is the number of a winning ticket in a lottery. Many other examples of random variables can be given. Nevertheless, in the world of chance, certain patterns are revealed. The mathematical apparatus for studying such patterns is provided by probability theory.
Thus, probability theory deals with the mathematical analysis of random events and associated random variables.

1. Total probability formula.

Let there be a group of events H 1 ,H 2 ,..., Hn, having the following properties:

1) all events are pairwise incompatible: H i

Hj =Æ; i , j =1,2,...,n ; i ¹ j ;

2) their union forms the space of elementary outcomes W:

.
Fig.8

In this case we will say that H 1 , H 2 ,...,Hn form full group of events. Such events are sometimes called hypotheses .

Let A- some event: AÌW (Venn diagram is shown in Figure 8). Then it holds total probability formula:

P (A) = P (A /H 1)P (H 1) + P (A /H 2)P (H 2) + ...+P (A /Hn)P (Hn) =

Proof. Obviously: A=

, and all events ( i = 1,2,...,n) are pairwise inconsistent. From here, using the addition theorem of probabilities, we obtain

P (A) = P (

) + P () +...+ P (

If we take into account that by the multiplication theorem P (

) = P (A/H i) P (H i) ( i = 1,2,...,n), then from the last formula it is easy to obtain the above total probability formula.

Example. The store sells electric lamps produced by three factories, with the share of the first factory being 30%, the second being 50%, and the third being 20%. Defects in their products are 5%, 3% and 2%, respectively. What is the probability that a lamp randomly selected in a store turns out to be defective?

Let the event H 1 is that the selected lamp is produced in the first factory, H 2 on the second, H 3 - at the third plant. Obviously:

P (H 1) = 3/10, P (H 2) = 5/10, P (H 3) = 2/10.

Let the event A is that the selected lamp turned out to be defective; A/H i means the event that a defective lamp is selected from lamps produced in i-th plant. From the problem statement it follows:

P (A / H 1) = 5/10; P (A / H 2) = 3/10; P (A / H 3) = 2/10

Using the total probability formula we get

2. Bayes formula (Bayes)

Let H 1 ,H 2 ,...,Hn- a complete group of events and AМ W – some event. Then, according to the formula for conditional probability

(1)

Here P (Hk /A) – conditional probability of an event (hypothesis) Hk or the likelihood that Hk is implemented provided that the event A happened.

According to the probability multiplication theorem, the numerator of formula (1) can be represented as

P = P = P (A /Hk)P (Hk)

To represent the denominator of formula (1), you can use the total probability formula

P (A)

Now from (1) we can obtain a formula called Bayes formula :

Bayes' formula calculates the probability of the hypothesis being realized Hk provided that the event A happened. Bayes' formula is also called formula for the probability of hypotheses. Probability P (Hk) is called the prior probability of the hypothesis Hk, and the probability P (Hk /A) – posterior probability.

Theorem. The probability of a hypothesis after the test is equal to the product of the probability of the hypothesis before the test and the corresponding conditional probability of the event that occurred during the test, divided by the total probability of this event.

Example. Let's consider the above problem about electric lamps, just change the question of the problem. Suppose a customer bought an electric lamp in this store, and it turned out to be defective. Find the probability that this lamp was manufactured at the second plant. Magnitude P (H 2) = 0.5 V in this case this is the prior probability of the event that the lamp purchased was manufactured at the second plant. Having received information that the purchased lamp is defective, we can correct our estimate of the possibility of manufacturing this lamp at the second plant by calculating the posterior probability of this event.