Conditional probability
Conditional probability is the probability of an event when some information is already known. If is known to have occurred, then the possible outcomes are restricted to . The conditional probability of given is
The symbol is read as ” given ”. It does not mean division. The event after the vertical bar is the information assumed to be true.
Prerequisites
Section titled “Prerequisites”You should be able to:
- use complements, intersections and unions from probability;
- distinguish mutually exclusive events from independent events;
- multiply along branches and add between alternative routes in a probability tree;
- form fractions from frequencies in a table.
Restricting the sample space
Section titled “Restricting the sample space”Suppose a fair die is rolled. Let
Without extra information, and . If is known, the relevant sample space shrinks from to . Two of these three outcomes are even, so
The formula gives the same result:
The denominator is because knowing has occurred makes the new whole.
Worked example 1: cards without replacement
Section titled “Worked example 1: cards without replacement”One card is chosen at random from an ordinary pack of cards. Given that it is a picture card, find the probability that it is a king.
There are picture cards: four jacks, four queens and four kings. Once “picture card” is known, only these cards remain relevant. Therefore
Using all cards in the denominator would ignore the given information.
Self-check 1
Section titled “Self-check 1”A student is selected from a group of students. Ten study physics, seven study chemistry, and four study both. Given that the student studies physics, find the probability that the student also studies chemistry.
Answer
The new whole is the physics students. Four of them also study chemistry, so
The multiplication rule
Section titled “The multiplication rule”Rearranging the conditional probability formula gives
Equally, reversing the roles of the events gives
These equations describe the same intersection by entering it from different directions. They also explain the multiply rule on a tree diagram: the probability at the end of a route is the product of the branch probabilities along that route.
Worked example 2: dependent selections
Section titled “Worked example 2: dependent selections”A bag contains red and blue counters. Two counters are selected without replacement. Find the probability that both are red.
After a red counter is selected first, red counters remain among counters. Thus
Hence
The second probability is conditional. Without replacement, the contents of the bag change, so writing would be incorrect.
Worked example 3: at least one success
Section titled “Worked example 3: at least one success”The same bag contains red and blue counters. Two are selected without replacement. Find the probability of at least one red counter.
The complement of “at least one red” is “both blue”. Therefore
Using a complement avoids separately calculating the routes red then red, red then blue, and blue then red.
Tree diagrams with conditional probabilities
Section titled “Tree diagrams with conditional probabilities”On a tree diagram:
- branches leaving the same point must sum to ;
- multiply probabilities along one complete route;
- add probabilities for mutually exclusive routes that satisfy the question.
The second set of branches may depend on the outcome of the first event. Labels should make this dependence explicit.
Worked example 4: combining routes
Section titled “Worked example 4: combining routes”A factory uses two machines. Machine makes of the components and machine makes the rest. Of the components made by , are defective. Of those made by , are defective. Find the probability that a randomly selected component is defective.
There are two mutually exclusive routes to a defective component:
Calculate each route, then add:
This is an instance of the law of total probability: split an event into all possible routes leading to it.
Worked example 5: reversing the condition
Section titled “Worked example 5: reversing the condition”For the factory in Example 4, a selected component is known to be defective. Find the probability that it was made by .
The question asks for , not . Use the route probability from the tree and divide by the total probability of being defective:
Although makes only of all components, it accounts for of defective components because its defect rate is higher.
Self-check 2
Section titled “Self-check 2”A disease affects of a population. A test is positive for of people with the disease and for of people without it. A person tests positive. Find the probability that they have the disease.
Answer
Let mean the person has the disease and mean a positive test. First find the two routes to a positive result:
Therefore
The result is much smaller than . The is , which is the reverse conditional probability.
Conditional probability from a two way table
Section titled “Conditional probability from a two way table”Tables are particularly useful when data are given as frequencies. Restrict attention to the row or column representing the condition, then form a proportion within that total.
Worked example 6: reading both directions
Section titled “Worked example 6: reading both directions”A survey records how people travel to work.
| Car | Public transport | Total | |
|---|---|---|---|
| Under 40 | 54 | 66 | 120 |
| 40 or over | 48 | 32 | 80 |
| Total | 102 | 98 | 200 |
Let mean travels by car and mean under 40.
Given that a person is under 40, the relevant total is :
Given that a person travels by car, the relevant total is :
Both calculations use the same intersection frequency, , but their denominators differ because the conditions differ.
Self-check 3
Section titled “Self-check 3”Using the table above, find:
- ;
- .
Answer
-
means public transport. Of the public transport users, are under 40:
-
means aged 40 or over. Of these people, use public transport:
Independence
Section titled “Independence”Events and are independent if knowing that one has occurred does not change the probability of the other. Provided the relevant conditional probability is defined,
Using the multiplication rule, this is equivalent to
Either statement can be used to test independence. The product test is often most convenient when joint and marginal probabilities are given.
Worked example 7: testing independence
Section titled “Worked example 7: testing independence”For the travel survey in Example 6, determine whether being under 40 and travelling by car are independent.
From the table,
but
Since , knowing that a person is under 40 changes the probability that they travel by car. Therefore and are not independent.
We could instead compare
with
These are unequal, giving the same conclusion.
Worked example 8: finding an unknown using independence
Section titled “Worked example 8: finding an unknown using independence”Events and are independent, with
Find .
Let . Independence gives
Use the addition rule:
Therefore
Self-check 4
Section titled “Self-check 4”Events and satisfy
Are and independent? Find .
Answer
Since
the events are independent. Also,
which equals , as expected.
Solving algebraic probability problems
Section titled “Solving algebraic probability problems”Conditional probability can determine an unknown parameter. Keep probabilities exact where possible and check that every solution lies between and .
Worked example 9: using a given condition
Section titled “Worked example 9: using a given condition”Suppose
Find .
First use the addition rule to find the intersection:
Now condition on :
Worked example 10: reconstructing a probability tree
Section titled “Worked example 10: reconstructing a probability tree”A student either walks or takes a bus to college. The probability that the student walks is . If the student walks, the probability of arriving late is . If the student takes the bus, it is . The overall probability of arriving late is . Find .
The probabilities of walking and taking the bus are and . Add the two routes to being late:
Thus
As a check, .
Common misconceptions
Section titled “Common misconceptions”Swapping the condition
Section titled “Swapping the condition”restricts the sample space to . It is not usually equal to . In context, write both probabilities in words.
Dividing by the wrong probability
Section titled “Dividing by the wrong probability”The denominator is the probability of the event after the bar:
Assuming independence
Section titled “Assuming independence”Multiplying by is valid only for independent events. In general, use
Adding routes that overlap
Section titled “Adding routes that overlap”Alternative complete routes on a tree are mutually exclusive, so they can be added. For general events that overlap, use
Rounding too early
Section titled “Rounding too early”Keep route probabilities and totals exact until the final line. Early rounding can noticeably alter a reverse conditional probability because one rounded value is divided by another.
Mixed self-check
Section titled “Mixed self-check”- A box contains green and yellow balls. Two balls are selected without replacement. Find the probability that the second ball is yellow given that the first is green.
- Given , and , determine whether and are independent.
- A shop receives of its batteries from supplier and the remainder from supplier . The failure rates are for and for . Find the probability that a failed battery came from .
- Events and satisfy and . Find .
Answers
-
After a green ball is removed, of the remaining balls are yellow:
-
Since
the events are independent.
-
The failed routes have probabilities
Hence
-
Rearrange the conditional probability formula:
Summary
Section titled “Summary”The essential ideas are:
and, for independent events,
Conditioning changes the sample space. On trees, multiply along routes and add alternative routes. In tables, use the total belonging to the condition. Never reverse the events on either side of the bar without justification.
Next steps
Section titled “Next steps”- Review probability if intersections, complements or independence need more practice.
- Study probability modelling to judge whether assumptions such as independence are reasonable.
- Apply repeated independent trials in the binomial distribution.
- Use probability models with discrete random variables.