Probability of an event
We can estimate a probability from data as a relative frequency: run trials, count how often the event happens, and divide by the number of trials. The more trials, the more accurate the estimate becomes.
Running proportion after each trial
- Choose “Flip a fair coin. Event: heads.”
- Click +10 and write down the proportion. Click Reset and repeat two more times. How different are your three estimates?
- Click Reset, then +1,000. How close is the final estimate to the true value of 0.5?
- Switch to “Roll a die. Event: rolling a 6” and repeat steps 2 and 3. Does the estimate still settle as the trials add up?
Combining probabilities: OR and NOT
OR means add. The chance that at least one of the events happens is the sum of their chances, minus anything you counted twice. NOT means subtract from 1, because every outcome is either in the event or not in it.
Click the faces that count as a “success”
Each face has probability 1/6. The faces can’t happen together on one roll (they are mutually exclusive), so you simply add them.
How you work it out
- In One die, click Odd number. Check that P(1 or 3 or 5) = 1/6 + 1/6 + 1/6 = 3/6.
- Predict P(5 or 6) and P(NOT 5 or 6), then click 5 or higher to check.
- Switch to Deck of cards. Set A to Queen and B to Heart. Why is 4/52 + 13/52 the wrong answer?
- Change B to King. Why can you just add the two probabilities now?
- Tick Show NOT A. Check that P(not a Queen) = 1 − 4/52.
Combining probabilities: AND
AND means multiply (when the events are independent). You need both things to happen, so you take a fraction of a fraction, and the answer always gets smaller. The grid below lists all 12 equally likely outcomes of rolling a die and flipping a coin.
Choose the events (click dice and coins)
How you work it out
- Select only the 6 on the die and H on the coin. Count the gold squares and check that the answer equals 1/6 × 1/2.
- Predict P(even number AND heads). Then select 2, 4 and 6 with H to check your prediction.
- Click ×1,000. How close is the simulated proportion to the multiplication rule?
- Select both H and T. What happens to the answer, and why?
Real-world application: ABO blood type
Each parent passes on one of their two alleles, each with probability ½. A box in the Punnett square is an AND (this allele from parent 1 and that allele from parent 2), so each box is ½ × ½ = ¼. A blood type can come from several boxes, which is an OR, so you add the boxes.
Chance of each blood type for one child (click a type to highlight its boxes)
- Click Classic: all four types. How can a type A parent and a type B parent have a type O child?
- Click the O row to highlight its box. What is the chance that their next two children are both type O?
- Click Simulate 100 children a few times. How close are the results to 25% for each type?
- Click AB × O. Which blood types are impossible for their children, and why?
Empirical tables
What is an empirical table?
A table of real counts from a sample. Every individual lands in exactly one cell, based on two traits. To find a probability, you don’t need a rule: count the cell and divide by the total.
Why it matters
It is a check on the multiplication rule. If the two traits are independent, multiplying the totals gives the same answer as counting. If the traits are related, the answers disagree, and the table is the one to trust.
Click any count to ask about that combination.
Every individual in the sample, one dot each
Multiplication rule
Empirical: count it from the table
- With Blood type O and handedness selected, click the Type O and Left-handed cell. Compare the multiplication rule with the empirical count.
- Tick Show what multiplication predicts in each cell. Do the predictions match the counts in every cell?
- Switch to Fruit flies: linked genes and click Gray body with Normal wings. Multiplying predicts 250 flies. How many were actually counted?
- Explain in one sentence why the table and the multiplication rule disagree for the flies.
- Optional: choose Your own numbers and edit the counts so the two traits are independent (both methods agree).