Unit 11 · Statistics and Probability · 4 teaching hours · 21 min read
Probability
What the syllabus asks for 2
- Dependent cases
- Conditional probability (without proof)
In Grade 11 you handled independent events, where what happens first tells you nothing about what happens next. Real problems are rarely so obliging: draw a card and do not replace it, and the second draw has changed. This unit deals with those dependent cases and with the tool that measures them — conditional probability, the probability of an event given that another event has already happened. From it follow the multiplication theorem for dependent events, Bayes' theorem for working backwards from an observed effect to its likely cause, and the binomial distribution for repeated trials.
Almost every question is: drawing without replacement, "given that …", a two-way table, or Bayes with two or three causes. Draw a tree diagram first — multiply along a branch, add across branches. Keep answers as fractions in lowest terms unless the question uses decimals.
11.1 Dependent cases
Two events A and B are independent if the occurrence of one does not change the probability of the other, that is P(A \cap B) = P(A)\,P(B). Otherwise they are dependent, and then
where P(B \mid A) is the probability of B after A has happened.
The classic generator of dependence is drawing without replacement. A bag holds 5 red and 3 black balls. The first ball drawn is red with probability \frac58. If that ball is not put back, only 7 balls remain, 4 of them red, so the second ball is red with probability \frac47 — the first draw has changed the second. With replacement the probability would have stayed \frac58 and the draws would be independent.
| Without replacement | With replacement | |
|---|---|---|
| Total changes? | yes, n \to n-1 | no |
| Events are | dependent | independent |
| P(\text{2 reds}) from 5R, 3B | \frac58 \times \frac47 = \frac{5}{14} | \frac58 \times \frac58 = \frac{25}{64} |
For two events,
For three, chain it:
On a tree diagram this is simply "multiply the probabilities along the branch".
Problem. Two cards are drawn one after another from a well-shuffled pack of 52 cards, without replacement. Find the probability that (a) both are kings, (b) the first is a king and the second is a queen, (c) all three are aces when three cards are drawn.
Solution. Let K_1 be "first card is a king", K_2 "second card is a king".
(a) P(K_1) = \dfrac{4}{52}. Given a king has gone, 51 cards remain of which 3 are kings, so P(K_2 \mid K_1) = \dfrac{3}{51}.
(b) Removing a king leaves all 4 queens among 51 cards:
(c) Chain the multiplication theorem three times:
Problem. A bag contains 5 red and 3 black balls. Two balls are drawn at random one after the other. Find the probability that (a) both are red, (b) one is red and the other black, (c) at least one is black — first without replacement, then with replacement.
Solution. Without replacement (dependent), reading the tree diagram above:
With replacement (independent), every draw sees 5 red out of 8:
Both red is more likely with replacement, because the bag is never depleted of red balls.
Never add up the cases "exactly one" and "exactly two" if a complement will do. P(\text{at least one black}) = 1 - P(\text{no black}) is one line; listing cases is four and invites an error.
11.2 Conditional probability (without proof)
The probability of A given that B has already occurred is
Equivalently P(A \cap B) = P(B)\,P(A \mid B). The result is quoted without proof; it is really a change of sample space.
The idea behind the formula is worth one sentence: once you know B has happened, the outcomes outside B are dead. B becomes the new sample space, and the only part of A still alive is A \cap B. So we compare A \cap B with B instead of with S — and dividing by P(B) is exactly that comparison.
Problem. For two events A and B, P(A) = \frac12, P(B) = \frac35 and P(A \cup B) = \frac45. Find P(A \cap B), P(A \mid B) and P(B \mid A), and state whether A and B are independent.
Solution. From the addition theorem, P(A \cup B) = P(A) + P(B) - P(A \cap B):
Since P(A \mid B) = \frac12 = P(A), knowing B tells us nothing about A: the events are independent. (The same conclusion from P(A)P(B) = \frac12 \times \frac35 = \frac{3}{10} = P(A \cap B).)
Problem. Of 100 students of a Kathmandu college, 60 are boys. In the last examination 45 of the boys and 35 of the girls passed. A student is picked at random. Find (a) P(\text{pass}), (b) P(\text{pass} \mid \text{girl}), (c) P(\text{girl} \mid \text{pass}).
Solution. Put the data in a two-way table first — always.
| Passed | Failed | Total | |
|---|---|---|---|
| Boys | 45 | 15 | 60 |
| Girls | 35 | 5 | 40 |
| Total | 80 | 20 | 100 |
(a) P(\text{pass}) = \dfrac{80}{100} = \dfrac45.
(b) Conditioning on "girl" means working inside the girls' row only:
(c) Now the pass column is the sample space:
Note that P(\text{pass}\mid\text{girl}) \ne P(\text{girl}\mid\text{pass}) — they answer different questions.
Problem. Two dice are thrown. Find (a) the probability that both show odd numbers given that the sum is 6, (b) the probability that the sum is 6 given that both show odd numbers.
Solution. The sample space has 36 equally likely outcomes.
(a) Let B = "sum is 6" = \{(1,5),(2,4),(3,3),(4,2),(5,1)\}, so n(B) = 5. Of these, the ones with both odd are (1,5),(3,3),(5,1), so n(A \cap B) = 3:
(b) Let A = "both odd". Each die is odd with probability \frac12, so n(A) = 3 \times 3 = 9:
The same three favourable outcomes, two different denominators — because the condition names the sample space.
Problem. A problem in mathematics is given to three students whose chances of solving it are \frac12, \frac13 and \frac14, independently. Find the probability that (a) the problem is solved, (b) exactly one of them solves it.
Solution. The probabilities of failing are \frac12, \frac23, \frac34.
(a) P(\text{solved}) = 1 - P(\text{all three fail}):
(b) Exactly one solves it — three mutually exclusive cases:
11.3 Bayes' theorem: reasoning backwards
Conditional probability usually runs forwards: given the cause, how likely is the effect? Bayes' theorem runs the other way: given the effect, how likely is each cause? A bulb is defective — which machine made it? A test is positive — is the patient really ill?
Suppose the events E_1, E_2, \ldots, E_n are mutually exclusive and exhaustive: exactly one of them must happen. They cut the sample space into pieces, and any event A is cut into the corresponding slices.
Law of total probability. Adding the slices of A,
Bayes' theorem. For any one cause E_i,
In words: that branch, divided by all the branches that end in A.
Problem. Bag A contains 3 white and 2 red balls; bag B contains 2 white and 4 red balls. A bag is chosen at random and one ball is drawn from it. (a) Find the probability that the ball is white. (b) If the ball drawn is white, what is the probability that it came from bag A?
Solution. Let E_1 = "bag A chosen", E_2 = "bag B chosen", W = "the ball is white". Then P(E_1) = P(E_2) = \frac12 and
(a) By the law of total probability,
(b) By Bayes' theorem,
So a white ball is about 64\% likely to have come from bag A — sensible, since bag A is the whiter bag.
Problem. In a factory, machine A produces 60\% of the bulbs and machine B the rest. 2\% of A's bulbs and 3\% of B's are defective. A bulb picked at random from the day's output is found defective. What is the probability that it was made by machine A?
Solution. P(A) = 0.6, P(B) = 0.4, P(D\mid A) = 0.02, P(D \mid B) = 0.03.
Although machine A makes more bulbs, its lower defect rate exactly cancels the advantage: a defective bulb is equally likely to have come from either machine.
Problem. A disease affects 1\% of a population. A screening test is positive for 99\% of the people who have the disease, but also for 2\% of the people who do not. A randomly chosen person tests positive. What is the probability that he actually has the disease?
Solution. Let D = "has the disease", + = "tests positive". Then P(D) = 0.01, P(D') = 0.99, P(+\mid D) = 0.99, P(+ \mid D') = 0.02.
Only 1 in 3. The test is accurate, but the disease is so rare that the 2\% of false positives drawn from the huge healthy group outnumber the true positives two to one. This is why screening results are always confirmed by a second test.
Worked example 11.9 is the standard trap: P(+\mid D) = 0.99 but P(D \mid +) = 0.33. Read the question twice and identify which event is the condition — it is the one that has already happened.
11.4 Repeated trials: the binomial distribution
A Bernoulli trial is an experiment with just two outcomes, success (with probability p) and failure (with probability q = 1 - p). Repeat it n times independently — toss a coin 6 times, inspect 10 bulbs — and the number of successes X follows the binomial distribution.
{}^nC_r counts the orders in which the r successes can fall, p^{r} pays for the successes and q^{n-r} for the failures. The terms are exactly those of the expansion of (q + p)^{n}, which is why they add to 1.
Mean = np, variance = npq, standard deviation = \sqrt{npq}.
Problem. A fair coin is tossed 5 times. Find the probability of getting (a) exactly 3 heads, (b) at least 3 heads, (c) the mean number of heads.
Solution. Each toss is a Bernoulli trial with p = q = \frac12, n = 5.
(a)
(b)
(Which had to be \frac12, by the symmetry of the fair coin.)
(c) Mean = np = 5 \times \frac12 = 2.5 heads.
Problem. A die is thrown 4 times. Find the probability of getting (a) exactly two sixes, (b) at least one six. Also find the mean and variance of the number of sixes.
Solution. "Success" = a six, so p = \frac16, q = \frac56, n = 4.
(a)
(b)
Mean = np = 4 \times \frac16 = \dfrac23; variance = npq = 4 \times \dfrac16 \times \dfrac56 = \dfrac{5}{9}.
Chapter summary
- Events are dependent when one changes the probability of the other; drawing without replacement is the standard example.
- Multiplication theorem: P(A \cap B) = P(A)P(B \mid A) = P(B)P(A\mid B), and P(A\cap B\cap C) = P(A)P(B\mid A)P(C\mid A\cap B). Independent means P(A \cap B) = P(A)P(B).
- Conditional probability: P(A \mid B) = \dfrac{P(A\cap B)}{P(B)}, i.e. B becomes the new sample space.
- On a tree diagram: multiply along a branch, add across branches; all branch probabilities from one node add to 1.
- "At least one" = 1 - "none".
- Total probability: P(A) = \sum_k P(E_k)P(A \mid E_k) over a set of mutually exclusive and exhaustive causes.
- Bayes' theorem: P(E_i \mid A) = \dfrac{P(E_i)P(A\mid E_i)}{\sum_k P(E_k)P(A\mid E_k)} — one branch over all the branches.
- Binomial: P(X = r) = {}^nC_r p^{r}q^{\,n-r}, mean np, variance npq.
Practice questions
Group A — Multiple choice (1 mark each)
- If P(A) = \frac12 and P(B \mid A) = \frac13, then P(A \cap B) is [1]a\frac16b\frac13c\frac23d\frac56
- A bag has 3 red and 5 black balls. Two are drawn without replacement. Given that the first is black, the probability that the second is black is [1]a\frac58b\frac47c\frac57d\frac12
- If P(B) = 0.5 and P(A \cap B) = 0.32, then P(A \mid B) is [1]a0.16b0.32c0.64d0.82
- Two cards are drawn without replacement from a pack of 52. The probability that both are aces is [1]a\frac{1}{169}b\frac{1}{221}c\frac{1}{13}d\frac{4}{663}
- For a binomial distribution with n = 5 and p = \frac12, P(X = 5) is [1]a\frac{1}{32}b\frac{5}{32}c\frac12d\frac{5}{16}
- A and B are independent with P(A) = 0.3, P(B) = 0.4. Then P(A \cup B) is [1]a0.12b0.58c0.70d0.82
Answers to Group A
1. (a) — P(A\cap B) = P(A)P(B\mid A) = \frac12\times\frac13 = \frac16.
2. (b) — after one black is removed, 4 blacks remain among 7 balls.
3. (c) — 0.32 \div 0.5 = 0.64.
4. (b) — \frac{4}{52}\times\frac{3}{51} = \frac{1}{221}.
5. (a) — \left(\frac12\right)^{5} = \frac{1}{32}.
6. (b) — 0.3 + 0.4 - (0.3)(0.4) = 0.7 - 0.12 = 0.58.
Group B — Short answer (5 marks each)
- A bag contains 6 white and 4 black balls. Two balls are drawn at random one after the other without replacement. Find the probability that(a) both are white,(b) one is white and the other black,(c) at least one is black. [5]
- Define conditional probability. If P(A) = 0.6, P(B) = 0.5 and P(A \cap B) = 0.3, find P(A\mid B) and P(B \mid A) and determine whether A and B are independent. [5]
- Two dice are thrown together. Find the probability that the sum is 6, given that both dice show odd numbers. Also find the probability that both show odd numbers, given that the sum is 6. [5]
- The probabilities that Ramesh, Sita and Gita solve a problem are \frac12, \frac13 and \frac14 respectively, and they work independently. Find the probability that the problem is solved and the probability that exactly one of them solves it. [5]
- A die is thrown 5 times. Find the probability of getting exactly two sixes, and state the mean number of sixes. [5]
- Three cards are drawn one by one without replacement from a well-shuffled pack. Find the probability that all three are hearts. Would the answer be larger or smaller with replacement, and why? [5]
Answers to Group B
1. Without replacement the second draw has denominator 9.
(a) P(WW) = \dfrac{6}{10}\times\dfrac59 = \dfrac{30}{90} = \dfrac13.
(b) P(\text{one of each}) = P(WB) + P(BW) = \dfrac{6}{10}\cdot\dfrac49 + \dfrac{4}{10}\cdot\dfrac69 = \dfrac{24+24}{90} = \dfrac{48}{90} = \dfrac{8}{15}.
(c) P(\text{at least one black}) = 1 - P(WW) = 1 - \dfrac13 = \dfrac23.
(Check: \frac13 + \frac{8}{15} + P(BB) = 1 gives P(BB) = \frac{2}{15} = \frac{4}{10}\cdot\frac39 ✓.)
2. P(A\mid B) is the probability that A occurs given that B has already occurred, defined by P(A \mid B) = P(A\cap B)/P(B) for P(B) \ne 0.
Since P(A\mid B) = 0.6 = P(A) (equivalently P(A)P(B) = 0.6\times0.5 = 0.3 = P(A\cap B)), the events are independent.
3. Let A = "both odd", B = "sum is 6". Out of 36 outcomes, n(A) = 3\times3 = 9 and B = \{(1,5),(2,4),(3,3),(4,2),(5,1)\} so n(B) = 5. The outcomes in both are (1,5), (3,3), (5,1), so n(A\cap B) = 3.
4. Failure probabilities are \frac12, \frac23, \frac34.
5. Binomial with n = 5, p = \frac16, q = \frac56:
Mean = np = 5 \times \frac16 = \frac56 \approx 0.83 sixes.
6. There are 13 hearts in 52 cards, and each draw removes one card:
With replacement the probability would be \left(\frac14\right)^{3} = \frac{1}{64} \approx 0.0156, which is larger: replacing each heart keeps the proportion of hearts at \frac14 instead of letting it fall to \frac{12}{51} and then \frac{11}{50}.
Group C — Long answer (8 marks each)
- (a) State the multiplication theorem of probability for dependent events and explain, with a tree diagram, how it is used for two draws without replacement. [3](b) An urn contains 4 white and 6 black balls. Two balls are drawn one after the other without replacement. Find the probability that (i) both are black, (ii) the second is black, (iii) the first is black given that the second is black. [5]
- (a) State Bayes' theorem. [2](b) In a factory, machines A, B and C produce 50\%, 30\% and 20\% of the items, and 3\%, 4\% and 5\% of their outputs respectively are defective. An item drawn at random is found to be defective. Find the probability that it was produced by each of the three machines, and say which machine is the most likely source. [6]
Answers to Group C
1. (a) For dependent events, P(A\cap B) = P(A)\cdot P(B \mid A): the probability that both happen is the probability of the first times the probability of the second computed in the reduced situation left behind by the first. On a tree diagram the first stage carries P(A) and P(A'), and each second-stage branch carries a conditional probability with a denominator one smaller than at the first stage (see the tree in §11.1). Multiplying along a branch gives the probability of that pair of outcomes; adding the branches that satisfy the requirement gives the answer.
(b) Total 10 balls: 4 white (W), 6 black (B).
(i) P(B_1 \cap B_2) = \dfrac{6}{10}\times\dfrac59 = \dfrac{30}{90} = \dfrac13.
(ii) The second ball is black either after a black or after a white:
(Equal to P(B_1) — before you look at the first ball, every position in the shuffled row is alike.)
(iii) By the definition of conditional probability,
2. (a) If E_1, E_2, \ldots, E_n are mutually exclusive and exhaustive events with P(E_i) > 0, and A is any event with P(A) > 0, then
(b) P(A) = 0.5, P(B) = 0.3, P(C) = 0.2 and P(D\mid A) = 0.03, P(D \mid B) = 0.04, P(D\mid C) = 0.05.
| Machine | P(E_i) | P(D\mid E_i) | product |
|---|---|---|---|
| A | 0.50 | 0.03 | 0.015 |
| B | 0.30 | 0.04 | 0.012 |
| C | 0.20 | 0.05 | 0.010 |
| P(D) | 0.037 |
The three posterior probabilities add to 1, as they must. Machine A is the most likely source of a defective item — not because it is the least reliable (it is the most reliable) but because it makes half of everything.
Practise more: Mathematics question bank