Dependent events and conditional probability. Conditional probability. Independence of Events Calculation of Conditional Probability

Lecture 4

The principle of practical impossibility of unlikely events

If random event has a very low probability, then we can practically assume that this event will not occur in a single test. It all depends on the specific task. If the probability of a parachute not opening is 0.01, then such a parachute cannot be used. If the train is late with a probability of 0.01, then you can be sure that it will arrive on time.

A sufficiently small probability at which an event in a given problem can be considered practically impossible is called level of significance. In practice, significance levels of 0.01 to 0.05 are usually accepted.

If a random event has a probability very close to one, then we can practically assume that this event will occur in a single trial.

Conditional probability

The product of two events A And B call the event AB, consisting in the joint appearance (combination) of these events. For example, if A- the part is suitable, IN- the part is painted, then AB- the part is usable and painted.

The product of several events call an event consisting of the joint occurrence of all these events yy. For example, if A, B, C- the appearance of the “coat of arms” in the first, second and third tosses of the coin, respectively, then ABC- loss of the “coat of arms” in all three tests.

In the introduction, a random event is defined as an event that, when a set of conditions is fulfilled, S may or may not happen.

If, when calculating the probability of an event, no other restrictions are imposed except for the conditions S, then such a probability is calledunconditional; if other additional conditions are imposed, then the probability of the event is called conditional.

For example, the probability of an event is often calculated B with the additional condition that the event occurred A. Unconditional probability, strictly speaking, is conditional, since the fulfillment of conditions S is assumed.

Conditional probability P A (B) or call the probability of event B, calculated under the assumption that event A has already occurred

Conditional probability is calculated according to the formula

This formula can be proven based on the classical definition of probability.

Example 3. There are 3 white and 3 black balls in the urn. One ball at a time is taken out of the urn twice without replacing them. Find the probability of occurrence white ball on the second test (event IN), if on the first trial a black ball was drawn (event A).

Solution. After the first test, there are 5 balls left in the urn, 3 of which are white. The required conditional probability R A ( IN) = 3/5.

The same result can be obtained using the formula

R A ( IN) =P (AB)/P(A) ( P (A) > 0).

Indeed, the probability of a white ball appearing on the first trial


P(A) = 3/6 =1/2.

Let's find the probability P(AB) that in the first test a black ball will appear, and in the second - a white one according to formula (3.1). The total number of outcomes - the joint appearance of two balls, no matter what color, is equal to the number of placements = 6 5 = 30. Of this number of outcomes, the event AB is favored by 3 3 = 9 outcomes. Hence, P (AB) =9/30 = 3/10.

Conditional probability P A ( IN) =P(AB)/R(A) = (3/10)/(1/2) = 3/5. The same result was obtained.

All theorems and formulas of probability theory and mathematical statistics are derived from the axioms of probability theory. This chapter defines conditional probability, the most commonly used theorems and formulas based on conditional probabilities are proven. The concept of independence of events is introduced, which is then used in a scheme of sequential independent tests, and a description of a Markov scheme with dependent tests is given.

CONDITIONAL PROBABILITIES

In § 1.1, the conditional probability formula was derived for the classical scheme. In general, this formula serves as a definition of the conditional probability of an event A provided that the event occurred IN, P(B) > 0.

Definition 2.1. Conditional probability of an event A given that IN

Definition 2.2. Event A does not depend on the event IN, If

The independence of events is mutual, i.e. if event A does not depend on IN, that's the event IN does not depend on A. In fact, using Definitions 2.1 and 2.2, with P(A) > 0 we have:

From Definition 2.1 the following formula for multiplying probabilities follows:

For independent events, the probability of the occurrence of events is equal to the product of their probabilities:

Definition 2.3. Events A, A 2 ,..., A" form a complete group of events if they are pairwise incompatible and together form a reliable event, i.e.

The following total probability theorem holds.

Theorem 2.1. If events A and ..., A„, P(A)> 0 form a complete group of events, then the probability of the event IN can be represented as the sum of the products of the unconditional probabilities of events of the full group by the conditional probabilities of the event IN:

Full Group Events A" ..., A" are pairwise inconsistent, therefore their products (intersections) with the event are also pairwise inconsistent IN, those. events IN P A/, B P L, at i Ф j incompatible. Since the event IN can be represented in the form

then, applying the events to this decomposition IN axiom of addition of probabilities, we have:

Using the probability multiplication formula (2.1.1) for each term, we finally obtain:

The requirement that events A form a complete group of events can be replaced by a weaker one: events in pairs

but don't intersect Bcz^A r In addition, based on the counting axiom

of additivity, the total probability theorem can be extended to a countable set of pairwise disjoint events A,-,

P(A,)> 0, tfcQ/l, :

From the total probability formula (2.1.3) it is easy to obtain the Bayes formula: for the event IN With P(B)> 0 and for the system pairwise incompatible

a flurry of events А„ Р(Л,) > 0,BczJ А,.,


In fact, applying the formulas of conditional probability and multiplication of probabilities, we have:

now, replacing the probability of the event IN Using the total probability formula, we obtain formula (2.1.5).

Probabilities P(A,) events And, are called a priori probabilities, those. probabilities of events before the experiment, and the conditional probabilities of these events P(A,!B) - a posteriori, those. clarified as a result of experience, the outcome of which was the occurrence of the event IN.

Example 2.1.Calculation using formulaAndfull probability and Bayesian

The company produces products of a certain type on three production lines. The first line produces 20% of the total production volume, the second - 30%, and the third - 50%. Each of the lines is characterized by the following percentages of product shelf life: 95, 98 and 97%. It is required to determine the probability that a randomly taken product produced by the enterprise will be defective, as well as the probability that this defective product was made on the first, second and third lines.

Solution. Let us denote by A„ L 2, A) events consisting in the fact that a product taken at random is produced on the first, second and third lines, respectively. According to the conditions of the problem P(A,) = 0,2; P(A 2) = 0,3; P(A)) = 0.5, and these events form a complete group of events, since they are pairwise incompatible, i.e. P(A,) + R(L 2) + R(L 3) = 1.

Let us denote by IN an event in which a product chosen at random turns out to be defective. According to the conditions of the problem P(B/A t) = = 0,05; P(V/A 2) = 0,02; P(V/A 3) = 0,03.

those. the probability that a product taken at random will be defective is 3.1%.

The prior probabilities that a product taken at random is manufactured on the first, second or third line are equal to 0.2, respectively; 0.3 and 0.5.

Let us assume that, as a result of an experiment, a product taken at random turns out to be defective; Let us now determine the posterior probabilities that this product was manufactured on the first, second or third lines. According to Bayes' formula we have:

Thus, the probabilities that a product taken at random and turned out to be defective were manufactured on the first, second or third line are equal to 0.322, respectively; 0.194; 0.484.

The probability multiplication formula (2.1.1) can be extended to the case of an arbitrary finite number of events:

Definition 2.4. Events A b A 2, ..., A" are collectively independent if for any subset of them

If this condition is met only for k = 2, then the events are pairwise independent.

The independence of events in the aggregate implies pairwise independence, but the pairwise independence does not imply independence in the aggregate.

Consider the events A And B associated with the same experience. Let it become known from some sources that the event B has occurred, but it is unknown which of the elementary outcomes that make up the event B, happened. What can be said in this case about the probability of the event? A?

Probability of event A, calculated under the assumption that the event B happened is usually called conditional probability and denoted P(A|B).

Conditional probability P(A|B) events A subject to event B within the framework of the classical probability scheme, it is natural to define it as the ratio N AB outcomes favorable to the joint implementation of events A And B, to the number N B outcomes favorable to the event B, that is

If we divide the numerator and denominator of this expression by the total number N elementary outcomes, we get

Definition. Conditional probability of an event A subject to the occurrence of an event B is called the ratio of the probability of intersection of events A And B to the probability of an event B:

At the same time, it is assumed that P(B) ≠ 0.

Theorem. Conditional probability P(A|B) has all the properties of unconditional probability P(A).

The meaning of this theorem is that a conditional probability is an unconditional probability defined on a new space Ω 1 elementary outcomes coinciding with the event B.

Example. From the urn in which a=7 white and b=3 black balls, two balls are drawn at random without replacement. Let the event A 1 is that the first ball drawn is white, and A 2- the second ball is white. Need to find P(A 2 |A 1).

Method 1.. By definition of conditional probability

Method 2.. Let's move on to a new space of elementary outcomes Ω 1. Since the event A 1 happened, this means that in the new space of elementary outcomes of all equally possible outcomes N Ω 1 =a+b-1=9, and the event A 2 favors this N A 2 =a-1=6 outcomes. Hence,

Theorem [multiplication of probabilities]. Let the event A=A 1 A 2 …A n And P(A)>0. Then the equality is true:

P(A) = P(A 1) P(A 2 |A 1) P(A 3 |A 1 A 2) … P(A n |A 1 A 2 …A n-1).

Comment. From the commutative property of intersection we can write

P(A 1 A 2) = P(A 1) P(A 2 |A 1)

P(A 1 A 2) = P(A 2) P(A 1 |A 2).

Example. On 7 cards there are letters written that form the word “NIGHTINGALE”. The cards are shuffled and three cards are drawn from them at random and laid out from left to right. Find the probability that the word “VOL” will be obtained (event A).

Let the event A 1- the letter “B” is written on the first card, A 2- the letter “O” is written on the second card, A 2- on the third card there is the letter “L”. Then the event A- intersection of events A 1, A 2, A 3. Hence,

P(A) = P(A 1 A 2 A 3) = P(A 1) P(A 2 |A 1) P(A 3 |A 1 A 2).

P(A 1)=1/7; if event A 1 happened, then on the remaining 6 cards “O” appears twice, which means P(A 2 |A 1)=2/6=1/3. Likewise, P(A 3 |A 1)=2/6=1/3. Hence,

Definition. Events A And B, having a non-zero probability, are called independent if the conditional probability A given that B coincides with unconditional probability A or if the conditional probability B given that A coincides with unconditional probability B, that is

P(A|B) = P(A) or P(B|A) = P(B),

otherwise events A And B are called dependent.

Theorem. Events A And B having non-zero probability are independent if and only if

P(AB) = P(A) P(B).

Thus, an equivalent definition can be given:

Definition. Events A And B are called independent if P(AB) = P(A) P(B).

Example. From a deck of cards containing n=36 cards, one card is drawn at random. Let us denote by A event corresponding to the fact that the extracted card will be a peak, and B- an event corresponding to the appearance of a “lady”. Let's determine whether dependent events A And B.

P(A)=9/36=1/4, P(B)=4/36=19, P(AB)=1/36, . Therefore, events A And B independent. Likewise, .

Often in life we ​​are faced with the need to assess the chances of an event occurring. Is it worth buying lottery ticket or not, what will be the gender of the third child in the family, will the weather be clear tomorrow or will it rain again - there are countless such examples. In the simplest case, you should divide the number of favorable outcomes by the total number of events. If there are 10 winning tickets in the lottery, and there are 50 in total, then the chances of getting a prize are 10/50 = 0.2, that is, 20 versus 100. But what should you do if there are several events and they are closely related? In this case, we will no longer be interested in simple, but in conditional probability. What kind of value this is and how it can be calculated - this will be discussed in our article.

Concept

Conditional probability is the chance of a certain event occurring given that another related event has already occurred. Let's look at a simple coin toss example. If there has not been a draw yet, then the chances of getting heads or tails will be the same. But if five times in a row the coin was placed with the coat of arms up, then you will agree to expect the 6th, 7th, and even more so the 10th repetition of such an outcome would be illogical. With each repeated occurrence of heads, the chances of tails appearing increase and sooner or later it will appear.

Conditional Probability Formula

Let's now figure out how this value is calculated. Let us denote the first event by B, and the second by A. If the chances of B occurring are different from zero, then the following equality will be valid:

P (A|B) = P (AB) / P (B), where:

  • P (A|B) - conditional probability of outcome A;
  • P (AB) - probability of joint occurrence of events A and B;
  • P (B) - probability of event B.

Slightly transforming this relationship we get P (AB) = P (A|B) * P (B). And if you apply it, you can derive the product formula and use it for an arbitrary number of events:

P (A 1, A 2, A 3,...A p) = P (A 1 |A 2...A p)*P(A 2 |A 3...A p) * P (A 3 |A 4...A p )… P (A p-1 |A p) * P (A p).

Practice

To make it easier to understand how the conditional is calculated, let’s look at a couple of examples. Suppose there is a vase containing 8 chocolates and 7 mints. They are the same in size and two of them are pulled out at random in succession. What are the chances that both of them will be chocolate? Let us introduce some notation. Let result A mean that the first candy is chocolate, result B means the second candy is chocolate. Then you get the following:

P (A) = P (B) = 8 / 15,

P (A|B) = P (B|A) = 7 / 14 = 1/2,

P (AB) = 8 /15 x 1/2 = 4/15 ≈ 0.27

Let's consider one more case. Suppose there is a family of two children and we know that at least one child is a girl.

What is the conditional probability that these parents do not yet have boys? As in the previous case, let's start with the notation. Let P (B) be the probability that there is at least one girl in the family, P (A|B) the probability that the second child is also a girl, P (AB) the chances that there are two girls in the family. Now let's do the calculations. In total there can be 4 different combinations of the gender of children, and in only one case (when there are two boys in a family), there will not be a girl among the children. Therefore, the probability is P (B) = 3/4, and P (AB) = 1/4. Then following our formula we get:

P (A|B) = 1/4: 3/4 = 1/3.

The result can be interpreted as follows: if we did not know about the gender of one of the children, then the chances of two girls would be 25 versus 100. But since we know that one child is a girl, the probability that there are no boys in the family increases to one third.

Conditional probability of event A when event B occurs called relation It is assumed here that .

As a reasonable justification for this definition, we note that when an event occurs B it begins to play the role of a reliable event, so we must demand that . Role of the event A plays AB, therefore must be proportional . (From the definition it follows that the proportionality coefficient is equal to .)

Now let's introduce the concept independence of events.

This means: because the event occurred B, probability of event A hasn't changed.

Taking into account the definition of conditional probability, this definition will be reduced to the relation . There is no longer any need to require the fulfillment of the condition . Thus, we come to the final definition.

Events A and B are called independent if P(AB)= P(A)P(B).

The last relation is usually taken to determine the independence of two events.

Several events are said to be collectively independent if similar relationships hold for any subset of the events under consideration. So, for example, three events A, B And C are called collectively independent if the following four relations are satisfied:

Here are a number of tasks for conditional probability and independence of events and their decisions.

Problem 21. From full deck out of 36 cards, one card is drawn. Event A– the card is red, B- Ace card. Will they be independent?

Solution. Carrying out calculations according to the classical definition of probability, we obtain that . This means that events A And B independent.

Problem 22. Solve the same problem for a deck from which the Queen of Spades has been removed.

Solution. . There is no independence.

Problem 23. Two people take turns tossing a coin. The one who gets the coat of arms first wins. Find the probabilities of winning for both players.

Solution. We can assume that elementary events are finite sequences of the form (0, 0, 1,…, 0, 1) . For a sequence of length, the corresponding elementary event has the probability The player who starts tossing the coin first wins if an elementary event consisting of an odd number of zeros and ones occurs. Therefore, the probability of his winning is equal to

The second player's winnings correspond to an even number of zeros and ones. It is equal

From the solution it follows that the game ends in a finite time with probability 1 (since ).

Problem 24. In order to destroy the bridge, you need to hit at least 2 bombs. They dropped 3 bombs. The probabilities of bombs hitting are respectively 0, 1; 0, 3; 0, 4. Find the probability of bridge destruction.

Solution. Let events A, B, C consist in the hit of the 1st, 2nd, 3rd bomb, respectively. Then the destruction of the bridge occurs only when the event occurs. Due to the fact that the terms in this formula are pairwise incompatible, and the factors in the terms are independent, the required probability is equal to

0,1∙0,3∙0,4 + 0,1∙0,3∙0,6 + 0,1∙0,7∙0,4 + 0,9∙0,3∙0,4 = 0,166.

Problem 25. Two cargo ships must moor at the same pier. It is known that each of them can arrive with equal probability at any moment of a fixed day and must unload for 8 hours. Find the probability that the ship that arrives second will not have to wait until the first ship finishes unloading.

Solution. We will measure time in days and fractions of a day. Then elementary events are pairs of numbers filling the unit square, where x – time of arrival of the first ship, y– time of arrival of the second vessel. All points of the square are equally probable. This means that the probability of any event (i.e., a set from a unit square) is equal to the area of ​​the region corresponding to this event. Event A consists of points of the unit square for which the inequality . This inequality corresponds to the fact that the ship that arrived first will have time to unload by the time the second ship arrives. The set of these points forms two right isosceles triangles with side 2/3. The total area of ​​these triangles is 4/9. Thus, .

Problem 26. There were 34 tickets for the probability theory exam. The student removes one ticket from the offered tickets twice (without returning them). Did the student prepare for only 30 tickets? What is the probability that he will pass the exam by choosing the first time "unsuccessful"ticket?

Solution. The random selection consists of drawing one ticket twice in a row, and the ticket drawn the first time is not returned. Let the event IN is that the first one is taken out " unsuccessful" ticket and event A is that the second one is taken out " successful» ticket. It is obvious that events A And IN dependent, since the ticket retrieved the first time is not returned to the number of all tickets. You need to find the probability of an event AB.

According to the conditional probability formula; ; , That's why .