Jump to content

Probability/Conditional Probability

From Wikibooks, open books for an open world

Motivation

[edit | edit source]

In the previous chapter, we have actually only dealt with unconditional probabilities. To be more precise, in the problems encountered in the previous chapter, the sample space is defined initially, and all probabilities are assigned with respect to that initial sample space. However, in many situations, after defining the initial sample space for a random experiment, we may get some new information about the random experiment. Hence we may need to update the sample space based on those information. The probability based on this updated sample space is known as a conditional probability.

To illustrate how we get the new information and update the sample space correspondingly, consider the following example:

Example. Suppose we randomly draw a card from the poker deck (such that every card is equally likely to be drawn). We define the sample space to be the set containing all 52 cards.

(a) Calculate the probability that an ace is drawn.

(b) Suppose an ace is drawn out from the poker deck beforehand. Calculate the probability that an ace is drawn. (This is a conditional probability.)

(c) Suppose two aces are drawn out from the poker deck beforehand. Calculate the probability that an ace is drawn. (This is a conditional probability.)

(d) Suppose three aces are drawn out from the poker deck beforehand. Calculate the probability that an ace is drawn. (This is a conditional probability.)

(e) Suppose we instead randomly draw four cards from the deck. Calculate the probability that four aces are drawn.

Solution.

(a) The probability is 452 (since there are four aces in the deck).

(b) With the given condition (an ace is removed from the deck), we know that there are only 51 cards, and 3 aces in the deck. So, the sample space is updated to contain these 51 cards. Although we cannot precisely describe the sample space since we do not know which ace is removed, we know that the sample space has 51 sample points and only 3 aces. It is also reasonable to assume that the sample points in the updated sample space are equally likely. Hence, the probability should be 351. (Notice that we are still able to calculate the probability, despite we do not know exactly what the updated sample space is.)

(c) Similar to (b), the sample space is updated to contain 50 cards and two aces. Hence, the probability is 250.

(d) Similar to (b), the sample space is updated to contain 49 cards and one ace. Hence, the probability is 149.

(e) Clearly, we can use the concept of combinatorial probability to calculate this probability: 1(524)=1270725.

Another argument (which may be quite intuitive to many people) is to consider the four draws "one by one".

  1. For the first draw, the probability is 452.
  2. For the second draw, we know that an ace is drawn for the first draw, so the probability is 351 (similar to (b)).
  3. For the third draw, we know that two aces are drawn for the first two draws, so the probability is 250 (similar to (c)).
  4. For the fourth draw, we know that three aces are drawn for the first three draws, so the probability is 149 (similar to (d)).

Then, we are somehow told that multiplying all the probabilities gives the desired one ("multiplication rule of probability"): 452×351×250×149=1270725, which turns out to be the same as the answer above.

It turns out that this argument is valid, but actually we have not discussed any results that justify this argument in the previous chapter. Indeed, we have implicitly used the concept of conditional probability (in 2,3,4 above), where the sample space is updated as we have new information/knowledge. (In some sense, the (conditional) probability reflect our state of knowledge about the random experiment (about the deck).)

From the example above, we are able to calculate the (conditional) probability "reasonably" through some arguments (see (b)) when the sample points in the initial sample space are equally likely. Furthermore, we can notice that the condition should be an occurrence of an event, which involves the sample points in the sample space. When the condition does not involves the sample points at all, it is irrelevant to the random experiment. For example, if the condition is "the poker deck costs $10", then this is clearly not an event in the sample space and does not involve the sample points. Also, it is irrelevant from this experiment.

To motivate the definition of conditional probability, let us consider more precisely how we obtain the (conditional) probability in (b). In (b), we are given that an ace is drawn out from the poker deck beforehand. This means that ace can never be drawn in our draw. This corresponds to the occurrence of the event (with respect to original sample space) {not drawing that ace from the poker deck} (denoted by B) which consists of 51 sample points, resulting from excluding that ace from the original 52 sample points. Thus, we can regard the condition as the occurrence of event B. Now, under this condition, the sample space is updated to be the set B, that is, only points in B are regarded as legit sample points now.

Consider part (b) again. Let us denote by A the event {an ace is drawn from the deck} (with respect to the original sample space).

Now, only part of the points (whose also lie in the set B) in the set A are regarded as legit sample points. All other points in set A are no longer legit sample points anymore under this condition. In other words, only the points in both sets A and B (i.e., in set A∩B) are legit sample points in event A under this condition.

In the part (b) above, only the three aces remaining in the deck (in both sets A and B, and hence in set A∩B) are considered to be legit sample points. The other ace in set A (the ace that is drawn out in the condition) is not considered to be a legit sample point, since that ace is not in the deck at all!

To summarize, when we want to calculate the conditional probability of event A given the occurrence of event B, we do the following:

  1. We update the sample space to the set B.
  2. We only regard the sample points in set A∩B to be the (valid) sample points of event A.

In the above example, we encounter a special case where the sample points in the initial sample space (assumed to be finite) are equally likely (and hence the sample points in the updated sample space B should also be equally likely). In this case, using the result about combinatorial probability (in previous chapter), the conditional probability, denoted by ℙ(A|B), is given by ℙ(A|B)=|A∩B||B|=number of (valid) sample points in Anumber of sample points in updated sample space B. (Notice that "ℙ(A|B)" is just a notation (ℙ(⋅|B) is a function, A is the "input"). Merely "A|B" means nothing. Particularly, "A|B" is not an event/set.)

When the sample points are not equally likely, we can apply a theorem in the previous chapter for constructing probability measure on the updated sample space B. (Here, we assume that B is countable.) Particularly, since we are only regarding the sample points in set A∩B as the (valid) sample points of event A, it seems that the (naive) "conditional probability" of A given the occurrence of event B should be given by ℙ(A∩B)=∑ω∈A∩Bℙ({ω}) according to that theorem (where ℙ is the probability measure in the initial probability space (Ω,ℱ,ℙ)).

However, when we apply the original probability measure ℙ (in the original probability space) to every singleton event in the new sample space B, we face an issue: the sum of those probabilities are just ∑ω∈Bℙ({ω})=ℙ(B), which is not 1 in general! But that theorem requires this probability to be 1! A natural remedy to this problem is to define a new probability measure ℙ(⋅|B):ℱ→[0,1], based on the original probability measure and the above (naive) "conditional probability" ℙ(A∩B), such that the sum must be 1. After noticing that 1=ℙ(B)ℙ(B), a natural choice of such probability measure is given by ℙ(A|B)=ℙ(A∩B)ℙ(B), for every A∈ℱ. The probability ℙ(B) can be interpreted as the normalizing constant, and every (naive) "conditional probability" (as suggested previously) is scaled by a factor of 1ℙ(B). (It turns out that the probability measure ℙ(⋅|B):ℱ→[0,1] defined in this way also satisfies all the probability axioms. We will prove this later.)

When comparing this formula with the formula for the equally likely sample points case, the two formulas look quite similar actually. In fact, we can express the formula for the equally likely sample points case in the same form as this formula (since the equally likely sample points case is actually just a special case for the theorem we are considering): |A∩B||B|=|A∩B|/|Ω||B|/|Ω|=ℙ(A∩B)ℙ(B).

A graphical illustration for the above motivation.

So, now we have developed a reasonable and natural formula to calculate the conditional probability ℙ(A|B) when the outcomes are equally likely (applicable to finite sample space), and the outcomes are not equally likely (only for countable sample space). It is thus natural to also use the same formula when the sample space is uncountable. This motivates the following definition of conditional probability:

Definition

[edit | edit source]

Definition. (Conditional probability) Let (Ω,ℱ,ℙ) be a probability space, and A,B∈ℱ be events. Assume that ℙ(B)>0. Then, The conditional probability of event A given the occurrence of event B, denoted by ℙ(A|B), is ℙ(A|B)=ℙ(A∩B)ℙ(B).

Remark.

  • The assumption that ℙ(B)>0 prevents the above formula gives an undefined value.
  • It follows that ℙ(A∩B)=ℙ(A|B)ℙ(B).
  • This formula can be illustrated by the following tree diagram:

                *-------> A    P(A n B)
              / P(A|B)
  P(B)       /
   *------> B 
  /          \
 /            \
/              *-------> A^c
\               
 \
  \
   *------> B^c
  • Sometimes, the probability ℙ(A∩B) is unknown, and we are given ℙ(A|B) and ℙ(B). In this case, we can apply this formula to get ℙ(A∩B).
  • Also, the value of ℙ(A|B) is often not stated in the question explicitly. Instead, we may have to use our intuition to understand the situation to get the conditional probability ℙ(A|B).
  • Besides, in a more complicated situation, it may not be clear that what the condition "B" in ℙ(A|B) is, and therefore we may have to decide what should we condition at, depending on the context. (When we condition on some appropriate events, we may be able to determine the conditional probability readily.)
  • Through this definition, we induces (in some sense) another probability space where the conditional probability is taken to be the probability measure: (Ω,ℱ,ℙ(⋅|B)), where ℙ(⋅|B):ℱ→[0,1] is defined by

ℙ(A|B)=ℙ(A∩B)ℙ(B)

for every A∈ℱ.
(Technically speaking, since we have not proved that ℙ(⋅|B) satisfies all probability axioms, we cannot say that (Ω,ℱ,ℙ(⋅|B)) is a probability space yet. But it turns out to be the case.)

Example. (ℙ(⋅|B) is a valid probability measure) Let (Ω,ℱ,ℙ) be a probability space, and A,B∈ℱ be events. Assume that ℙ(B)>0. Define the function ℙ(⋅|B):ℱ→[0,1] by ℙ(A|B)=ℙ(A∩B)ℙ(B) for every A∈ℱ.

Prove that ℙ(⋅|B) is a valid probability measure, that is, this function satisfies all three probability axioms.

Proof.

P1 (Nonnegativity): Since ℙ(A∩B)≥0 and ℙ(B)>0 (ℙ satisfies all the probability axioms, particularly, the nonnegativity), it follows that ℙ(A|B)≥0 for every event A∈ℱ.

P2 (Unitarity): We have ℙ(Ω|B)=ℙ(Ω∩B)ℙ(B)=ℙ(B)ℙ(B)=1.

P3 (Countable additivity): For every infinite sequence of pairwise disjoint events A1,A2,…, we have ℙ(⋃i=1∞Ai|B)=ℙ((A1∪A2∪⋯)∩B)ℙ(B)=ℙ((A1∩B)∪(A2∩B)∪⋯)ℙ(B)= P3 ∑i=1∞ℙ(Ai∩B)ℙ(B)=∑i=1∞ℙ(Ai∩B)ℙ(B)⏟not involving i= def ∑i=1∞ℙ(Ai|B).

◻


Example. (Special cases for conditional probability)

  • Suppose B⊆A. Then, when we update the sample space to set B, the set A contains all (legit) sample points in the updated sample space. Thus, the conditional probability ℙ(A|B) should be 1. Alternatively and more intuitively, given that B occurs, this means the realized outcome lies in set B, and hence must lie in set A (since B⊆A). So, the probability should be 1.
  • Formally, we can see this readily: ℙ(A|B)=ℙ(A∩B)ℙ(B)=ℙ(B)ℙ(B)=1 (A∩B=B when B⊆A.)
  • Suppose A and B are disjoint. Then, when we update the sample space to set B, the set contains zero (legit) sample point in the updated sample space. Thus, the conditional probability ℙ(A|B) should be 1. Alternatively and more intuitively, given that B occurs, this means the realized outcome lies in set B. So, it must not lie in set A. Hence, the probability should be 0.
  • Formally, we can see this readily: ℙ(A|B)=ℙ(A∩B)ℙ(B)=ℙ(∅)ℙ(B)=0.

Example. Suppose we roll a fair dice once. Let E and P be the events that even number comes up and prime number comes up respectively.

(a) Calculate ℙ(E|P).

(b) Calculate ℙ(P|E).

Solution.

(a) ℙ(E|P)=ℙ(E∩P)ℙ(P)=1/63/6=13. (b) ℙ(P|E)=ℙ(P∩E)ℙ(E)=1/62/6=13.

(Alternatively, we may use the formula obtained in the motivation section since all sample points are equally likely: (a) ℙ(E|P)=|E∩P||P|=13; (b) ℙ(P|E)=|P∩E||E|=13.)

Clipboard

Exercise.

(a) Calculate ℙ(P|P∩E).

(b) Calculate ℙ(P|P∪E).


Solution

(a) ℙ(P|P∩E)=ℙ(P∩E)ℙ(P∩E)=1.

(b) ℙ(P|P∪E)=ℙ(P∩(P∪E))ℙ(P∪E)=ℙ(P)ℙ(P∪E)=3/65/6=35. (We have P∩(P∪E)=P since P⊆P∪E.)


Example. Suppose Amy tosses a fair coin twice, and she tells Bob that she obtains at least one heads in the two tosses.

(a) Calculate the probability that the outcome of the two tosses is "HH" (two heads).

(b) Calculate the probability that the outcome of the two tosses is "TT" (two tails).

Solution.

(a) The probability is ℙ({HH}|{at least one heads})=ℙ({HH}∩{at least one heads}⏞{HH})ℙ({at least one heads}⏟{HH,HT,TH})=1/43/4=13.

(b) Notice that {TT}∩{at least one heads}=∅. Thus, the probability is 0.

Clipboard

Exercise. A student claims that the probability that the outcome of the two tosses is "HH" should be 12. He reasons as follows:

When Bob is told that there is at least one heads in the two tosses, we can update the sample space to be B={exactly one head,two heads}. The probability is thus |{HH}||B|=12.

Point out the mistakes made by the student.

Solution

The mistake is that the two outcomes in B are not equally likely. Indeed, the outcome "exactly one head" in the set B can actually be decomposed into two more specific outcomes: HT and TH. So, strictly speaking B is not even a sample space!


Example. (Boy or Girl paradox) Amy is a mother with two children, where each of them is equally likely to be a boy or girl.

(a) Suppose Amy tells you that she has at least one son. Calculate the probability that Amy has two sons .

(b) Suppose Amy tells you that her older child is a son. Calculate the probability that Amy has two sons.

Solution.

Define the sample space to be {BB,BG,GB,GG} where BG represents the older child is boy and the younger child is a girl, etc. Then, all four sample points in the sample space are equally likely.

(a) The probability is ℙ({2 sons}|{≥1 son})=ℙ({BB}|{BB,BG,GB})=ℙ({BB}|{BB,BG,GB})=ℙ({BB}∩{BB,BG,GB}⏞{BB})ℙ({BB,BG,GB})=1/43/4=13.

(b) The probability is ℙ({2 sons}|{older child is a son})=ℙ({BB}|{BB,BG})=ℙ({BB}∩{BB,BG}⏞{BB})ℙ({BB,BG})=1/42/4=12.

Remark.

  • This example shows that even with a small change in the given information, the conditional probability obtained can be quite different. So, we should be careful about what information is actually given in order to have a correct calculation.

Example. Consider a course in probability theory. The following summarizes the probability for a student to pass the course when the student has different scores in the mid-term exam: Interval of scoresProbability for passing the course[90,100]0.95[70,90)0.9[50,70)0.5[0,50)0.3

(a) Suppose the probability for getting at least 50 marks in the mid-term exam (for every student) is 0.6. Calculate the probability that a student gets less than 50 marks in the mid-term exam but pass the course.

(b) Assuming that it is equally likely for the score of mid-term exam of a student to lie in one of the above four intervals, calculate the probability that a student (with unknown score) passes the course.

Solution.

(a) Let A be the event that a student gets at least 50 marks in the mid-term exam, P be the event that a student passes the course. Then, the desired probability is ℙ(Ac∩P). From the question, we know that ℙ(P|Ac)=0.3, and ℙ(A)=0.6. Hence, the desired probability is ℙ(Ac∩P)=ℙ(P|Ac)ℙ(Ac)=0.3(1−ℙ(A))=0.3(0.4)=0.12.

(b) Let A1,A2,A3,A4 be the event that the score of mid-term exam of a student lies in [90,100],[70,90),[50,70),[0,50) respectively. From the assumption, we have ℙ(A1)=ℙ(A2)=ℙ(A3)=ℙ(A4)=0.25. Notice that the events P∩A1,P∩A2,P∩A3,P∩A4 are pairwise disjoint. Also, (P∩A1)∪(P∩A2)∪(P∩A3)∪(P∩A4)=P. (possibly seen by Venn diagram informally) Hence, by the finite additivity, the desired probability is ℙ(P)=ℙ(P∩A1)+ℙ(P∩A2)+ℙ(P∩A3)+ℙ(P∩A4)=ℙ(P|A1)⏟0.95ℙ(A1)⏟0.25+ℙ(P|A2)⏟0.9ℙ(A2)⏟0.25+ℙ(P|A3)⏟0.5ℙ(A3)⏟0.25+ℙ(P|A4)⏟0.3ℙ(A4)⏟0.25=0.6625.

Clipboard

Exercise. Suppose the assumption for part (b) above still applies.

(a) Calculate the probability that a student gets at least 90 marks in the mid-term exam if the student passes the course. (Answer: approximately 0.3585)

(b) Calculate the probability that a student gets less than 50 marks in the mid-term exam if the student fails the course. (Answer: approximately 0.5185)


Solution

Let us continue using the notations defined in part (b) above.

(a) The desired probability is ℙ(A1|P)=ℙ(A1∩P)ℙ(P)=ℙ(P|A1)ℙ(A1)ℙ(P)=0.95(0.25)0.6625≈0.3585.

(b) The desired probability is ℙ(A4|Pc)=ℙ(A4∩Pc)ℙ(Pc)=ℙ(A4)−ℙ(A4∩P)1−ℙ(P)=ℙ(A4)−ℙ(P|A4)ℙ(A4)1−ℙ(P)=0.25−0.3(0.25)1−0.6625≈0.5185.


Example. Amy rolls two fair six-faced dice, with one colored red and another colored blue (so that they are distinguishable), without looking at the dice. After Amy rolls the two dice, Bob tells Amy that there is at least one 6 coming up (assume Bob tells the truth). Calculate the probability that 6 comes up for both dice after hearing the information from Bob.

Solution.

The condition is there is at least one 6 coming up, and the probability of this condition can be calculated by inclusion-exclusion principle: ℙ({at least one 6 comes up})=ℙ({6 comes up for the red dice}∪{6 comes up for the blue dice})=ℙ({6 comes up for the red dice})+ℙ({6 comes up for the blue dice})−ℙ({6 comes up for the red dice}∩{6 comes up for the blue dice⏟={6 comes up for both dice}})=16+16−136=1136. Also, ℙ({at least one 6 comes up}∩{ 6 comes up for both dice})=ℙ({6 comes up for both dice})=136. Thus, the probability that 6 comes up for both dice after hearing the information from Bob is ℙ({6 comes up for both dice}|{at least one 6 comes up})=1/3611/36=111.

Clipboard

Exercise.

1. Calculate the probability again if the blue dice is colored red, such that the two dice is not distinguishable.

Solution

Changing the color of dice does not affect the probability. Thus, the probability is still 111.

Remark.

  • After changing the color, although the number of sample points in the sample space changes, the sample points are not equally likely.


2. Chris claims that the desired probability in the example should be 1/6, and he reasons as follows:

Given that there is at least one 6 coming up, we know that 6 comes up in a dice. Now, we consider another dice, having six equally likely possible outcomes for the number coming up, namely 1,2,3,4,5 and 6. Thus, we can update sample space to B={(6,1),(6,2),(6,3),(6,4),(6,5),(6,6)} where the second coordinate of each ordered pair represents the number coming up for another dice.

The desired event is that 6 comes up for both dice, that is, A={(6,6)}. Clearly, A∩B=A={(6,6)}. It follows that the probability is |A∩B||B|=16.

We know that the correct answer is 1/11, and not 1/6, but why is this claim wrong? (cf. this discussion)

Solution

The six outcomes considered include the outcome in which 6 comes up in either red or blue dice. But the sample points for which 6 comes up for the blue or red dice only (resp.) are missed. There are five of them, namely (1,6),(2,6),(3,6),(4,6),(5,6). So, the updated sample space suggested is actually not complete, and thus a wrong answer is obtained.

The complete updated sample space should be B={(1,6),(2,6),(3,6),(4,6),(5,6),(6,6),(6,1),(6,2),(6,3),(6,4),(6,5),(6,6)}, where first and second coordinate in each ordered pair represents the number coming up for red and blue dice respectively. The set B containing 11 sample points. The desired event is A={(6,6)}. Hence, the correct answer is |A∩B||B|=111.

Remark.

  • Chris' claim is correct if Bob tells Amy that 6 comes up for red (or blue) dice. There is difference between '6 comes up for red (or blue) dice' and 'there is at least one 6 coming up (which does not specify color)'. E.g., if Bob tells Amy that 6 comes up for the red dice, then the updated sample space does consist of 6 outcomes, as suggested by Chris:

B={(6,1),(6,2),(6,3),(6,4),(6,5),(6,6)} where first and second coordinate in each ordered pair represents the number coming up for red and blue dice respectively.



Example. Suppose a poker deck is to be distributed to four players: player A,B,C,D. Calculate the probability that player C gets exactly 3 cards with diamond suit, with the condition

(a) Exactly 8 cards with diamond suit are distributed to players A and B, and then 13 of the remaining 44 cards are to be distributed randomly to player C.

(b) 26 cards are distributed to players A and B, where exactly 8 of them are with diamond suit. Then, the remaining 26 cards are to be distributed randomly and equally to players C and D.

Solution.

(a) Let us update the sample space to contain the possible distributions of the 13 of the 44 cards. The number of sample points in the updated sample space is (4413) (placing 13 card places for player C into 44 cards). On the other hand, the number of sample points in the event is (53)(3910) (placing 3 card places for player C into 5 cards with diamond suit, then placing 10 card places for player C into 39 cards with non-diamond suit). Then, the probability is (53)(3910)(4413)≈0.122.

(b) Let us update the sample space to contain the possible distributions of the remaining 26 cards. The number of sample points in the updated sample space is (2613) (placing 13 card places for player C into 26 cards. Then, the remaining 13 cards are for player D). On the other hand, the number of sample points in the event is (53)(2110). (placing 3 card places for player C into 5 distinguishable cards with diamond suit, then placing 10 card places for player C into 39 cards with non-diamond suit. The remaining 13 cards are for player D.) Then, the probability is (53)(2110)(2613)≈0.339.

Clipboard

Exercise. Suppose 13 of the 52 cards are to be distributed to player C. Calculate the probability that player C gets exactly 3 cards with diamond suit. (Answer: approximately 0.056)

Solution

The probability is (133)(3910)(5213)≈0.056. (The number of sample points in the sample space is (5213) (placing 13 card places into 52 cards). The number of sample points in the event is (133)(3910) (placing 3 card places into 13 cards with diamond suit, and then placing 10 card places into 39 cards with non-diamond suit.)


Example. (Simpson's paradox) Suppose there are two treatments for a disease: treatment A and B. To test the effectiveness of the treatments, treatment A and B are applied to two different groups of patients with that disease. The following summarizes the number of patients with different results for the two treatments: Men (M)Men (M)Women (W)Women (W)Recovered (R)Dead (D)Recovered (R)Dead (D)Treatment A301204020Treatment B50150155 (Assume that there are only two outcomes for the treatment: R or D.)

(a) Calculate the probability of recovery for men receiving treatment A.

(b) Calculate the probability of recovery for men receiving treatment B.

(c) Calculate the probability of recovery for women receiving treatment A.

(d) Calculate the probability of recovery for women receiving treatment B.

(e) Calculate the probability of recovery for all patients receiving treatment A.

(f) Calculate the probability of recovery for all patients receiving treatment B.


(To calculate the probability of recovery, we consider the probability of picking a recovered patient when we select a patient from the pool of patients randomly such that every patient is equally likely to be picked, where the pool of patients depends on our conditions.)

Solution.

(a) The probability is ℙ(R|M∩A)=|R∩M∩A||M∩A|=3030+120=15.

(b) The probability is ℙ(R|M∩B)=|R∩M∩B||M∩B|=5050+150=14>ℙ(R|M∩A). (This means treatment B is better than A when applied to men only.)

(c) The probability is ℙ(R|W∩A)=|R∩W∩A||W∩A|=4040+20=23.

(d) The probability is ℙ(R|W∩B)=|R∩W∩B||W∩B|=1515+5=34>ℙ(R|W∩A). (This means treatment B is better than A when applied to women only.)

(e) The probability is ℙ(R|A)=|R∩A||A|=30+4030+120+40+20=13.

(f) The probability is ℙ(R|B)=|R∩B||B|=50+1550+150+15+5=1344≈0.2955<ℙ(R|A). (This means treatment B is worse than A when applied to all patients.)

Remark.

  • This example shows the Simpson's paradox where there is a reverse in direction of a comparison when data from several groups are combined into a single group.

The following is a generalization to the formula ℙ(A∩B)=ℙ(A|B)ℙ(B). It is useful when we calculate the probability of the occurrence of multiple events together, by considering the events "one by one".

Proposition. (Multiplication rule of probability) Let (Ω,ℱ,ℙ) be a probability space, and E1,E2,…,En∈ℱ be events. Then, ℙ(E1∩E2∩⋯∩En)=ℙ(E1)ℙ(E2|E1)ℙ(E3|E1∩E2)⋯ℙ(En|E1∩⋯∩En−1).

Proof. With the assumptions, we have by definition ℙ(E1)ℙ(E2|E1)ℙ(E3|E1∩E2)⋯ℙ(En|E1∩⋯∩En−1)= def ℙ(E1)⋅ℙ(E2∩E1)ℙ(E1)⋅ℙ(E3∩E1∩E2)ℙ(E1∩E2)⋅⋯⋅ℙ(En∩E1∩⋯∩En−1)ℙ(E1∩⋯∩En−1).

◻

Remark.

  • It is also known as chain rule of probability.

Example. Consider an urn that contains 20 distinguishable balls, where 5 of them is red, 6 of them is blue, 7 of them is green, and 2 of them is purple. Suppose we draw 5 balls from the urn.

(a) Calculate the probability of drawing 3 red balls and 2 blue balls from the urn, if the draw is done without replacement.

(b) Calculate the probability of drawing 3 red balls and 2 blue balls from the urn, if the draw is done with replacement.

Solution.

Let Ri,Bj be the event that red ball is drawn in i-th draw, and blue ball is drawn in j-th draw respectively.

(a) The desired probability can be expressed as ℙ(R1∩R2∩R3∩B4∩B5) (or ℙ(R1∩B2∩R3∩R4∩B5), etc., but simply changing the order does not affect the probability in this case).

Method 1: Combinatorial probability. Let Ω be the sample space that contains all possible outcomes of the 5 ordered draws. The probability is ℙ(R1∩R2∩R3∩B4∩B5)=|R1∩R2∩R3∩B4∩B5||Ω|=5×4×3×6×520×19×18×17×16≈0.0009674923.


Method 2: Multiplication rule. Then, the probability is given by ℙ(R1∩R2∩R3∩B4∩B5)=ℙ(R1)ℙ(R2|R1)ℙ(R3|R1∩R2)ℙ(B4|R1∩R2∩R3)ℙ(B5|R1∩R2∩R3∩B4)=520×419×318×617×516≈0.0009674923. (For example, ℙ(R2|R1)=419 since the sample space is updated from the set containing 20 balls, to the set containing 19 balls, excluding the ball drawn out in the first draw, and also there are only four (valid) sample points (four red balls remaining) in R2 in this updated sample space. Here, the initial sample space contains the 20 possible outcomes from drawing a ball from the urn.)

(b) By the multiplication rule, the probability is given by ℙ(R1∩R2∩R3∩B4∩B5)=ℙ(R1)ℙ(R2|R1)ℙ(R3|R1∩R2)ℙ(B4|R1∩R2∩R3)ℙ(B5|R1∩R2∩R3∩B4)=ℙ(R1)ℙ(R2)ℙ(R3)ℙ(B4)ℙ(B5)=(520)3(620)2=0.00140625. (The conditional probabilities are the same as the unconditional probabilities, since even the sample space is updated according to the conditions, there are not any changes at all! (since the draws are done with replacement) In fact, the outcome of a draw is not affected by the outcomes of other draws. Actually, it turns out that these events (R1,R2,R3,B4,B5) are (statistically) independent. We will discuss the formal definition of independence in more details in a later section. )

Two important theorems related to conditional probability, namely law of total probability and Bayes' theorem, will be discussed in the following section.

Law of total probability and Bayes' theorem

[edit | edit source]

Sometimes, it is not an easy task to assign a suitable unconditional probability to an event. For instance, suppose Amy will perform a COVID-19 test, and the result is either positive or negative (impossible to have invalid results). Let P={Amy tests positive at the COVID-19 test}. What should be ℙ(P)? It is actually quite difficult to answer directly, since this probability is without any condition. In particular, it is unknown that whether Amy gets infected by COVID-19 or not, and clearly the infection will affect the probability assignment quite significantly.

On the other hand, it may be easier to assign/calculate related conditional/unconditional probabilities. Now, let I={Amy gets infected by COVID-19}. The conditional probability ℙ(P|I), called sensitivity, may be known based on the research on the COVID-19 test. Also, the conditional probability ℙ(Pc|Ic), called specificity, may also be known based on the research. Besides, the probability ℙ(I) may be obtained according to studies on COVID-19 infection for Amy's place of living. Since ℙ(P)=ℙ(P∩I)+ℙ(P∩Ic), by the definition of conditional probability, we have ℙ(P)=ℙ(P|I)ℙ(I)+ℙ(P|Ic)ℙ(Ic). Since the conditional probability satisfies the probability axioms, we have the relation ℙ(P|Ic)=1−ℙ(Pc|Ic), and thus the value of ℙ(P|Ic) can be obtained. The remaining terms in the expression can also be obtained, as suggested by above. Thus, we can finally obtain the value of ℙ(P).

This shows that conditional probabilities can be quite helpful for calculating unconditional probabilities, especially when we condition appropriately so that the conditional probabilities, and the probability of the condition are known in some ways.

The following theorem is an important theorem that relates unconditional probabilities and conditional probabilities, as in above discussion.

Theorem. (Law of total probability)

An illustration of law of total probability.

Let (Ω,ℱ,ℙ) be a probability space.

  • (finite case) Assume that B1,B2,…,Bn∈ℱ are pairwise disjoint events such that ℙ(B1),ℙ(B2),…,ℙ(Bn)>0 and A⊆B1∪B2∪⋯∪Bn. Then,

ℙ(A)=ℙ(A|B1)ℙ(B1)+ℙ(A|B2)ℙ(B2)+⋯+ℙ(A|Bn)ℙ(Bn).

  • (countably infinite case) Assume that B1,B2,…∈ℱ are pairwise disjoint events such that ℙ(B1),ℙ(B2),…>0 and A⊆B1∪B2∪⋯. Then,

ℙ(A)=ℙ(A|B1)ℙ(B1)+ℙ(A|B2)ℙ(B2)+⋯.

Proof. Here we only prove the finite case. The proof for countably infinite case is similar and thus left as an exercise.

Under the assumptions, B1,B2,…,Bn are pairwise disjoint, and thus A∩B1,A∩B2,…,A∩Bn are also pairwise disjoint (by observing that (A∩B1)∩(A∩B2)=A∩(B1∩B2)=A∩∅=∅, and other intersections have similar results). Also, since ℙ(B1),ℙ(B2),…,ℙ(Bn)>0, the conditional probabilities ℙ(⋅|B1),ℙ(⋅|B2),…,ℙ(⋅|Bn) are defined. Moreover, since A⊆B1∪B2∪⋯∪Bn, we can observe that A=(A∩B1)∪(A∩B2)∪⋯∪(A∩Bn) (through Venn diagram, informally). It follows that ℙ(A)=ℙ((A∩B1)∪(A∩B2)∪⋯∪(A∩Bn))=ℙ(A∩B1)+ℙ(A∩B2)+⋯+ℙ(A∩Bn)(finite additivity)=ℙ(A|B1)ℙ(B1)+ℙ(A|B2)ℙ(B2)+⋯+ℙ(A|Bn)ℙ(Bn).(definition)

◻

Clipboard

Exercise. Prove the countably infinite case for law of total probability.

Proof

Proof. Under the assumptions, B1,B2,…, are pairwise disjoint, and thus A∩B1,A∩B2,… are also pairwise disjoint (by observing that (A∩B1)∩(A∩B2)=A∩(B1∩B2)=A∩∅=∅, and other intersections have similar results). Also, since ℙ(B1),ℙ(B2),…>0, the conditional probabilities ℙ(⋅|B1),ℙ(⋅|B2),… are defined. Moreover, since A⊆B1∪B2∪⋯, we can observe that A=(A∩B1)∪(A∩B2)∪⋯ (through Venn diagram, informally). It follows that ℙ(A)=ℙ((A∩B1)∪(A∩B2)∪⋯)=ℙ(A∩B1)+ℙ(A∩B2)+⋯(countable additivity)=ℙ(A|B1)ℙ(B1)+ℙ(A|B2)ℙ(B2)+⋯.(definition)

◻


Now, suppose Amy has performed a COVID-19 test, and the result is positive! So now Amy is worrying about whether she really gets infected by COVID-19, or it is just a false positive. Therefore, she would like to know the conditional probability ℙ(I|P) (the conditional probability for getting infected given testing positive). Notice that the conditional probability ℙ(P|I) may be known (based on some research). However, it does not equal the conditional probability ℙ(I|P) generally. (These two probabilities are referring to two different things.) So, now we are interested in knowing that whether there is formula that relates these two probabilities, which have somewhat "similar" expressions. See the following exercise for deriving the relationship between ℙ(A|B) and ℙ(B|A):

Clipboard

Exercise. Let (Ω,ℱ,ℙ) be a probability space, and A,B∈ℱ be events. Assume ℙ(A)>0 and ℙ(B)>0. Propose a relationship between ℙ(A|B) and ℙ(B|A), and prove it. (Hint: You may apply the definition of conditional probability on each of these two conditional probabilities. Do you notice any similarity in the expressions?)

Solution

Proposition: ℙ(A|B)=ℙ(B|A)ℙ(A)ℙ(B).

Proof. Applying the definition of conditional probability, we have ℙ(A|B)=ℙ(A∩B)ℙ(B), and ℙ(B|A)=ℙ(A∩B)ℙ(A). Notice that these two expressions have the same numerator. Thus, we have ℙ(A|B)ℙ(B)=ℙ(B|A)ℙ(A). Rearranging the equation yields the desired result (the rearrangement is valid since ℙ(A) and ℙ(B) are nonzero).

◻

Remark.

  • ℙ(A) is known as the prior probability of event A. It is called prior since this probability does not take into account the knowledge of the occurrence of event B. It reflects our initial degrees of belief of event A (according to the subjectivism interpretation of probability).
  • ℙ(A|B) is known as the posterior probability of event. It is called posterior since this probability takes into account the knowledge of the occurrence of event B. It reflects our adjusted degrees of belief of event A as there are more new information (the occurrence of event B in this case) (according to the subjectivism interpretation of probability).
  • This formula suggests us the way of adjusting/updating the prior probability ℙ(A) to the posterior probability ℙ(A|B).
  • Of course, after obtaining the posterior probability, there may be another round of new information available, and we may need to treat this "posterior probability" as the "prior probability", and update it to a "new version" of posterior probability.


The following theorem is the generalization of the above result.

Theorem. (Bayes' theorem)

An illustration of Bayes' theorem.

Let (Ω,ℱ,ℙ) be a probability space.

  • (finite case) Assume that B1,B2,…,Bn∈ℱ are pairwise disjoint events such that ℙ(B1),ℙ(B2),…,ℙ(Bn)>0 and A⊆B1∪B2∪⋯∪Bn. Then,

ℙ(Bi|A)=ℙ(A|Bi)ℙ(Bi)ℙ(A|B1)ℙ(B1)+ℙ(A|B2)ℙ(B2)+⋯+ℙ(A|Bn)ℙ(Bn)

for every i=1,2,…, or n.
  • (countably infinite case) Assume that B1,B2,…∈ℱ are pairwise disjoint events such that ℙ(B1),ℙ(B2),…>0 and A⊆B1∪B2∪⋯. Then,

ℙ(Bi|A)=ℙ(A|Bi)ℙ(Bi)ℙ(A|B1)ℙ(B1)+ℙ(A|B2)ℙ(B2)+⋯

for every i∈ℕ.

Proof.

Finite case: Under the assumptions, we have by law of total probability ℙ(A)=ℙ(A|B1)ℙ(B1)+ℙ(A|B2)ℙ(B2)+⋯+ℙ(A|Bn)ℙ(Bn). On the other hand, by the definition of conditional probability, ℙ(A∩Bi)=ℙ(A|Bi)ℙ(Bi). Since ℙ(Bi|A)=ℙ(A∩Bi)ℙ(A) by the definition of conditional probability, the result follows.

Countably infinite case: Under the assumptions, we have by law of total probability ℙ(A)=ℙ(A|B1)ℙ(B1)+ℙ(A|B2)ℙ(B2)+⋯. On the other hand, by the definition of conditional probability, ℙ(A∩Bi)=ℙ(A|Bi)ℙ(Bi). Since ℙ(Bi|A)=ℙ(A∩Bi)ℙ(A) by the definition of conditional probability, the result follows.

◻

Example. Suppose the weather at a certain day can either be sunny or rainy, with equal probability. Amy has a probability of 0.8 (0.3) to bring an umbrella at that day if the weather of that day is rainy (sunny). At a day, we see that Amy brings an umbrella. Calculate the probability for that day to be rainy.

Solution. Let R,S,U be the events that the weather at that day is rainy, sunny and Amy brings an umbrella at that day respectively. Then, the probability that Amy brings an umbrella at that day is ℙ(U)=ℙ(U|R)ℙ(R)+ℙ(U|S)ℙ(S)=0.8⋅0.5+0.3⋅0.5=0.55. by law of total probability.

Given that Amy brings an umbrella at that day, the probability for that day to be rainy is ℙ(R|U)=ℙ(U|R)ℙ(R)ℙ(U)=0.8⋅0.50.55=811 (by Bayes' theorem).

Clipboard

Exercise. Assume that the weather can also be cloudy, such that the weather is twice as likely to be cloudy compared with sunny (or rainy). (That is, the probability for the weather to be cloudy is twice of the probability for the weather to be sunny (which equals the probability for the weather to be rainy).) Also, Amy has a probability p to bring an umbrella at a day if the weather of that day is cloudy. Calculate p such that the probability for a day to be rainy if Amy brings an umbrella at that day is 411 instead of 811. (Answer:1120)

Solution

Let C be the event that the weather is cloudy. Since the weather is twice as likely to be cloudy compared with sunny (or rainy) and also the weather can either be sunny, rainy, or cloudy, it follows that ℙ(C)=2ℙ(R)=2ℙ(S)⟹2ℙ(R)+ℙ(R)+ℙ(S)=1⟹ℙ(R)=ℙ(S)=0.25 and ℙ(C)=0.5. So, ℙ(U)=0.8⋅0.25+0.3⋅0.25+p⋅0.5=0.5p+0.275. We want to set the value of p such that the probability ℙ(R|U)=411. Hence, ℙ(U|R)ℙ(R)ℙ(U)=811⟹0.8⋅0.250.5p+0.275=411⟹p=1120.


Example. Consider Morse code where dots and dashes are used to encode messages. Suppose Amy and Bob want to communicate through Morse code. However, when Amy sends a Morse code to Bob, there is interference during the transmission, and hence there is a 18 probability for a dot (or dash) to be mistakenly received as a dash (or dot resp.). It is known that the dots and dashes are used in proportion 3:4 in the Morse code. From this, we may assume that the probability for a dot and dash to be sent is 37 and 47 respectively. Calculate the probability that a dot is really sent by Amy if Bob receives a dot.

Solution.

Let S and R be the event that a dot is sent and a dot is received respectively.

Then, we have ℙ(Rc|S)=ℙ(R|Sc)=18. Furthermore, we have ℙ(S)=37 and ℙ(Sc)=47. Then, we have ℙ(R)=ℙ(R|S)ℙ(S)+ℙ(R|Sc)ℙ(Sc)=(1−18)⋅37+18⋅47=2556. It follows that the desired probability is given by ℙ(S|R)=ℙ(R|S)ℙ(S)ℙ(R)=(1−1/8)(3/7)25/56=2125.

Example. Suppose a diagnosis for cancer is conducted for Bob. Let C be the event that Bob has cancer, and D be the event that Bob is diagnosed with cancer. Based on research, it is known that the probability for a correct diagnosis is 0.99. That is, ℙ(D|C)=0.99 and ℙ(Dc|Cc)=0.99. Based on the research on the incidence rate of cancer for the Bob's place of living, we may assume that ℙ(C)=0.001. Calculate the probability that Bob has cancer if he is diagnosed with cancer.

Solution. The desired probability is given by ℙ(C|D). First, ℙ(D)=ℙ(D|C)ℙ(C)+ℙ(D|Cc)⏟1−ℙ(Dc|Cc)ℙ(Cc)=0.99(0.001)+(1−0.99)(1−0.001)=0.01098. We have ℙ(C|D)=ℙ(D|C)ℙ(C)ℙ(D)=ℙ(D|C)ℙ(C)0.01098=0.99(0.001)0.01098≈0.0902.

Remark.

  • This result is quite counter-intuitive, since it appears that the probability for a correct diagnosis is quite high, but it turns out that this probability is quite low!
  • The main reason for this result is that the incidence rate of cancer is quite low.
Clipboard

Exercise. Calculate the probability that Bob does not have cancer if he is not diagnosed with cancer. (Answer: approximately 0.99999)

Solution

The desired probability is given by ℙ(Cc|Dc). We have ℙ(Cc|Dc)=ℙ(Dc|Cc)ℙ(Cc)ℙ(Dc)=0.99(1−0.001)1−0.01098≈0.99999. So, if Bob is not diagnosed with cancer, then he can be quite sure that he actually does not have cancer.


The following is a famous problem.

Example. (Monty Hall problem)

A graphical illustration of the situation

Suppose you are on a game show. There are three doors in front of you, labelled door 1,2,3, and you are allowed to open one of them. Among these three doors, a new car is behind one of the doors, and a goat is behind the other doors. If you open the door with a car behind it, then you will get the car. Otherwise, you get nothing.

Now, suppose you pick the door 1. Then the host Monty Hall, who knows what are behind the three doors, opens a door with a goat behind it (which is not chosen by you, of course). It turns out that Monty Hall opens door 3. After that, you are given an offer where you can keep choosing door 1, or switch your choice to door 2.

With these information, calculate the probability that the new car is behind door 2.

Solution.

Let D1,D2,D3 be the event that a car is behind door 1,2,3 respectively. Also, let M be the event that Monty Hall opens door 3. It should be reasonable to assume that a car is equally likely to be behind one of the doors. So, we have ℙ(D1)=ℙ(D2)=ℙ(D3)=13. Now, we consider different conditional probabilities related to M, by considering three different cases:

  • Case 1: The car is behind door 1. Then, Monty Hall can open door 2 and 3, and it is reasonable to assume that it is equally likely for him to open one of them. Hence, the conditional probability ℙ(M|D1)=12.
  • Case 2: The car is behind door 2. Then, Monty Hall must open door 3 (since this is the only choice). Hence, the conditional probability ℙ(M|D2)=1.
  • Case 3: The car is behind door 3. Then, Monty Hall can never open door 3 (where a car is behind it). Hence, the conditional probability ℙ(M|D3)=0.

The desired probability is given by ℙ(D2|M)=ℙ(M|D2)ℙ(D2)ℙ(M|D1)ℙ(D1)+ℙ(M|D2)ℙ(D2)+ℙ(M|D3)ℙ(D3)=(1)(1/3)(1/2)(1/3)+(1)(1/3)+(0)(1/3)=23.

Remark.

  • Clearly, ℙ(D3|M)=0 since it is impossible for the car to be behind door 3 if Monty Hall opens door 3. It follows that ℙ(D1|M)=1−ℙ(D1c|M)=1−ℙ(D2|M)=13<23=ℙ(D2|M). Thus, it is favourable for you to switch your choice to door 2.
Clipboard

Exercise. 1. A student thinks that the probability should be 12 with the following argument:

After Monty Hall opens door 3, we know that a goat is behind it. This means a car is not behind door 3. Then, it is equally likely for the car to be behind one of door 1 and door 2. Hence, the probability is 12.

What is the mistake in this argument?

Solution

The mistake is that a wrong event is conditioned on for the above argument. To be more precise, through this reasoning the probability calculated is actually ℙ(D1|D3c)=ℙ(D1∩D3c)⏞ℙ(D1)∵D1⊆D3cℙ(D3c)=ℙ(D1)1−ℙ(D3)=1/31−1/3=12. But D3c≠M. Particularly, when the car is not behind door 3, this does not mean Monty Hall must open door 3. It is possible that the car is behind door 1, where Monty Hall can open door 2 as well.

2. Suppose there are N−3>0 more doors in addition to the doors 1,2,3, labelled door 4,5,...,N, such that there are N doors in total. In this case, Monty Hall opens N−2 doors where a goat is behind each of them. It turns out that Monty Hall opens doors 3,4,...,N. Now, you are given an offer where you can keep choosing door 1, or switch your choice to door 2. Calculate the probability that the car is behind door 2. (Answer: N−1N)

Solution

Let D1,D2,D3,…,DN be the event that a car is behind door 1,2,3,...,N respectively. Also, let M be the event that Monty Hall opens doors 3,4,...,N. It should be reasonable to assume that a car is equally likely to be behind one of the doors. So, we have ℙ(D1)=ℙ(D2)=⋯=ℙ(DN)=1N. In this situation, we have N cases.

  • Case 1: The car is behind door 1. Monty can then open N−1 of the doors 2,3,...,N (or equivalently, choose one of the doors 2,3,...,N to not open). We know that the event M means Monty Hall chooses door 2 to not open. Thus, the probability is ℙ(M|D1)=1N−1.
  • Case 2: The car is behind door 2. Monty Hall must then open of the doors 3,4,...,N. Thus, the probability is ℙ(M|D2)=1.
  • Case 3: The car is behind door 3. Then, Monty Hall must not open door 3, and hence must not open doors 3,4,...,N. Thus, the probability is ℙ(M|D3)=0

With similar arguments, we have ℙ(M|D4)=ℙ(M|D5)=⋯=ℙ(M|DN)=0. It follows that the desired probability is ℙ(D2|M)=ℙ(M|D2)ℙ(D2)ℙ(M|D1)ℙ(D1)+ℙ(M|D2)ℙ(D2)+⋯+ℙ(M|DN)ℙ(DN)=(1)(1/N)(1/(N−1))(1/N)+(1)(1/N)+0=1/N(1/N)(1/(N−1)+1)=1(1+N−1)/(N−1)=N−1N.


Remark.

  • For other cases in which another door is picked, the same result holds by symmetry (notations can be changed).

Example. (Gambler's ruin) Consider a gambling game as follows. The player starts with capital $k (k is a nonnegative integer and is specified by the player), and tosses a fair coin repeatedly until he wants to stop. If head comes up, then he gains $1. If tail comes up, then he loses $1.

Suppose Bob plays this game and decides to stop tossing when one of the following conditions are satisfied:

  1. He runs out of money. (That is, his capital is $0.)
  2. His capital is $N, where N is a certain nonnegative integer specified by Bob.

Calculate the probability that Bob will eventually run out of all money if he starts with capital $k.

Solution. In this case, we should calculate the probability using recursive approach. First, let Ak be the event that Bob will eventually run out of all money if he starts with capital $k. Also, let B be the event that head comes up in the first toss.

Then, a crucial observation is that if the first toss gives a head, then the situation is exactly the same as that Bob starts playing the game with capital $k+1 after the toss where he gains $1. Hence, we have ℙ(Ak|B)=ℙ(Ak+1). Likewise, we have ℙ(Ak|Bc)=ℙ(Ak−1). (This is often the most important step for solving a problem recursively: identifying the recursive relation given (usually implicitly) in the question.)

Then, we can establish the equation ℙ(Ak)=ℙ(Ak|B)⏟ℙ(Ak+1)ℙ(B)+ℙ(Ak|Bc)⏟ℙ(Ak+1)ℙ(Bc)=12ℙ(Ak+1)+12ℙ(Ak−1)⟹2ℙ(Ak)=ℙ(Ak+1)+ℙ(Ak−1)⟹ℙ(Ak−1)−ℙ(Ak)=ℙ(Ak)−ℙ(Ak+1), which holds for every k=1,2,…,N−1 (we do not include 0 and N since these are boundary values). Notice that we have ℙ(A0)=1 (since Bob immediately runs out of money if he starts with zero capital). On the other hand, we have ℙ(AN)=0 (since Bob immediately stops playing the game if he starts with capital $N, so it is impossible for him to run out of money).

Notice that the above equation implies that the decrement of the probability ℙ(Ai) when i increases by one is the same for every i=0,1,2,…,N−1. Since there are in total N decrements, it follows that every decrement is of value 1N. Hence, ℙ(Ak)=ℙ(A0)−1N−1N−⋯−1N⏟k decrements=1−kN.

Clipboard

Exercise. Suppose Bob is so greedy that N→∞. Under this case, what does the probability tend to (that is, what is the limit of the above probability as N→∞)? Suggest an intuitive meaning of this result.

Solution

Since limN→∞(1−kN)=1, it follows that the probability (1−kN) tends to 1 as N→∞. This means Bob will inevitably run out of all money if he is extremely greedy and never wants to stop at any fixed value of N. This result is known as the Gambler's ruin.


Example. Player A and B take turn to roll a fair dice, where player A rolls the dice first. A player wins if he is the first player that rolls a six. Calculate the probability that player A wins.

Solution. We divide the situation into three cases:

  1. Player A rolls a six in the first roll. (probability 16) In this case, player A wins.
  2. Player A does not roll a six in the first roll, and then player B rolls a six in the second roll. (probability 56×16 . This can be obtained by considering multiplication rule of probability. We can see that the probability for player B to roll a six in the second roll given that player A does not roll a six in the first roll is 1/6.) But in this case, the probability for player A to win is zero anyway.
  3. Player A and B does not roll a six in the first and second roll respectively. (probability 56×56)

Notice that in case 3, the situation is exactly the same as the original situation at the beginning where it is player A's turn to roll the dice. Hence, under the condition for case 3, the probability for player A to win is the same as the unconditional one.

Thus, we can write ℙ(A wins)=16+56×56×ℙ(A wins)⟹ℙ(A wins)=611.

Remark.

  • Notice that eventually, one of the players must roll a six. Hence, it is impossible for the game to end up with a draw. This means the probability that player B wins is 1−611=511.
Clipboard

Exercise. Suppose the dice is changed such that the probability for getting a six from rolling the dice is p∈(0,1) (which is not necessarily 16), while the player A still rolls the dice first. Show that the game is always favourable to player A for every p∈(0,1).

Solution

Proof. When the probability is p, we can write the above equation as ℙ(A wins)=p+(1−p)2ℙ(A wins)⟹ℙ(A wins)=p1−(1−p)2. Thus, the probability that player B wins is ℙ(B wins)=1−p1−(1−p)2. We have ℙ(A wins)−ℙ(B wins)=p1−(1−p)2−1+p1−(1−p)2=2p1−(1−p)2−1=2p−1+1−2p+p21−(1−p)2=p21−(1−p)2. Notice that p2>0 and (1−p)2<1⟹1−(1−p)2>0 for every p∈(0,1). Hence, this difference is always positive, and hence ℙ(A wins)>ℙ(B wins) always for every p∈(0,1).

◻



Example. (Three Prisoners problem) There are three prisoners, A, B and C, which will originally be executed tomorrow. However, the governor chooses one of them randomly to be pardoned (and hence not executed). Only the warden knows who is to be pardoned, but is not allowed to tell the prisoners.

The three prisoners have also heard about this. So, prisoner A asks the warden

Which of the prisoners B and C will be executed? If both are to be executed, then just tell me randomly one of them.

The warden thinks a while, and tells the prisoner A that prisoner B is to be executed. The warden thinks that he does not give any information to prisoner A about whether he is to be pardoned or not, with the following reasoning:

Let A,B,C be the events that A, B, or C is pardoned respectively. Also, let W be the event that the warden says B will die. Since the prisoner to be pardoned is chosen randomly, we have ℙ(A)=ℙ(B)=ℙ(C)=13. After prisoner A hears the answer from warden, the conditional probability for him to be pardoned is ℙ(A|W)=ℙ(A∩W)ℙ(W)=ℙ(W|A)ℙ(A)ℙ(W|A)ℙ(A)+ℙ(W|B)ℙ(B)+ℙ(W|C)ℙ(C)=(1/2)(1/3)(1/2)(1/3)+(0)(1/3)+(1)(1/3)=13. So, this probability is the same as the unconditional one.

However, prisoner A thinks that his probability of being pardoned is increased to 12 with the following reasoning:

Given that prisoner B will be executed, either prisoner A or C will be pardoned. Hence, my probability of being pardoned is 12.

Explain why the prisoner A's reasoning is incorrect.

Solution. Prisoner A falsely interprets the warden's saying as the event Bc, and he calculates ℙ(A|Bc)=ℙ(A∩Bc)ℙ(Bc)=ℙ(Bc|A)ℙ(A)1−ℙ(B)=(1)(1/3)2/3=12. But Bc is not the same as W! Particularly, if B is not to be pardoned (that is, to be executed), then the warden will not necessarily tell that prisoner B is to be executed, since it is possible that C is also to be pardoned, and the warden tells C is to be executed instead.

Clipboard

Exercise. Suppose prisoner A tells the other two prisoners about the answer from the warden to his question.

(a) What is the probability that prisoner B is to be pardoned?

(b) What is the probability that prisoner C is to be pardoned?

Solution

Let us use the notations as defined by the warden's answer.

(a) The probability is ℙ(B|W)=ℙ(B∩W)ℙ(W)=ℙ(W|B)ℙ(B)ℙ(W)=0(1/3)ℙ(W)=0. That is, prisoner B knows that he must be executed!

(b) The probability is ℙ(C|W)=ℙ(C∩W)ℙ(W)=ℙ(W|C)ℙ(C)ℙ(W)=(1)(1/2)(1/2)(1/3)+(0)(1/3)+(1)(1/3)=23. That is, prisoner C knows that he is twice as likely as before to be pardoned!

Remark.

  • From this, we actually know that the warden can give information to the prisoners about whether they are pardoned or not through his answer, if any of the prisoners B and C knows about this.



Independence

[edit | edit source]

From the previous discussion, we know that the conditional probability of event A given the occurrence of event B can be interpreted as the probability of A where the sample space is updated to event B. In general, through this update, the probability of A should be affected. But what if the probability is somehow the same as the one before the update?

If this is the case, then the occurrence of a particular event B does not affect the probability of event A actually. Symbolically, it means ℙ(A|B)=ℙ(A). If this holds, then we have ℙ(B|A)=ℙ(A|B)ℙ(B)ℙ(A)=ℙ(A)ℙ(B)ℙ(A)=ℙ(B). This means the occurrence of event A also does not affect the probability of event B. This result matches with our intuitive interpretation of the independence of two events, so it seems that it is quite reasonable to define the independence of events A and B as follows:

Two events A and B are independent if ℙ(A|B)=ℙ(A) or ℙ(B|A)=ℙ(B).

However, this definition has some slight issues. If ℙ(A)=0 or ℙ(B)=0, then some of the conditional probabilities involved may be undefined. So, for some events, we may not be able to tell whether they are independent or not using this "definition". To deal with this, we consider an alternative definition, that is equivalent to the above when ℙ(A)≠0 and ℙ(B)≠0. To motivate that definition, we can see that ℙ(A|B)=ℙ(A) or ℙ(B|A)=ℙ(B)⟺ℙ(A∩B)=ℙ(A)ℙ(B), when both ℙ(A) and ℙ(B) are nonzero. This results in the following definition:

Definition. (Independence of two events) Let (Ω,ℱ,ℙ) be a probability space, and A,B∈ℱ be two events. Then, the events A and B are independent if ℙ(A∩B)=ℙ(A)ℙ(B).

Remark.

  • We sometimes write A⊥⊥B when A and B are independent.

But what if there are more than two events involved? Intuitively, we may consider the following as the general "definition" of independence:

The events E1,E2,…,En are independent if ℙ(E1∩E2∩⋯∩En)=ℙ(E1)ℙ(E2)⋯ℙ(En). (n is an integer that is at least 2.)

But we will get some strange results by using this as the "definition":

Example. Suppose we roll a dice twice. Let A be the event that both rolls result in the same number, B be the event that sum of the numbers obtained is between 7 and 10, C be the event that the sum is 7 or 8 or 12. Show that ℙ(A∩B∩C)=ℙ(A)ℙ(B)ℙ(C) (that is, the events A,B,C are "independent" according to the above "definition") but ℙ(B∩C)≠ℙ(B)ℙ(C) (that is, the events B and C are not independent).

Proof. First, we have ℙ(A)=636=16, ℙ(B)=6+5+4+336=1836=12, and ℙ(C)=6+5+136=1236=13. Hence, we have ℙ(A∩B∩C)=ℙ({4 is obtained for both rolls})=136=16×12×13=ℙ(A)ℙ(B)ℙ(C). But, ℙ(B∩C)=ℙ(the sum is 7 or 8)=6+536=1136≠ℙ(B)ℙ(C)=12×13=16.

◻


From this example, merely requiring ℙ(E1∩E2∩⋯∩En)=ℙ(E1)ℙ(E2)⋯ℙ(En) cannot ensure all pairs of events involved are independent. So, this suggests us another definition:

The events E1,E2,…,En are independent if all the pairs of events involved are independent.

However, we will again get some strange results by using this as the "definition":

Example. Consider two balls, where one is bigger than another. Both balls are equally likely to be red or blue. Let A be the event that the bigger ball is red, B be the event that the smaller ball is red, and C be the event that both balls have the same color.

Show that all the pairs of events involved are independent, but ℙ(C∩A∩B)≠ℙ(C)ℙ(A∩B)=ℙ(C)ℙ(A)ℙ(B) (that is, the events C and A∩B are not independent.)

Proof. Consider the following tables containing relevant probabilities: bigger ball∖smaller ballredbluered1/4(✓A✓B✓C)1/4(✓A)blue1/4(✓B)1/4(✓C) From this, we can see that ℙ(A)=ℙ(B)=ℙ(C)=12. On the other hand, ℙ(A∩B)=ℙ(B∩C)=ℙ(A∩C)=ℙ({both balls are red})=14=(12)2. So, this means all the pairs of events involved are independent.

However, ℙ(C∩A∩B)=ℙ({both balls are red})=14≠ℙ(C)ℙ(A∩B)=ℙ(C)ℙ(A)ℙ(B)=18. (Actually, we have ℙ(C|A∩B)=1. This means given the occurrence of both events A and B, we know for sure that the event C occurs. So, the knowledge of the occurrence of both events A and B affect the probability of event C, although the probability of event C is not affected by merely the occurrence of A or merely the occurrence of B. )

◻


The above examples suggest us that we actually need both requirements

  1. ℙ(A∩B∩C)=ℙ(A)ℙ(B)ℙ(C). (This ensures ℙ(C|A∩B)=ℙ(C),ℙ(A|B∩C)=ℙ(A) and ℙ(B|A∩C)=ℙ(B). That is, if we condition on the intersection of two events, the probability of another one is not affected.)
  2. All the pairs of events A,B,C are independent. (That is, ℙ(A∩B)=ℙ(A)ℙ(B),ℙ(B∩C)ℙ(B)ℙ(C) and ℙ(A∩C)=ℙ(A)ℙ(C).

in the definition of independence of events A,B,C for the definition to "make sense".

Similarly, the independence of four events A,B,C,D should require

  1. ℙ(A∩B∩C∩D)=ℙ(A)ℙ(B)ℙ(C)ℙ(D).
  2. All the triples of events are independent.
  • In other words, we need the probability of intersection of any three and any two events to be able to "split as product of probabilities of single events" as in above.

This leads us to the following general definition:

Definition. (Independence) Let (Ω,ℱ,ℙ) be a probability space, and E1,E2,…∈ℱ be events. Then, the events E1,E2,… are (mutually) independent if ℙ(⋂i∈IEi)=∏i∈Iℙ(Ei) for every finite index set I⊆{1,2,…}.

Remark.

  • This definition also applies to finitely many events E1,E2,…,En∈ℱ, where the index set I is a subset of {1,2,…,n} instead.
  • If all the pairs of events involved are independent, then we say that E1,E2,…,En are pairwise independent. By definition, the mutual independence of E1,E2,…,En implies their pairwise independence (we just consider the index set with two elements in this case). But, the converse does not hold (discussed in a previous example).
  • Sometimes, based on the situation, two events may be assumed to be independent.

Example. Suppose Amy and Bob take turn to toss a fair coin, where Amy toss the coin first. Let H1 and H2 be the events that head comes up in the first and second toss respectively. Calculate the probability ℙ(H1∩H2).

Solution. It is reasonable to assume that H1 and H2 are independent. Hence, ℙ(H1∩H2)=ℙ(H1)ℙ(H2)=(12)2=14. (Alternatively, one may also reasonably assume that the four outcomes arising from these two tosses are equally likely, and hence conclude that ℙ(H1∩H2)=14.)

Example. Suppose a fair coin is tossed 10 times independently. Which of the following outcomes is more likely? (H represents head and T represents tail)

  1. HHHHHHHHHT
  2. HTTHTHHTHT

Solution. The probability for each of these outcomes is (12)10=0.0009765625. So, they are equally likely.

Remark.

  • One may falsely think that the second outcome is more likely, since it seems the heads and tails are distributed more "equally". The reasoning behind this may be one falsely interpret the second outcome to be the same as "5 heads and 5 tails" (without specifying the order). But this is not the case: the second one specifies the outcome required in every toss.
Clipboard

Exercise. Calculate the probability that 5 heads and 5 tails are obtained in these 10 tosses. (Answer: approximately 0.246) (Hint: consider the number of different arrangements of 5 heads and 5 tails in these 10 tosses.)

Solution

We can regard the 10 tosses as 10 distinguishable cells with capacity one, and 5 "heads" to be 5 indistinguishable balls. Then, the process of arranging the outcomes is equivalent to placing the 5 balls into the 10 cells (the 5 empty cells are for "tails"). Hence, the number of arrangements is given by (105)=252. Notice that every such arrangement is a sample point in the sample space (for the experiment of tossing a coin 10 times), and the probability of every singleton event is (12)10. It follows that the desired probability is (12)10+(12)10+⋯+(12)10⏟252 times≈0.246.


Example. Let (Ω,ℱ,ℙ) be a probability space, and A,B∈ℱ be events. Show that if the events A and B are independent, then so is the events A and Bc.

Proof. Assume that the events A and B are independent. We wish to show that ℙ(A∩Bc)=ℙ(A)ℙ(Bc).

We have ℙ(A∩Bc)=ℙ(A)−ℙ(A∩B)(a property)=ℙ(A)−ℙ(A)ℙ(B)(independence of A and B)=ℙ(A)(1−ℙ(B))=ℙ(A)ℙ(Bc).(a property) So, the events A and Bc are independent.

◻

Clipboard

Exercise. Show that if the events A and B are independent,

(a) then so is the events Ac and B.

(b) then so is the events Ac and Bc.

Solution
(a)

Proof. Assume that the events A and B are independent. Then, ℙ(Ac∩B)=ℙ(B)−ℙ(A∩B)(a property)=ℙ(B)−ℙ(A)ℙ(B)(independence of A and B)=ℙ(B)(1−ℙ(A))=ℙ(B)ℙ(Ac).(a property) So, the events Ac and B are independent.

◻

Remark.

  • Actually, this result is symmetric to the one in the example above.
(b)

Proof. Assume that the events A and B are independent. Then, by (a) in this exercise, Ac and B are independent. It follows by the result in the example above that Ac and Bc are independent. (Take "A" in the example above to be Ac.)

◻



In general, we have the following result.

Proposition. Let (Ω,ℱ,ℙ) be a probability space, and E1,E2,…,En∈ℱ be events (where n is an arbitrary integer such that n≥2). If E1,E2,…,En are independent, then after replacing some of the events by their respective complements, the independence still holds.

Proof. Assume that the events E1,E2,…,En are independent. Then, we have ℙ(⋂i=1nEi)=∏i=1nℙ(Ei). Now, suppose we replace E1 by E1c, and we want to prove that the independence still holds: ℙ(E1c∩⋂i=2nEi)=ℙ(⋂i=2nEi)−ℙ(E1∩⋂i=2nEi)(a property)=∏i=2nℙ(Ei)−ℙ(E1)∏i=2nℙ(Ei)(independence of E1,E2,…,En)=∏i=2nℙ(Ei)(1−ℙ(E1))=∏i=2nℙ(Ei)ℙ(E1c). Thus, E1c,E2,…,En are still independent. By symmetry, we can instead replace an event other than E1 by its respective complement, and the independence still holds.

Notice that we can split the process of replacing some of the events into multiple steps, where we replace one event in every step (that is, we replace the events one by one). Now, we can apply the above argument in each step to ensure that the resulting events are still independent. Thus, after all steps, and we finish the replacement, the independence still holds.

◻

Example. Let (Ω,ℱ,ℙ) be a probability space, and A,B∈ℱ be events such that ℙ(A)=0 and ℙ(B)=1.

(a) Show that for every event C, A and C are independent.

(b) Show that for every event C, B and C are independent.

Solution.

(a)

Proof. For every event C, we have A∩C⊆C. So, ℙ(A∩C)≤ℙ(C)=0 by monotonicity. On the other hand, 0≤ℙ(A∩C) by nonnegativity. These two inequalities imply that ℙ(A∩C)=0=ℙ(A)⏟0ℙ(C). Hence, the events A and C are independent.

◻

Remark.

  • Notice that one cannot say that if ℙ(A)=0, then A=∅ (but the converse is true). It is possible to have nonempty event with probability zero. (We can have such event for continuous distribution (to be discussed later).)

(b)

Proof. Notice that B=Ac. By (a), the events A and C are independent. It follows that Ac=B and C are independent (see a previous exercise).

◻

Clipboard

Exercise. Are the events A and B independent?

Solution

They are independent. We can just apply (a) where the "event C" is set to be the event B.


Remark.

  • The meaning of this result is that knowledge of arbitrary event does not make a certain event less certain, and also does not make an impossible event possible, which is intuitive.

Example. Suppose a machine has three components: A, B, and C. Let A,B,C be the event that the component A, B, and C to fail respectively. Based on the studies on the machine, it is known that ℙ(A)=0.2,ℙ(B)=0.1 and ℙ(C)=0.01, and we can also assume that the events A,B,C are (mutually) independent. Suppose the machine fails if one of the components fails, and operates normally otherwise.

(a) Calculate the probability that the machine operates normally.

(b) Given that the machine fails, calculate the probability that all three component fail.

Solution.

(a) The desired probability is given by ℙ(Ac∩Bc∩Cc). We know that the events Ac,Bc,Cc are independent. So, we have ℙ(Ac∩Bc∩Cc)=ℙ(Ac)ℙ(Bc)ℙ(Cc)=(1−0.2)(1−0.1)(1−0.01)=0.7128.

(b) The desired probability is given by ℙ(A∩B∩C|machine fails). We have by definition ℙ(A∩B∩C|{machine fails})=ℙ(A∩B∩C)ℙ({machine fails})(A∩B∩C⊆{machine fails})=ℙ(A)ℙ(B)ℙ(C)1−0.7128=0.2(0.1)(0.01)0.2872≈0.000696.

Clipboard

Exercise. Suppose instead the machine fails if at least two of the component fail, and operates normally otherwise. Repeat parts (a) and (b) above. (Answer: (a) 0.9774; (b) approximately 0.00885)

Solution

(a) The probability is ℙ({machine operates normally})=ℙ(A∩Bc∩Cc)+ℙ(Ac∩B∩Cc)+ℙ(Ac∩Bc∩C)+ℙ(Ac∩Bc∩Cc)=0.2646+0.7128=0.9774. (b) The desired probability is ℙ(A∩B∩C|{machine fails})=ℙ(A∩B∩C)ℙ({machine fails})(A∩B∩C⊆{machine fails})=ℙ(A)ℙ(B)ℙ(C)1−0.9774=0.2(0.1)(0.01)0.0226≈0.00885.


Clipboard

Exercise.

(a) Show that the events A and Ac are independent if and only if ℙ(A)=0 or 1.

(b) Show that the event A is independent of itself if and only if ℙ(A)=0 or 1.

(Hint: prove the "if" and "only if" parts simultaneously)

Solution
(a)

Proof. We have A⊥⊥Ac⟺ℙ(A∩Ac)=ℙ(A)ℙ(Ac)⟺ℙ(∅)⏟0=ℙ(A)(1−ℙ(A))⟺ℙ(A)=0 or 1.

◻

(b)

Proof. We have A⊥⊥A⟺ℙ(A∩A)=ℙ(A)ℙ(A)⟺ℙ(A)=(ℙ(A))2⟺ℙ(A)=0 or 1.

◻


Clipboard

Exercise. A student claims that for every event A,B,C, if A and B are independent, and B and C are independent, then A and C are also independent.

Is the student's claim correct? If yes, prove it. If no, give a counterexample.

Solution

The student's claim is not correct. For example, consider an experiment where we toss a fair coin twice. Let A be the event that head comes up in the first toss, B be the event that head comes up in the second toss, C be the same event as A. Since all four outcomes should be equally likely, it follows that ℙ(A∩B)=14=ℙ(A)ℙ(B)=(12)2. Thus, A and B to be independent, then so is B and C (since C is the same as A). However, A and C are clearly not independent:

  • ℙ(A∩C)=ℙ(A)=12.
  • But, ℙ(A)ℙ(C)=(12)2=14.

Example. Consider the following procedure to make a fair toss from a coin with unknown probability p∈(0,1) of getting a head (suggested by John von Neumann):

  1. Toss the coin twice (independently).
  2. If both outcomes are the same, ignore them and return to step 1. Otherwise, go to next step.
  3. Regard the first outcome as the outcome obtained.

Show that this procedure works.

Proof. Let E be the event that a head is obtained at the end of this procedure. We then want to show that ℙ(E)=12 (this also means the probability for obtaining a tail at the end is 12). Now, we consider the following tree diagram:


 *---- HH ----> repeat
/
------ HT -----> E occurs
------ TH -----> E^c occurs
\
 *---- TT ----> repeat

Notice that if both outcomes are the same, and we return to step 1, then the situation is exactly the same as the initial situation. Thus, ℙ(E|{HH})=ℙ(E) and ℙ(E|{TT})=ℙ(E). Also, we can calculate

  • ℙ({HH})=p2.
  • ℙ({HT})=p(1−p).
  • ℙ({TH})=p(1−p).
  • ℙ({TT})=(1−p)2.

Hence, by law of total probability, we can conclude that ℙ(E)=p2ℙ(E)+p(1−p)(1)+p(1−p)(0)+(1−p)2ℙ(E)⟹ℙ(E)=p(1−p)1−p2⏟(1−p)(1+p)−(1−p)2=p1+p−1+p=12.

◻


Conditional independence

[edit | edit source]

Conditional independence is a conditional version of independence, and has the following definition which is similar to that of independence.

Definition. (Conditional independence) Let (Ω,ℱ,ℙ) be a probability space, and E1,E2,…,C∈ℱ be events. Then, the events E1,E2,… are conditionally independent given the occurrence of event C if ℙ(⋂i∈IEi|C)=∏i∈Iℙ(Ei|C) for every finite index set I⊆{1,2,…}.

Remark.

  • This definition also applies to finitely many events E1,E2,…,En∈ℱ, where the index set I is a subset of {1,2,…,n} instead.
  • In particular, if events A and B are conditionally independent given C (assuming ℙ(B|C)>0 and ℙ(C)>0), ℙ(A∩B|C)=ℙ(A|C)ℙ(B|C)⟺ℙ(A∩B|C)ℙ(C)ℙ(B|C)ℙ(C)=ℙ(A|C)⟺ℙ(A|B∩C)=ℙ(A|C).
  • This means given the occurrence of C, the occurrence of B does not affect the probability of A.
  • Conditional independence of some events neither implies nor is implied by independence of them. These two concepts are not related.

Example. Suppose we select two people from a large population randomly, and we label them as person A and B. Let A be the event that the birthday of person A is June 1st, B be the event that the birthday of person B is July 1st, and C be the event that person A and B are twins. (Assume that it is equally likely for the birthday of a person to be one of the 365 days.) Then, it should be reasonable to assume that events A and B are conditionally independent given Cc. Show that the events A and B are not conditionally independent given C.

Proof. Since ℙ(A∩B|C)=0 and ℙ(A|C)ℙ(B|C)=ℙ(A)ℙ(B)=13652, (A and C are independent. Also, B and C are independent.) it follows that ℙ(A∩B|C)≠ℙ(A|C)ℙ(B|C).

◻

Clipboard

Exercise. Show that the events A and B are independent (unconditionally) if and only if ℙ(C)=1.

Solution

Proof. By law of total probability, ℙ(A∩B)=ℙ(A∩B|C)ℙ(C)+ℙ(A∩B|Cc)ℙ(Cc)=ℙ(A|C)ℙ(B|C)ℙ(C)+0(A and B are conditionally independent given C)=ℙ(C)3652. On the other hand, ℙ(A)ℙ(B)=13652. This means ℙ(A∩B)=ℙ(A)ℙ(B) if and only if ℙ(C)=1.

◻