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.
Homework
Section titled “Homework”Try these independently after the practice questions. Show your setup and explain your reasoning. Use exact answers where possible, and check that your answers fit the question. Homework solutions are not provided on the published site.
Foundations
Section titled “Foundations”H1. Relative frequency. A player makes 93 of 150 free throws. Find the experimental probabilities of making and missing a throw, as decimals and percentages.
H2. Compare with theory. A fair die is rolled 90 times and shows a six 18 times. Find the experimental and theoretical probabilities of a six, and their absolute difference. Does a difference prove the die is unfair?
H3. Combine unequal samples. Class A records 42 heads in 60 flips; Class B records 155 heads in 250 flips.
- (a) Find each class’s relative frequency and the pooled relative frequency.
- (b) Explain why averaging the two class percentages gives the wrong pooled estimate.
H4. Predict a count. A thumbtack lands point up 136 times in 200 drops. Estimate how many point-up landings to expect in 750 further drops under the same conditions. Is that count guaranteed?
H5. Build a random-number model. A delivery arrives early with probability 0.18, on time with probability 0.47, and late with probability 0.35. Assign each uniformly generated integer from 00 to 99 to an outcome. Explain how your ranges preserve the probabilities.
H6. A complete trial. A game has three independent rounds, each with a win probability of 0.4. Design a simulation for exactly two wins in a game. State what one trial is, how to detect success, and how to estimate the probability. A simulation produces 274 successes in 1000 games: compare its estimate with the theoretical value obtained from the three possible win orders.
Challenge
Section titled “Challenge”H7. The coin is not keeping score. After 40 flips, a fair coin has shown 28 heads.
- (a) What is the probability of heads on the next flip?
- (b) How many heads in the next 160 flips would make the overall relative frequency exactly 0.5?
- (c) Does the law of large numbers require that count to happen? Explain.
H8. Estimate a hidden bag. A bag contains 30 marbles. In 500 draws with replacement, the colour counts are 201 red, 97 blue, and 202 green. Estimate a whole-number composition of the bag. Explain why the experiment cannot establish the exact composition, and how you would improve the estimate.
H9. Spot an invalid simulation. To simulate the sum of two fair dice, a student chooses an integer uniformly from 2 to 12. Explain why this model is wrong. Design a correct model and compare the two models’ probabilities of a sum of 7.
H10. Repeated digits. Generate a three-digit code by choosing each digit independently and uniformly from 0 to 9; leading zeros are allowed.
- (a) Design a simulation for at least one repeated digit. Explain why counting equal pairs as separate successes can give a wrong estimate.
- (b) Find the theoretical probability using the complement of three different digits.
- (c) Run at least 1000 trials, report the number of successes and your estimate, and compare with theory. Your results need not match another student’s.