Track 4 · Probability · Lesson 9 of 9

Theory versus simulation

Estimate probabilities by simulation, explain the law of large numbers, and judge how far an observed frequency can reasonably be from the true probability.

30 minFoundation8 graded exercisesMembers

A risk analyst can't work out by hand the probability that a portfolio loses more than 10% in a year, so she simulates 10 000 possible years on a computer and finds such a loss in 700 of them. Is the probability 0.07 to within ±0.005, or only to within ±0.05? Simulation is one of the most practical tools in probability — as long as you know how much to trust its output.

There are two ways to arrive at a probability.

  • Theoretical probability comes from a model: a fair die has 6 equally likely faces, so P(six)=1/6P(\text{six}) = 1/6.
  • Empirical probability (an observed relative frequency) comes from repeating the experiment: if 11 of 60 rolls show a six, the empirical probability is 11/60≈0.18311/60 \approx 0.183.

The two rarely agree exactly. The empirical value is an estimate of the theoretical one, and it varies from one set of trials to the next. A simulation is just a cheap way of generating many trials with a computer instead of real dice, customers or markets.

Included with a Formula Quest membership

It has 8 graded exercises with feedback, hints and worked solutions. After it you will be able to:

  • Distinguish theoretical probabilities from empirical (observed or simulated) frequencies
  • Estimate a probability by simulation and give its standard error
  • Work out how many simulated trials a required precision needs
  • Explain the law of large numbers as dilution, and recognise the gambler's fallacy