Concepts of probability derived from dice experiments

16\ Frac {1}{6}61. The probability of 6 is 13\frac{1}{3}31, which is the conditional probability.

2. The conditional probability is: suppose we know A event has occurred, on this basis we want to know the probability of event B, the probability of conditional probability, denoted by P (B ∣ A) P (B | A) P (B ∣ A)

3. Classical probability model: Suppose an experiment with equal possibilities of ω \Omega ω results, event A contains XXX of the results, event B contains YYY of the results, and ZZZ represents the crossover events:

The probability of event A occurring: P = X Ω P (A) (A) = \ frac {X} {\ Omega} P (A) = Ω X; The probability of event B occurs: P (B) = Y Ω (B) = P \ frac {Y} {\ Omega} (B) = P Ω Y; Probability of occurrence of both events A and B: P (AB) = Z Ω P (AB) = \ frac {Z} {\ Omega} P (AB) = Ω Z if event A has occurred, then the probability of event B also happens is P (B ∣ A) = ZXP (B | A) = \ frac {Z} {X} P (B ∣ A) = XZ, expand the formula: This formula is the conditional probability formula


P ( B A ) = Z Ω X Ω = P ( A B ) P ( A ) P(B|A) = \frac{\frac{Z}{\Omega}}{\frac{X}{\Omega}}= \frac{P(AB)}{P(A)}

4. If the conditional probability P (B ∣ A) P (B | A) P (B ∣ A) is greater than P (B) P (B) P (B), on behalf of the happening of the event A will promote the occurrence of event B, such as the above examples of throw the dice. In addition, the following figure shows that the probability of P(B), P(B), P(B) is relatively small. In the case that event A has already happened, the probability of event B is also increased due to the large number of intersecting parts:

5. If the conditional probability P (B ∣ A) P (B | A) P (B ∣ A) < P (B) P (B) P (B), on behalf of the occurrence of events does not promote A B, such as event A is cast dice is even, the event B to throw the dice points less than < 4, Incidence of the events A and B is 1/21/21/2, the probability of events A and B at the same time is 61/6, 1/61 / conditional probability P (B ∣ A) P (B | A) P (B ∣ A) for 1/31/31/3. In addition, the following figure shows that the probability of P(B)P(B)P(B) is relatively high. In the case that event A has already happened, the probability of event B is reduced due to the small number of intersecting parts:

6. If the conditional probability P (B ∣ A) P (B | A) P (B ∣ A) equal to zero, on behalf of the events A and B completely disjoint, namely event, event B will not happen, events A and B are incompatible events, or an exclusive events. As shown below:

7. There may be conditional probability P (B ∣ A) P (B | A) P (B ∣ A) equal to P (B) P (B) P (B), in this case is the occurrence of events A and B are related, for example, there are two dice, event A votes for the dice 1 out of 6 points, events for the dice throw points 2 B, The probability of events A and B will happen is for 1/61/61/6, then the probability of events A and B at the same time is 136 \ frac {1} {36} 361, conditional probability P (B ∣ A) P (B | A) P (B ∣ A) equal to 16 \ frac {1} {6}, 61, We usually call these independent events. As shown below:

Total probability formula and dice experiment verification

Suppose you have A1, A2,… ,AnA_1,A_2,… ,A_nA1,A2,… These mutually exclusive events contain all possible results of the experiment:

That is P (A1) + P (A2) +… +P(An)=1P(A_1) + P(A_2) + … + P(A_n) = 1P(A1)+P(A2)+… + P (An) = 1. Take the die I just did, for example, which is basically a roll of the die with the numbers 1,2,3,4,5,6.

Suppose there is another event B, represented with classical probability as shown in the figure below:

The probability of event B can be determined by the probability of event B at A1,A2… ,AnA_1,A_2,… ,A_nA1,A2,… Calculate the conditional probabilities of these mutually exclusive events and the probabilities of these events, namely, the total probability formula:


Condition: P ( A 1 ) + P ( A 2 ) + . . . + P ( A n ) = 1 Conditions: P(A_1) + P(A_2) +… + P(A_n) = 1

Results: P ( B ) = P ( B Ω ) = P ( B A 1 ) + P ( B A 2 ) + . . . + P ( B A n ) = P ( A 1 ) P ( B A 1 ) + P ( A 2 ) P ( B A 2 ) + . . . + P ( A n ) P ( B A n ) Results: P(B) = P(B\Omega) = P(BA_1) + P(BA_2) +… + P(BA_n) = P(A_1)P(B|A_1) + P(A_2)P(B|A_2) + … + P(A_n)P(B|A_n)

For example, event B is a roll of even dice, P(B)=12P(B) = \frac{1}{2}P(B)=21, P = 1 (A) P (B ∣ A points = 1) + P = 2 (A) P (B ∣ A points = 2) + P = 3 (A) P (B ∣ A points = 3) + P = 4 (A) P (B ∣ A points = 4) + P = 5 (A) P (B ∣ A points = 5) + P = 6 (A) P (B ∣ A points = 6) = 16 ∗ + 0 16 16 ∗ ∗ 1 + 16 + 16 ∗ ∗ 1 0 0 + + 16 ∗ 1 = 12 P (A_ = 1} {) P (B | A_ = 1} {) + P (A_ = 2} {) P (B | A_ = 2} {) + P (A_ points = {3}) P (B | A_ points = {3}) + P (A_ points = {4}) P (B | A_ points = {4}) + P (A_ = 5} {) P (B | A_ = 5} {) + P (A_ = 6} {) P (B | A_ = 6} {) = \ frac {1} {6} * 0 + \ frac {1} {6} * 1 + \frac{1}{6} * 0 + \frac{1}{6} * 1 + \frac{1}{6} * 0 + \frac{1}{6} * 1 = \ frac {1} {2} P = 1 (A) P (B ∣ A points = 1) + P = 2 (A) P (B ∣ A points = 2) + P = 3 (A) P (B ∣ A points = 3) + P = 4 (A) P (B ∣ A points = 4) + P = 5 (A) P (B ∣ A points = 5) + P = 6 (A) P (B ∣ A point Number = 6) = 61 ∗ 0 + 61 + 61 ∗ ∗ 1 0 + 61 + 61 ∗ ∗ 1 0 + 61 ∗ 1 = 21

Use of total probability formulas: Football forecasting

The significance of the total probability formula lies in that, in most cases, it is difficult for us to directly obtain the probability of event B like the dice experiment. We need to limit the sample space of events and abstract events A1,A2… ,AnA_1,A_2,… ,A_nA1,A2,… At the same time, calculate the probability of occurrence of B on these events, and finally calculate the probability of event B.

For example, to estimate the probability of England winning the European cup against Germany, we can estimate the number of goals scored by England by historical data (such as the data of recent European cup matches and the data of the matches between the two teams) as 0,1,2,3,4,5… The probability of Germany scoring 0,1,2,3,4,5… Is the probability of England scoring more goals than Germany, that is, the probability of England winning. This is an application of the total probability formula.

Cause causes effect and effect causes cause

The total probability formula is the result of the reason. A typical example is the prediction of the probability of the Victory of the British team in the European Cup against Germany mentioned above. Based on previous data, we can calculate the England and Germany’s average score, score probability generally conform to the poisson distribution (also mentioned that after this we will use the detailed example analysis), according to poisson distribution, we can can be concluded that the probability of England and Germany’s goals n, assuming that the British team average score was 1.67, The Average score for Germany is 1.52 (we only consider the four goals scored here) :

The team The number of goals scored is zero The number of goals is 1 The number of goals is 2 Three goals He scored four goals
The British team 0.1882 0.3144 0.2625 0.1461 0.061
Germany 0.2187 0.3324 0.2527 0.128 0.0486

Suppose P(A0)P(A_0)P(A0) is the probability that England scores zero goals and so on:


P ( A 0 ) = 0.1882 P (A_0) = 0.1882

P ( A 1 ) = 0.3144 P (A_1) = 0.3144

P ( A 2 ) = 0.2625 P (A_2) = 0.2625

P ( A 3 ) = 0.1461 P (A_3) = 0.1461

P ( A 4 ) = 0.061 P (A_4) = 0.061

Assuming P(B)P(B)P(B) is the probability of British team winning, then according to the all-probability formula:


P ( B ) = P ( A 0 ) P ( B A 0 ) + P ( A 1 ) P ( B A 1 ) + P ( A 2 ) P ( B A 2 ) + P ( A 3 ) P ( B A 3 ) + P ( A 4 ) P ( B A 4 ) P(B) = P(A_0)P(B|A_0) + P(A_1)P(B|A_1) + P(A_2)P(B|A_2) + P(A_3)P(B|A_3) + P(A_4)P(B|A_4)

P ( B A 0 ) = 0 P(B|A_0) = 0

P ( B A 1 ) = Germany scored for 0 The probability of = 0.2187 P (B | A_1) = the probability of Germany’s goal of 0 = 0.2187

P ( B A 2 ) = Germany scored for 0 . 1 The probability of = 0.2187 + 0.3324 = 0.5511 P (B | A_2) = Germany’s goal for the probability of 0, 1 = 0.2187 + 0.3324 = 0.5511

P ( B A 3 ) = Germany scored for 0 . 1 . 2 The probability of = 0.2187 + 0.3324 + 0.2527 = 0.8038 P (B | A_3) = Germany’s goal for the probability of 0 = 0.2187 + 0.3324 + 0.2527 = 0.8038

P ( B A 4 ) = Germany scored for 0 . 1 . 2 . 3 The probability of = 0.2187 + 0.3324 + 0.2527 + 0.128 = 0.9318 P (B | A_4) = the probability of Germany’s goal of 0,1,2,3 = 0.2187 + 0.3324 + 0.2527 + 0.128 = 0.9318

P ( B ) = 0.1882 0 + 0.3144 0.2187 + 0.2625 0.5511 + 0.1461 0.8038 + 0.061 0.9318 = 0.3877 P(B) = 0.1882 * 0 + 0.3144 * 0.2187 + 0.2625 * 0.5511 + 0.1461 * 0.8038 + 0.061 * 0.9318 = 0.3877

However, in practical problems, we often encounter problems caused by the effect. For example, when we have a physical examination, gallbladder polyp is detected. Is it caused by tumor, cholesterol or other reasons? This requires us to infer the cause of formation from this result. This leads us to Bayes’ formula

Understand prior probability and posterior probability from football prediction example

Before we talk about Bayes’ formula, let’s be clear about two concepts, prior probability and posterior probability.

Prior probability is generally obtained through experience, that is, the empirical probability obtained based on historical data without any restriction. In the example above, the probability of the number of goals scored by the two teams is the prior probability. At this time, suppose that the game starts and an event happens, and the German defender makes a mistake and gives the first goal to Kane of the English team. At this time, we need to recalcalculate the probability of the number of goals scored by the two teams on this premise, which is the posterior probability.

Prior probability is the empirical probability that is completely inferred from historical data without any presupposition of occurrence. A posterior probability is the probability that a phenomenon is observed and the prior probability needs to be modified. To put it simply, before the game starts, the estimated probability is usually a prior probability, and after the game starts, after the occurrence of red cards, yellow cards, penalty kicks, goals, substitutions, etc., the probability is modified and the posterior probability is obtained.

Bayes formula and gallbladder polyp formation cause speculation

Suppose there are events A and B, then:


P ( A B ) = P ( A B ) P ( B ) = P ( B A ) P ( A ) P ( B ) P(A|B) = \frac{P(AB)}{P(B)} = \frac{P(B|A)P(A)}{P(B)}

That’s Bayes’ formula, and we combine that with the total probability formula, assuming we have events A1,A2… ,AnA_1, A_2, … , A_nA1,A2,… These mutually exclusive events constitute the complete set of the sample space, then:


P ( A 1 B ) = P ( B A 1 ) P ( A 1 ) P ( B ) = P ( B A 1 ) P ( A 1 ) P ( B A 1 ) P ( A 1 ) + P ( B A 2 ) P ( A 2 ) + . . . + P ( B A n ) P ( A n ) P(A_1|B) = \frac{P(B|A_1)P(A_1)}{P(B)} = \frac{P(B|A_1)P(A_1)}{P(B|A_1)P(A_1) + P(B|A_2)P(A_2) + … + P(B|A_n)P(A_n)}

For example, let’s say that in a sample of a million patients in a hospital, 8% of them with tumors, 20% of them with gallbladder polyps, 80% of them with high cholesterol, 40% of them with gallbladder polyps, Of the remaining 12%, 30% had found gallbladder polyps. Let’s say A1A_1A1 is a tumor, A2A_2A2 is cholesterol, and A3A_3A3 is something else. BBB is gallbladder polyp. Then the probability of gallbladder polyp being tumor is:


P ( A 1 B ) = P ( B A 1 ) P ( A 1 ) P ( B A 1 ) P ( A 1 ) + P ( B A 2 ) P ( A 2 ) + P ( B A 3 ) P ( A 3 ) = 0.2 0.08 0.2 0.08 + 0.4 0.8 + 0.3 0.12 = 0.043 P (A_1 | B) = \ frac {P (B | A_1) P (A_1)} {P (B | A_1) P (A_1) + P (B | A_2) P (A_2) + P (B | A_3) P (A_3)} = \ frac {0.2 * 0.08} {0.2 * 0.08 + 0.4 * 0.8 + 0.3 * 0.12} = 0.043