π Testing independence
The rule
- P(A) is the chance of event A. P(A and B) is the chance that both A and B happen.
- If A and B are independent, P(A and B) = P(A) Γ P(B).
- Why it works: A happens with chance P(A). Then B still has its usual chance P(B). Both is P(A) of P(B).
- Use it as a test. Work out P(A) Γ P(B) and compare it with P(A and B). Equal means independent. Different means dependent.
- From a two-way table, use the same whole for all three chances: everyone in the table. P(A and B) = cell Γ· everyone.
- Run it backwards: P(B) = P(A and B) Γ· P(A). Dividing by a fraction is multiplying by its flip.
- Compare in simplest form so equal fractions look equal: 6/20 and 3/10 are the same.
Examples
A and B are independent. P(A) = 1/2 and P(B) = 1/3. What is P(A and B)? β 1/6
- Independent: P(A and B) = P(A) Γ P(B)
- 1/2 Γ 1/3 = 1/6
Independent, so multiply: 1/2 Γ 1/3 = 1/6.
P(A) = 1/2, P(B) = 3/5 and P(A and B) = 3/10. Are A and B independent? β Yes
- P(A) Γ P(B) = 1/2 Γ 3/5 = 3/10
- P(A and B) = 3/10
- They match
- Yes, independent
1/2 Γ 3/5 = 3/10, which is P(A and B).
A and B are independent. P(A) = 1/4 and P(A and B) = 1/10. What is P(B)? β 2/5
- Independent: P(A and B) = P(A) Γ P(B)
- So P(B) = P(A and B) Γ· P(A) = 1/10 Γ· 1/4
- Dividing is multiplying by the flip: 1/10 Γ 4 = 4/10
- Simplest form: 2/5
- Check: 1/4 Γ 2/5 = 2/20 = 1/10
P(B) = P(A and B) Γ· P(A) = 1/10 Γ 4 = 2/5.
20 kids. Are Girl and Swim independent? Girls: 6 swim, 4 run. Boys: 6 swim, 4 run. β Yes
- P(Girl) = 10/20 = 1/2
- P(Swim) = 12/20 = 3/5
- P(Girl and Swim) = 6/20 = 3/10
- P(Girl) Γ P(Swim) = 1/2 Γ 3/5 = 3/10
- They match, so Girl and Swim are independent
P(Girl) Γ P(Swim) = 1/2 Γ 3/5 = 3/10, and P(Girl and Swim) = 6/20 = 3/10.
| Swim | Run | Total | |
|---|---|---|---|
| Girl | 6 | 4 | 10 |
| Boy | 6 | 4 | 10 |
| Total | 12 | 8 | 20 |
20 kids. Are Girl and Swim independent? Girls: 8 swim, 2 run. Boys: 4 swim, 6 run. β No
- P(Girl) = 10/20 = 1/2
- P(Swim) = 12/20 = 3/5
- P(Girl and Swim) = 8/20 = 2/5
- P(Girl) Γ P(Swim) = 1/2 Γ 3/5 = 3/10
- 3/10 is not 2/5, so Girl and Swim are dependent
P(Girl) Γ P(Swim) = 3/10, but P(Girl and Swim) = 8/20 = 2/5. They differ.
| Swim | Run | Total | |
|---|---|---|---|
| Girl | 8 | 2 | 10 |
| Boy | 4 | 6 | 10 |
| Total | 12 | 8 | 20 |
Watch out
- βP(A and B) = P(A) + P(B).β No: for both, multiply. 1/2 + 1/3 = 5/6 is bigger than either one alone, and both can never be more likely than one.
- βP(A and B) is 6/20 and the product is 3/10, so they differ.β Simplify first: 6/20 = 3/10. They match.
- βTo test a table, divide by the row total.β No: P(A), P(B) and P(A and B) all use the same whole, everyone in the table.