MathematicsGrade 6–9

Law of large numbers

Toss a coin, a die or a drawing pin a thousand times: the more often you throw, the closer the relative frequency gets to the probability.

Loading simulation …

What is it about?

If you throw a die nn times and get a six kk times, then

  • kk is the absolute frequency and
  • hn=knh_n = \dfrac{k}{n} is the relative frequency of the six.

Example: 1717 sixes in 100100 throws give h100=17100=0.17=17 %h_{100} = \dfrac{17}{100} = 0.17 = 17\,\%.

With few throws hnh_n varies a lot. The more often you throw, the more the relative frequency settles – close to the probability pp (coin: p=0.5p = 0.5, die: p=16≈0.167p = \frac{1}{6} \approx 0.167). This is called the empirical law of large numbers.

There is no guarantee, though: usually hnh_n gets closer to pp with more throws, but not always. Even after many throws hnh_n can move a little further away again – large deviations just become less and less likely.

Conversely, this is used to estimate unknown probabilities: for a drawing pin you cannot calculate pp for “point up” – but after very many throws hnh_n is a good estimate of pp.

Important: Chance does not “even out”. A die has no memory – after five throws without a six, a six is not more likely on the next throw. The relative frequency approaches pp because early outliers are spread over more and more throws.

The funnel

The green funnel shows the range p±1.96⋅p(1−p)np \pm 1.96 \cdot \sqrt{\dfrac{p(1-p)}{n}}. After nn throws, the relative frequency lies inside it in about 95 % of all runs. It gets narrower as nn grows – four times as many throws make it half as wide.

Try it

  1. Throw the die one at a time and watch how much the curve jumps at first. Why is that?
  2. Throw 1000 times or press Play. Where does the curve settle?
  3. Compare with the coin: does the curve become “calm” faster? Coin
  4. Estimate the drawing pin’s probability without showing it first. Drawing pin
  5. Switch off the logarithmic axis. What can you see better, what worse? Linear axis

Exercises

Exercise 1: Expectation

About how many sixes do you expect when you throw a die 600600 times? Is it suspicious if there are only 9292 sixes?

Show solution

You expect about 600⋅16=100600 \cdot \frac{1}{6} = 100 sixes. 9292 sixes are not suspicious: that is a relative frequency of about 0.1530.153. At n=600n = 600 the funnel ranges from about 0.1370.137 to 0.1960.196 – so 0.1530.153 lies within the usual range of variation.

Exercise 2: Estimating the drawing pin

Throw the drawing pin 1000 times without showing the probability. Give an estimate for pp (“point up”) and then compare it with the set value (switch on “Show probability p” for this). Load exercise

Show solution

The estimate is the relative frequency after 1000 throws. The set value is p=0.6p = 0.6; after 1000 throws hh usually lies between about 0.570.57 and 0.630.63.

Exercise 3: Does the die have a memory?

Lena says: “I haven’t thrown a six five times in a row, so one must come soon!” Comment on this.

Show solution

Lena is wrong (this is the so-called gambler’s fallacy). The throws are independent – the probability of a six is 16\frac{1}{6} on every throw, no matter what happened before. The relative frequency approaches pp not because things even out, but because earlier deviations hardly matter when nn is large.

Exercise 4: Absolute and relative deviation

With many throws, watch the deviation of the count ∣k−n⋅p∣|k - n \cdot p| and the deviation of the relative frequency ∣hn−p∣|h_n - p|. Both are shown under Results. What do you notice?

Show solution

The deviation ∣hn−p∣|h_n - p| typically keeps getting smaller. The deviation of the count ∣k−n⋅p∣|k - n \cdot p|, however, typically even grows (roughly like n\sqrt{n}). So the law of large numbers does not say that the counts “even out”.

Ideas for the classroom

  • Use: About grades 6 to 8 (Laplace experiments: relative frequency and the empirical law of large numbers). The drawing pin is the classic example of a probability that can only be determined by experiment.
  • Images: Die, coin, drawing pin and table are shown as photos; if an image is missing, the simulation draws a replacement graphic.
  • Common stumbling blocks:
    • Gambler’s fallacy (“now the six is due”).
    • “600 throws give exactly 100 sixes.”
    • The probability is equated with the relative frequency of a short series of trials.
  • Funnel: The limits are based on the normal approximation and are only rough for small nn – in lower secondary school the interpretation “almost all runs lie inside” is enough.