Experimental Probability and Simulations
Sometimes you can’t work out a probability from a list of equally likely outcomes. What’s the chance a thumbtack lands point up? Or that a basketball player sinks a free throw? You find out by experimenting: doing many trials and seeing how often it happens. The more trials you do, the more you can trust the answer.
Key ideas
Section titled “Key ideas”Experimental probability
Section titled “Experimental probability”This fraction is also called the relative frequency of .
The law of large numbers
Section titled “The law of large numbers”With only a few trials, experimental probability can be far from the theoretical value. As the number of trials grows, the experimental probability tends to get closer and closer to the theoretical probability.
In this simulation, the proportion of heads was after flips, after , and after .
Simulations
Section titled “Simulations”A simulation models an experiment using something easier to repeat, often random numbers. For example:
- a spreadsheet formula like
=RANDBETWEEN(1,6)simulates rolling a die - a random number from to that’s less than can stand for “it rains” when
Simulations are useful when an experiment is slow, expensive, or impossible to repeat many times.
Expected number of occurrences
Section titled “Expected number of occurrences”If and you do trials, you’d expect to happen about times.
Worked examples
Section titled “Worked examples”Example 1: Comparing with theory
Section titled “Example 1: Comparing with theory”A coin is flipped times and lands heads times. Find the experimental probability of heads, and compare it with the theoretical probability.
Solution.
The theoretical probability is . A difference like this is normal with only trials.
Example 2: When there’s no theory
Section titled “Example 2: When there’s no theory”A thumbtack is dropped times and lands point up times. Estimate the probability of point up, and how many times it would land point up in drops.
Solution.
In drops, expect about point-up landings.
Example 3: Reading the law of large numbers
Section titled “Example 3: Reading the law of large numbers”Using the graph above, explain why someone who flipped only coins might wrongly think the coin was unfair.
Solution. After flips, the simulation had heads, a proportion of . That looks unfair, but with so few trials, big swings are common. As more flips were added, the proportion settled near . Small samples can mislead; large ones are more reliable.
Example 4: Designing a simulation
Section titled “Example 4: Designing a simulation”Design a simulation to estimate the probability of rolling at least one in four rolls of a die.
Solution.
- In a spreadsheet, put
=RANDBETWEEN(1,6)in four columns of one row: that’s one trial of four rolls. - In a fifth column, check whether any of the four is a .
- Copy the row down to make many trials, say .
- Divide the number of trials with at least one by .
The theoretical answer (from independent events) is , so a good simulation should give something close to that.
Common mistakes
Section titled “Common mistakes”Trusting a small number of trials. Ten trials can easily give for a fair coin. Use many trials before drawing conclusions.
Expecting the experimental value to match exactly. Even with many trials, experimental and theoretical probabilities rarely agree perfectly. They should just be close.
Thinking a coin “is due” for heads. Each flip is independent. The law of large numbers works because of many trials, not because the coin balances itself out.
Dividing by the wrong total. The denominator is the number of trials, not the number of outcomes.
Practice
Section titled “Practice”1. (Warm-up) A player makes of free throws. What is the experimental probability of making a free throw?
Solution
2. (Warm-up) A die is rolled times and shows a thirteen times. Compare the experimental and theoretical probabilities of rolling a .
Solution
Experimental: . Theoretical: . The experimental value is a bit high, which is not surprising with only rolls.
3. (Warm-up) The probability of rain on a June day is . About how many rainy days would you expect in June’s days?
Solution
days.
4. (Core) A bag holds marbles in three colours. A marble is drawn, its colour recorded, and it’s put back, times: red, blue, green. Estimate how many marbles of each colour are in the bag.
Solution
Multiply each relative frequency by : red , blue , green . A good estimate is about red, blue, and green.
5. (Core) Two classes each flip a coin times. One gets heads and the other gets . Is something wrong? How could they get a more reliable estimate?
Solution
Nothing is wrong: with only flips, results like and happen by chance. Combining the data ( heads in flips, about ) or doing many more flips gives a more reliable estimate.
6. (Core) A cereal company puts one of different toys in each box, each equally likely. Design a simulation to estimate how many boxes you’d need to buy to collect all .
Solution
Use =RANDBETWEEN(1,5) to represent opening a box. Keep generating numbers until all of to have appeared, and record how many boxes it took. Repeat many times (say ) and average the results.
(The theoretical average is about boxes, so a good simulation should land close to that.)
7. (Core) Two coins are flipped times: two heads times, one head and one tail times, two tails times. Compare with the theoretical probabilities.
Solution
Theoretical: , , .
Experimental: , , . All very close, as expected with trials.
8. (Challenge) A student rolls a die times and gets sixes. Should they suspect the die is unfair? What would you do to find out?
Solution
, far above . With a fair die, you’d expect about sixes in rolls, and is very unlikely by chance. That’s good reason to be suspicious. To be more confident, roll it many more times: if the proportion of sixes stays well above , the die is probably unfair.
9. (Challenge) In Example 4, a class runs the simulation times and gets at least one in trials. How does this compare with the theoretical probability?
Solution
Experimental: . Theoretical: . They’re close; the difference of under is reasonable for trials.