Bedroom design Materials House, garden, plot

Independence of events. Conditional probability. Bayes theorem Conditional probability example

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

Concept

Conditional probability is the odds of a particular event occurring, provided that another related event has already occurred. Let's take a simple example of tossing a coin. 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 fell with the coat of arms up, then agree to expect the 6th, 7th, and even more so the 10th repetition of such an outcome would be illogical. Each time a head comes up, the chances of a tails appearing grow and sooner or later it will come up.

Conditional probability formula

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

P (A | B) \u003d P (AB) / P (B), where:

  • Р (А | В) - conditional probability of the total А;
  • P (AB) - the probability of the joint occurrence of events A and B;
  • P (B) is the probability of event B.

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

P (A 1, A 2, A 3, ... A p) \u003d 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, consider a couple of examples. Suppose you have a vase containing 8 chocolates and 7 mint chocolates. They are the same in size and two of them are pulled out at random sequentially. What are the chances that both of them turn out to be chocolate? Let us introduce the notation. Let the total A mean that the first candy is chocolate, and the total B - the second candy. Then you get the following:

P (A) \u003d P (B) \u003d 8/15,

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

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

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

What is the conditional probability that these parents do not have boys yet? As in the previous case, let's start with the notation. Let P (B) - 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 make 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 the family), there will be no girl among the children. Therefore, the probability P (B) \u003d 3/4, and P (AB) \u003d 1/4. Then following our formula we get:

P (A | B) \u003d 1/4: 3/4 \u003d 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 to 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.

§ 1. BASIC CONCEPTS

4. Conditional probability. Probability multiplication theorem.

In many tasks, you have to find the probability of combining events AND and INif the probabilities of events are known AND and IN.

Consider the following example. Let two coins be thrown. Let's find the probability of two emblems appearing. We have 4 equally probable pairwise inconsistent outcomes that form a complete group:

1st coin 2nd coin
1st outcome emblem emblem
2nd outcome emblem inscription
3rd outcome inscription emblem
4th outcome inscription inscription

In this way, P (coat of arms, coat of arms) \u003d 1/4.

Let us now know that the first coin has a coat of arms. How will the likelihood that the coat of arms appear on both coins change after that? Since the coat of arms fell on the first coin, now the full group consists of two equally probable inconsistent outcomes:

1st coin 2nd coin
1st outcome emblem emblem
2nd outcome emblem inscription

Moreover, only one of the outcomes favors the event (coat of arms, coat of arms). Therefore, under the assumptions made P (coat of arms, coat of arms) \u003d 1/2... Let us denote by AND the appearance of two coats of arms, and after IN - the appearance of the coat of arms on the first coin. We see that the probability of an event AND changed when it became known that the event B happened.

New event probability AND, under the assumption that the event has occurred B, we will denote P B (A).

In this way, P (A) \u003d 1/4; P B (A) \u003d 1/2

Multiplication theorem. The probability of coinciding events A and B is equal to the product of the probability of one of them by the conditional probability of the other, calculated under the assumption that the first event took place, i.e.

P (AB) \u003d P (A) P A (B) (4)

Evidence. Let us prove the validity of relation (4) based on the classical definition of probability. Let the possible outcomes E 1, E 2, ..., E N of this experiment form a complete group of equally probable pairwise incompatible events, of which the event A favored M outcomes, and let these M outcomes L outcomes favor the event B... It is obvious that the combination of events A and B favored L of N possible test results. This gives ; ;
In this way,
Swapping places A and B, similarly we get
The multiplication theorem can be easily generalized to any finite number of events. So, for example, in the case of three events A 1, A 2, A 3 we have *
In general

From relation (6) it follows that from two equalities (8) one is a consequence of the other.

For example, an event A - the appearance of the coat of arms with a single throw of a coin, and the event B - the appearance of a card of diamonds suit when removing a card from the deck. Obviously, events A and B independent.

In case of independence of events A to B formula (4) takes a simpler form:

* Event A 1 A 2 A 3 can be thought of as a combination of two events: events C \u003d A 1 A 2 and events A 3.

Conditional probability of event A when performing event B called attitude 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, therefore it is necessary to demand that. Role of the event Aplays AB, therefore must be proportional . (It follows from the definition that the coefficient of proportionality is.)

Now we introduce the concept independence of events.

This means: because the event happened B, event probability Ahas not changed.

Taking into account the definition of conditional probability, this definition will be reduced to the ratio . There is no longer a 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) \u003d P(A)P(B).

The latter relation is usually taken for determining the independence of two events.

Several events are called independent in the aggregate if similar relations are satisfied for any subset of the considered events. So, for example, three events A, Band C are called independent in the aggregate if the following four relations are satisfied:

We present a number of tasks for conditional probability and independence of eventsand their solutions.

Problem 21. One card is drawn from a full deck of 36 cards. Event A - the card is red, B - Ace card. Will they be independent?

Decision. Performing calculations according to the classical definition of probability, we find that . This means that events A and Bindependent.

Assignment 22... Solve the same problem for the deck with the queen of spades removed.

Decision... ... There is no independence.

Problem 23. Two alternately toss a coin. The winner is the one with the coat of arms first. Find the probabilities of winning for both players.

Decision. 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 a probability. The player who starts tossing a coin first wins if an elementary event occurs, consisting of an odd number of zeros and ones. Therefore, the probability of his winning is

The winning of the second player corresponds 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 hitting bombs are 0, 1, respectively; 0, 3; 0, 4. Find the probability of the destruction of the bridge.

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

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 berth. It is known that each of them can approach with equal probability at any moment of a fixed day and must unload for 8 hours. Find the probability that the second ship will not have to wait until the first ship finishes unloading.

Decision.We will measure time in days and fractions of a day. Then, elementary events are pairs of numbers that fill the unit square, where x - time of arrival of the first ship, y - time of arrival of the second ship. 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 \u200b\u200bthe region corresponding to this event. Event A consists of the points of the unit square for which the inequality holds. This inequality corresponds to the fact that the first ship will have time to unload by the time the second ship arrives. The set of these points forms two right-angled isosceles triangles with sides 2/3. The total area of \u200b\u200bthese triangles is 4/9. In this way, .

Problem 26.The probability theory exam had 34 tickets. The student extracts one ticket twice from the offered tickets (without returning them). Has the student prepared with only 30 tickets? What is the likelihood that he will pass the exam for the first time "unsuccessful»Ticket?

Decision.The random choice consists in the fact that two times in a row one ticket is withdrawn, and the ticket drawn for the first time is not returned. Let the event IN is that the first to take out " unsuccessful" ticket and event ANDis that the second is taken out " successful»Ticket. Obviously, events AND and IN are dependent, since the ticket retrieved for the first time is not returned among all tickets. It is required to find the probability of an event AB.

According to the conditional probability formula; ; , so .

As noted at the beginning of our course, we mean that the experiment is carried out under some fixed set of conditions K. If these conditions change, then the probability of events related to this experiment also changes. Such a change can always be understood as the appearance of some event (except for the initial set of conditions K). To understand how to determine in this case the new (conditional) probability, consider the corresponding frequencies. Let the experiment be carried out N times, event B occurred N (B) times, and events A and B together N (AB) times. Then the '' conditional '' frequency of event A among those experiments where event B occurred is

Bearing in mind that the probability inherits the properties of frequencies, we can give the following

Definition 1. The conditional probability of event A, provided that the event has occurred is called the number

Sometimes another designation is used.

Example 1. A symmetrical coin is tossed twice. It is known that one coat of arms fell out (event B). Find the probability of event A, consisting in the fact that the coat of arms fell out on the first throw.

It is easy to calculate that , and ... Hence it follows that

It is easy to check that for a fixed B, the conditional probability has the following properties:

Thus, conditional probability has all the basic properties of probability.

The following theorem plays a very important role.

Multiplication theorem. Let A and B be two events and Then

Its proof follows from the definition of conditional probability. The benefit of this theorem is that sometimes we can compute the conditional probability directly and then use that to compute

Example 2. There are 5 balls in the urn - 3 white and 2 black. Select two balls without returning. Find the probability that both balls are white.

Let the event be that the first ball is white, and the event is that the second ball is white. It is easy to calculate that After we took out one ball and know that it is white, we have 4 balls and among them 2 are white. Then ... By the multiplication theorem

The multiplication theorem can be easily extended to any finite number of events.

Corollary 1. Let be random events, then

If the occurrence of event B does not change the probability of event A, i.e. , then it is natural to call such events independent. In this case, by the multiplication theorem, we get

The last relation is symmetric with respect to A and B and makes sense at. Therefore, we will take it as a definition.

Definition 2. Events A and B are called independent if

Example 3. Two symmetrical coins are tossed. Event A is that the first coin has a coat of arms, and event B - the second coin has a coat of arms.

It is intuitively clear that such events must be independent. Really, ,,

Thus, A and B are independent in the sense of definition. It is less obvious that events A and C are independent, where C means that only one coat of arms fell out (prove it!).

It is more difficult to determine the independence of more than two events.

Definition 3. Events are called independent in total,if for any and any events of the considered valid

Let us show by examples that pairwise independence and the fulfillment of the last equality for the list of all events is not enough for independence in the aggregate.

Example 4. A regular tetrahedron is colored with three colors: one face is blue, the second is red, the third is green, and the fourth has all three colors. This tetrahedron is thrown and marked by which side it fell out.

Let it mean the appearance of blue, - red, - green. Then, ,,

From here we get that. Likewise for other pairs. Thus, we have pairwise independence. But

Task 1. Come up with an example of an experiment and three events ,, for which, but which are not pairwise independent.

You can give the following more general

Definition 4. Let be some classes of events.

They are called independent if any events are independent in the aggregate.

A typical situation is described in the following example.

Example 5. The symmetrical dice is tossed twice. denotes a set of events associated with the result of the first throw. is defined similarly for the result of the second throw. Then and are independent.

The following result is useful in many problems.

Proposition 1. If events A and B are independent, then any two of the following are also independent:.

Evidence. Let's prove independence.

The independence of the remaining pairs of events is proposed to be proved independently.

In many situations, we come across such experiments that can be decomposed into two (or more) stages. At the first stage, we have several options, and something is asked about what happened at the end - at the second stage. In this case, the result below is extremely useful. Let's start with the following definition.

Definition 5. Events form a complete group of events (partitioning of space) if

Theorem 1. Let the events form a complete group of events, for all and - an arbitrary event. Then is the formula of total probability.

Evidence. Since the events form a complete group, we have

Hence we get

Where we used the multiplication theorem.

Example 6. In a certain factory, 30% of production is produced by machine A, 25% of production is produced by machine B, and the rest is produced by machine C. At machine A, 1% of its production is scraped, at machine - 1.2%, and at machine C - 2 %. One item is randomly selected from all manufactured products. What is the likelihood that it is defective?

Let denote the event that the selected part is made on machine A, - on machine B, - on machine C. We denote by D the event that the selected part is defective. Events form a complete group of events. By the condition of the problem

Event. The space of elementary events. A credible event, an impossible event. Joint, incompatible events. Equally possible events. Complete group of events. Operations on events.

Event is a phenomenon that can be said to be happens or not happening, depending on the nature of the event itself.

Under elementary eventsassociated with a particular test understand all of the indecomposable results of that test. Each event that can occur as a result of this test can be considered as a set of elementary events.

The space of elementary events is called an arbitrary set (finite or infinite). Its elements are points (elementary events). Subsets of the space of elementary events are called events.

A credible event an event is called that, as a result of this test, will necessarily occur; (denoted by E).

Impossible event is called an event that due to this test can't happen; (denoted by U). For example, the appearance of one of six points during one roll of the dice is a reliable event, but the appearance of 8 points is impossible.

Two events are called joint (compatible) in a given experience, if the appearance of one of them does not exclude the appearance of the other.

Two events are called inconsistent (incompatible) in a given experience if they cannot happen together in the same test. Several events are called inconsistent if they are inconsistent in pairs.

Form start

End of form

An event is a phenomenon that can be said to be happens or not happening, depending on the nature of the event itself. Events are indicated by capital letters of the Latin alphabet A, B, C, ... Any event occurs due to trials... For example, flipping a coin is a test, the appearance of a coat of arms is an event; we take out the lamp from the box - a test, it is defective - an event; we take out the ball at random from the box - a test, the ball turned out to be black - an event. A random event is an event that can happen or not happen during this test. For example, drawing one card at random from the deck, you draw an ace; shooting, the shooter hits the target. Probability theory only studies massive random events. A credible event is an event that will necessarily occur as a result of this test; (denoted by E). An impossible event is an event that due to this test can't happen; (denoted by U). For example, the appearance of one of six points during one roll of the dice is a reliable event, but the appearance of 8 points is impossible. Equally possible events are such events, each of which has no advantage in appearing more often than the other during numerous tests, which are carried out under the same conditions. Pairwise incompatible events are events, two of which cannot happen together. The probability of a random event is the ratio of the number of events that favor this event to the total number of all equally possible incompatible events: P (A) \u003d where A is an event; P (A) - probability of an event; N is the total number of equally possible and incompatible events; N (A) is the number of events that favor event A. This is the classic definition of the probability of a random event. The classical definition of probability takes place for tests with a finite number of equally possible test results. Let n shots be made at the target, of which there were m hits. The ratio W (A) \u003d is called the relative statistical frequency of occurrence of the event A. Therefore, W (A) is the statistical hit rate.

When carrying out a series of shots (Table 1), the statistical frequency will fluctuate around a certain constant number. It is advisable to take this number as an estimate of the hit probability.

Probability of event A is called that unknown number P, around which the values \u200b\u200bof the statistical frequencies of the occurrence of the event A are collected with an increase in the number of trials.

It is a statistical designation of the probability of a random event.

Operations on events
Elementary events associated with a particular test are understood to be all the indecomposable results of that test. Each event that can occur as a result of this test can be considered as a set of elementary events. An arbitrary set (finite or infinite) is called a space of elementary events. Its elements are points (elementary events). Subsets of the space of elementary events are called events. All known relations and operations on sets are carried over to events. An event A is said to be a special case of an event B (or B is a result of A) if the set A is a subset of B. This relation is denoted in the same way as for sets: A ⊂ B or B ⊃ A. Thus, the relation A ⊂ B means that all elementary events included in A are also included in B, that is, when event A occurs, event B also occurs B. Moreover, if A ⊂ B and B ⊂ A, then A \u003d B. Event A, which occurs then and only when event A does not occur is called the opposite of event A. Since in each test one and only one of the events occurs - A or A, then P (A) + P (A) \u003d 1, or P (A) \u003d 1 - P (A). The combination or sum of events A and B is called event C, which occurs if and only when either event A occurs, or event B occurs, or A and B occur simultaneously. This is denoted C \u003d A ∪ B or C \u003d A + B. Combining events A 1, A 2, ... A n is an event that occurs if and only if at least one of these events occurs. The combination of events A 1 ∪ A 2 ∪ ... ∪ A n, or A k, or A 1 + A 2 + ... + A n is indicated. The intersection or product of events A and B is an event D that occurs if and only if events A and B occur simultaneously, and is denoted by D \u003d A ∩ B or D \u003d A × B. The combination or product of events A 1, A 2, ... A n is an event that occurs if and only if an event A 1, an event A 2, etc., and an event A n occur. The alignment is designated as follows: A 1 ∩ A 2 ∩ ... ∩ A n or A k, or A 1 × A 2 × ... × A n.

Topic number 2. Axiomatic definition of probability. Classical, statistical, geometric definition of the probability of an event. Probability properties. Addition and multiplication theorems for probabilities. Independent events. Conditional probability. The probability of the occurrence of at least one of the events. Formula of total probability. Bayes formula

A numerical measure of the degree of objective possibility of the occurrence of an event is called probability of the event. This definition, which qualitatively reflects the concept of the probability of an event, is not mathematical. For it to become so, it is necessary to define it qualitatively.

According to classical definition the probability of event A is equal to the ratio of the number of cases favorable to it to the total number of cases, that is:

Where P (A) is the probability of event A.

The number of cases favorable for event A

The total number of cases.

Statistical definition of probability:

The statistical probability of event A is the relative frequency of occurrence of this event in the tests performed, that is:

Where is the statistical probability of event A.

The relative frequency (frequency) of the event A.

Number of trials in which A events occurred

The total number of tests.

Unlike "mathematical" probability, considered in the classical definition, statistical probability is an experimental, experimental characteristic.

If there is a proportion of cases favorable to event A, which is determined directly, without any tests, that is, the proportion of those actually performed tests in which event A appeared.

Geometric definition of probability:

The geometric probability of event A is the ratio of the measure of the area favorable to the occurrence of event A, to the measure of all areas, that is:

In the one-dimensional case:


The probability of hitting the point on the CD /

It turns out that this probability does not depend on the location of CD on the segment AB, but depends only on its length.


The probability of hitting a point does not depend either on the shapes or on the location of B on A, but depends only on the area of \u200b\u200bthis segment.

Conditional probability

The probability is called conditional if it is calculated under certain conditions and denoted by:

This is the probability of event A. It is calculated assuming that event B has already occurred.

Example. We make a test, we draw two cards from the deck: The first probability is unconditional.

We calculate the probability of extracting an ace from the deck:

We calculate the appearance of 2-aces from the deck:

A * B - co-occurrence of events

probability multiplication theorem

Corollary:

The multiplication theorem for co-occurrence of events is:

That is, each subsequent probability is calculated taking into account that all previous conditions have already occurred.

Independence of the event:

Two events are called independent if the appearance of one does not contradict the appearance of the other.

For example, if aces are re-drawn from the deck, then they are independent among themselves. Again, that is, the card was looked at and returned back to the deck.

Joint and incompatible events:

Joint2 events are called if the appearance of one of them does not contradict the appearance of the other.

The addition theorem for the probabilities of joint events:

The probability of occurrence of one of two joint events is equal to the sum of the probabilities of these events without their joint occurrence.

For three joint events:

Events are called inconsistent if no two of them can appear simultaneously as a result of a single test of a random experiment.

Theorem:The probability of one of two inconsistent events occurring is equal to the sum of the probabilities of these events.

The probability of the sum of events:

Probability addition theorem:

The probability of the sum of a finite number of incompatible events is equal to the sum of the probabilities of these events:

Corollary 1:

The sum of the probabilities of events forming a complete group is equal to one:

Corollary 2:

Comment:It should be emphasized that the considered addition theorem is applicable only for inconsistent events.

Probability of opposite events:

Oppositeare the two only possible events that form a complete group. One of the two opposite events is denoted by AND, the other - through.

Example: Hitting and missing a target are opposite events. If A is a hit, then a miss.

Theorem:The sum of the probabilities of opposite events is equal to one:

Note 1:If the probability of one of two opposite events is denoted by p, then the probability of another event is denoted by q Thus, by virtue of the previous theorem:

Note 2:When solving problems of finding the probability of an event A, it is often advantageous to first calculate the probability of an event, and then find the desired probability by the formula:

The probability of occurrence of at least one event:

Suppose that as a result of an experiment one, some part, or none of the events may appear.

Theorem:The probability of occurrence of at least one event from a set of independent events is equal to the difference between unity and their probability of non-occurrence of events.