A brief note on Two-Way Tables and Fair Games . Read it before a test. Try each question at the end before you open its answer.
Conditional probability From a table: P ( A ∣ B ) P(A \mid B) P ( A ∣ B ) is the count of A A A and B B B divided by the count of B B B . From shares: P ( A ∣ B ) = P ( A ∩ B ) P ( B ) P(A \mid B) = \dfrac{P(A \cap B)}{P(B)} P ( A ∣ B ) = P ( B ) P ( A ∩ B ) . Order matters: P ( A ∣ B ) P(A \mid B) P ( A ∣ B ) and P ( B ∣ A ) P(B \mid A) P ( B ∣ A ) have the same top and different bottoms. Independence in a table Same share: the share of A A A is the same in every group of B B B , so P ( A ∣ B ) = P ( A ) P(A \mid B) = P(A) P ( A ∣ B ) = P ( A ) . Product rule: P ( A ∩ B ) = P ( A ) × P ( B ) P(A \cap B) = P(A) \times P(B) P ( A ∩ B ) = P ( A ) × P ( B ) . Expected count: row total × column total grand total \dfrac{\text{row total} \times \text{column total}}{\text{grand total}} grand total row total × column total . Real samples: small differences can be chance. A link is not a cause. Expected value Rule: E = x 1 p 1 + x 2 p 2 + … E = x_1 p_1 + x_2 p_2 + \dots E = x 1 p 1 + x 2 p 2 + … , the long-run average. Gain: expected prize minus the cost. A fair game has an expected gain of 0 0 0 . House edge: a bet of 1 1 1 token on red on a wheel with 37 37 37 pockets has E = − 1 37 E = -\dfrac{1}{37} E = − 37 1 tokens. A worked example A made-up survey of 100 100 100 people: 30 30 30 drink tea, 60 60 60 drink coffee, and 18 18 18 drink both.
Coffee given tea. 18 30 = 0.6 \dfrac{18}{30} = 0.6 30 18 = 0.6 . Coffee given no tea. 60 − 18 70 = 42 70 = 0.6 \dfrac{60 - 18}{70} = \dfrac{42}{70} = 0.6 70 60 − 18 = 70 42 = 0.6 . Independent? Yes. Both shares equal P ( coffee ) = 0.6 P(\text{coffee}) = 0.6 P ( coffee ) = 0.6 , and the expected count 30 × 60 100 = 18 \dfrac{30 \times 60}{100} = 18 100 30 × 60 = 18 matches. Practice with new numbers
A program to try The program checks the worked example with exact fractions.
Run it. Are all three fractions equal?
1. Change the table to [[24, 6], [36, 34]]. Is coffee still independent of tea?
Mistakes to avoid Dividing by the grand total for a conditional probability. Divide by the group you are told about. Swapping the condition. Read the question twice: what is known, and what is asked? Forgetting the cost of a game. The expected prize is not the gain. Calling an association a cause. A table shows a link only. Check yourself Of 50 50 50 made-up members of a club, 20 20 20 are adults, and 15 15 15 of the adults play chess. Find P(chess given adult). Stuck? Show a hint Show the answerP ( A ) = 0.4 P(A) = 0.4 P ( A ) = 0.4 , P ( B ) = 0.5 P(B) = 0.5 P ( B ) = 0.5 and P ( A ∩ B ) = 0.2 P(A \cap B) = 0.2 P ( A ∩ B ) = 0.2 . Are A A A and B B B independent? Stuck? Show a hint Show the answerA game pays 5 5 5 tokens with probability 0.3 0.3 0.3 and costs 2 2 2 tokens. Find the expected gain. Stuck? Show a hint Show the answerWhat prize, paid with probability 0.25 0.25 0.25 , makes a 3 3 3 token game fair? Stuck? Show a hint Show the answerSources OpenStax, Introductory Statistics , Chapter 3 (contingency tables, independent events) and Chapter 4 (expected value).