Conditional probability

Conditional probability is an important concept, and occurs quite naturally in surveys or more generally in experiments involving multiple events.

We use the example of a survey to explain the concept: we randomly pick people living in New York and inquire about their voting behaviour. Thus, the set of possible outcomes SS contains all New Yorkers. Let us define the two events

Picking a New Yorker at random, p(E)p(E) denotes the probability for selecting a Trump voter, and p(F)p(F) is the probability for selecting a male. Or expressed as percentages, p(E)p(E) is the percentage of New Yorkers voting for Trump and p(F)p(F) is percentage of New Yorkers being male.

As is often the case for surveys, we want to be more specific and, for example, find the percentage of male New Yorkers voting for Trump. In other words, we are interested in the probability to select a Trump voter, where we now randomly select not from all New Yorkers, but only from all male New Yorkers.

To say it in yet another way, we want to know the probability to select a Trump voter given that the selected person is a male New Yorker. This probability is written as

p(EF)p(E\vert F)

and is called the conditional probability of E given F. The vertical line stands for "given", so p(EF)p(E|F) is pronounced "pp of EE given FF". The situation is illustrated in a Venn-diagram below. The percentage p(E)p(E) is relative to the sample space SS, while p(EF)p(E\vert F) is the percentage relative to FF. So there is a change in sample space.

Note that there is a subtle difference between p(EF)p(E\vert F) and p(EF)p(E\cap F). Both describe the same persons (male Trump voters in New York), but p(EF)p(E\cap F) expresses the number of these people as a percentage of SS (all New Yorkers), while p(EF)p(E\vert F) expresses the same number of people as a percentage of FF (male New Yorkers).

What is the numerical relationship between these two probabilities? How can we convert from one to the other? Here is a small example. If

p(EF)=12 of Fp(E\vert F)=\frac{1}{2} \text{ of $F$} p(F)=14 of Sp(F)=\frac{1}{4}\text{ of $S$} p(EF)=12p(EF)14p(F)=18p(E\cap F)=\underbrace{\frac{1}{2}}_{p(E\vert F)}\cdot\underbrace{\frac{1}{4}}_{p(F)}=\frac{1}{8}

Written more generally, we have

p(EF)=p(EF)p(F)p(E\cap F)=p(E\vert F)\cdot p(F)

Or in a picture:

Observe how on the right side the F-circles cancel and the equation is correct. Dividing both sides of the equation by p(F)p(F), we get the equation

p(EF)=p(EF)p(F)\boxed{p(E\vert F)=\frac{p(E\cap F)}{p(F)}}

Similarly we can show that

p(FE)=p(FE)p(E)\boxed{p(F\vert E)=\frac{p(F\cap E)}{p(E)}}

All basic properties about probabilities also work for the conditional probability (without proof, but should be intuitively clear as p(EF)p(E|F) is simply a probability with a sample space restricted to FF):

Theorem 1

Let E,FE, F and GG be events of a random experiment, then

  1. p(FF)=1,p({}F)=0p(F\vert F)=1, p(\{ \}\vert F)=0
  2. p(EGF)=p(EF)+p(GF)p(EGF)p(E\cup G\vert F)=p(E\vert F)+p(G\vert F)-p(E\cap G\vert F)
  3. p(EGF)=p(EF)+p(GF)p(E\cup G\vert F)=p(E\vert F)+p(G\vert F) if EE and GG are mutually exclusive.
  4. p(EF)=1p(EF)p(E^\prime\vert F)=1-p(E\vert F)
Exercise 1
Q1

In a town, 30%30\% of the population are male. Of these, 10%10\% are blond. A person is selected at random. Determine the probability that

  1. the person is blond, given that the person is male.
  2. the person is blond and male.
Q2

A teacher gave her class two tests. 42%42\% of the students passed at least the first test, and 25%25\% of the students passed both tests. You select a student at random from the ones that have passed test 1. What is the probability that the student has also passed test 2?

Q3

From 10001000 people in a town, 675675 own a house, and of these, 300300 own a car. If you select a person from these 10001000 people at random, what is the probability that the person owns both a house and a car?

Q4

Show that p(FE)+p(FE)=1p(F|E)+p(F^\prime|E)=1.

Q5

AA and BB are two events of a random experiments with p(A)=0.7p(A)=0.7, p(B)=0.6p(B)=0.6, and p(AB)=0.2p(A \cap B^\prime)=0.2. Determine p(AB)p(A^\prime \cap B), p(AB)p(A|B), and p(BA)p(B|A).

Solution
A1

B=B="selected person is blond", M=M="selected person is male". The sample space is formed by the people in town.

  1. p(BM)=0.1p(B|M)=\underline{0.1}
  2. p(BM)=p(BM)p(M)=0.10.3=0.03p(B\cap M)=p(B|M)\cdot p(M) = 0.1 \cdot 0.3 = \underline{0.03}.
A2

T1=T_1="selected student passes test 1", T2=T_2="selected student passes test 2", and sample space SS is formed by the students in the class. It is p(T1T2)=0.25p(T_1\cap T_2)=0.25, and p(T1)=0.42p(T_1)=0.42. With p(T1T2)=p(T2T1)p(T1)p(T_1 \cap T_2)=p(T_2 | T_1)\cdot p(T_1) we get p(T2T1)=p(T1T2)p(T1)=0.250.42=0.59p(T_2 | T_1)=\frac{p(T_1 \cap T_2)}{ p(T_1)}=\frac{0.25}{0.42}=\underline{0.59}.

A3

H=H="House owner", CC="car owner", p(H)=6751000=0.675p(H)=\frac{675}{1000}=0.675, p(CH)=300675=0.4p(C\vert H)=\frac{300}{675}=0.\overline{4}. Thus, p(CH)=p(CH)p(H)=0.40.675=0.3p(C\cap H)=p(C\vert H)\cdot p(H)=0.\overline{4}\cdot 0.675=\underline{0.3}

Or, because 300300 people are in the intersection HCH\cap C, we can also calculate directly that p(CH)=3001000=0.3p(C\cap H)=\frac{300}{1000}=\underline{0.3}.

A4

Repeat the experiment many times, and focus on the experiments where EE occurred. Of these, the percentage of experiments where FF occurred (as well) is p(FE)p(F|E), and the percentage of experiments where FF did not occur is p(FE)p(F^\prime|E). Thus, the two percentages add up to 100%100\%.

A5

Venn-Diagram \rightarrow p(AB)=0.5p(AB)=0.1p(A\cap B)=0.5 \rightarrow p(A^\prime\cap B)=\underline{0.1}. p(AB)=p(AB)p(B)=0.50.6=5/6p(A|B)=\frac{p(A\cap B)}{p(B)}=\frac{0.5}{0.6}=\underline{5/6}, and p(BA)=p(BA)p(A)=0.50.7=5/7p(B|A)=\frac{p(B\cap A)}{p(A)}=\frac{0.5}{0.7}=\underline{5/7}.