Estimating with Simulation · 用模拟估计概率
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| simulation/ˌsɪmjʊˈleɪʃn/ | 模拟 | mó nǐ |
| trial/ˈtraɪəl/ | 一次试验 | yī cì shì yàn |
| law of large numbers/lɔː ɒv lɑːdʒ ˈnʌmbəz/ | 大数定律 | 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$).
估计一个有 $3$ 个孩子的家庭全是女孩的机会。
- **组成部分:**一个随机数字——偶数 = 女孩,奇数 = 男孩。**试验:**三个数字。
- **响应:**三个都是偶数吗?运行 $100$ 次试验,数出“全是女孩”的次数。
- 如果 $100$ 次里有 $12$ 次全是女孩,估计就是 $12/100 = 0.12$(真实值 $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.
模拟模仿一个机会过程来估计概率:定义组成部分、一次试验和响应,然后估计 $P = \text{successes} / \text{trials}$。大数定律保证了随着试验增多,估计会逼近真实概率。
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). · 在一次模拟中,100 次试验里有 12 次得到感兴趣的结果。估计该概率(用小数)。
Estimate = successes / trials = 12/100 = 0.12. · 估计 = 成功次数 / 试验次数 = 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. · 给过程建模,反复运行,再取比例。