Estimating with Simulation
| English | Chinese | Pinyin |
|---|---|---|
| simulation | 模拟 | mó nǐ |
| trial | 一次试验 | yī cì shì yàn |
| law of large numbers | 大数定律 | dà shù dìng lǜ |
Imitating chance
- When probability is hard to compute, we can estimate it by imitation.
- A simulation 模拟 models a chance process using random digits, a coin, or a computer.
- Run the process many times and watch how often the outcome of interest happens.
- It turns a hard probability question into a counting experiment.
Set up the simulation
- Name the components: what each random digit (or draw) represents.
- Define one trial 一次试验: one complete repetition of the whole process.
- State the response variable: what you record each trial (did the event happen?).
- Clear rules make the simulation reproducible and honest.
Estimate the probability
- Run many trials, count how many gave the outcome of interest.
- The estimated probability = (successes) ÷ (number of trials).
- More trials → a more reliable estimate.
- This proportion approximates the true probability you couldn't easily calculate.
The law of large numbers
- The law of large numbers 大数定律 says: as trials increase, the estimate closes in on the true probability.
- Few trials → a noisy, unreliable estimate; many trials → a stable one.
- It's the guarantee that simulation works if you run it enough.
- It also explains why casinos always win in the long run.
The law of large numbers is about the long run, not short-run "balancing." More trials make the proportion close in on the true probability — it does not mean a run of bad luck must be "corrected" soon. Also, a simulation only estimates a probability; the estimate carries some error that shrinks as trials grow.
Estimate the chance a family of $3$ children has all girls.
- Component: one random digit — even = girl, odd = boy. Trial: three digits.
- Response: were all three even? Run $100$ trials, count the "all-girls" trials.
- If $12$ of $100$ trials are all-girls, the estimate is $12/100 = 0.12$ (true value $0.125$).
A simulation imitates a chance process to estimate a probability: define the components, one trial, and the response, then estimate $P = \text{successes} / \text{trials}$. The law of large numbers guarantees that with more trials the estimate approaches the true probability.
Repeated random trials
Each roll is a trial; many trials estimate a probability.
In a simulation, 12 of 100 trials gave the outcome of interest. Estimate the probability (as a decimal).
Estimate = successes / trials = 12/100 = 0.12.
The law of large numbers says that as the number of trials grows, the estimated probability...
More trials → the estimate closes in on the true value.
One complete repetition of the whole simulated process is called a ___.
A trial is one repetition; you run many of them.
A simulation gives the exact true probability, with no error.
It only estimates; the error shrinks as trials increase.
Order the steps of designing a simulation.
Model the process, run it repeatedly, then take the proportion.