← 返回资讯屏轩教育 · 行业资讯

Investigation 2: Sampling Simulation | 抽样模拟探究

2026-08-02 23:48 · 本文部分内容由AI辅助创作

📚 Investigation 2: Sampling Simulation | 抽样模拟探究

Sampling simulation lies at the heart of statistical inference, allowing us to explore the behaviour of sample statistics without drawing thousands of real‑world samples. By generating repeated random samples from a known population or a theoretical model, we can observe patterns, verify the Central Limit Theorem, and construct confidence intervals. This investigation guides you through the essential concepts and practical techniques needed for an IB Mathematics IA focused on sampling simulation.

抽样模拟是统计推断的核心,它让我们无需抽取成千上万个真实样本就能探索样本统计量的行为。通过从已知总体或理论模型中重复生成随机样本,我们可以观察规律、验证中心极限定理并构建置信区间。本探究将带你了解以抽样模拟为主题的 IB 数学内部评估所需的基本概念与实用技巧。


1. Why Simulate? | 为什么要进行模拟?

In many investigations, collecting sufficient real data is costly, time‑consuming, or ethically impossible. Simulation provides a virtual laboratory where we can specify population parameters exactly, control sample sizes, and repeat experiments thousands of times. This helps us understand the long‑run behaviour of estimators, such as the sample mean or proportion, and appreciate the role of randomness in sampling.

在许多探究中,收集足够的真实数据往往成本高昂、耗时漫长或涉及伦理问题。模拟则提供了一个虚拟实验室,我们可以精确地设定总体参数、控制样本量并将实验重复成千上万次。这有助于我们理解估计量(如样本均值或比例)的长期行为,并体会随机性在抽样中的作用。

Furthermore, simulation makes abstract concepts tangible. Instead of relying solely on algebraic proofs, you can see the sampling distribution of the mean appear as a histogram, watch its shape change with sample size, and quantify how often a confidence interval captures the true parameter. This visual and experimental approach is ideally suited for an IB Mathematics exploration.

此外,模拟使抽象概念变得具体。你无需仅仅依赖代数证明,就可以亲眼看到样本均值的抽样分布以直方图的形式呈现,观察其形状如何随样本量变化,并量化置信区间捕获真实参数的频率。这种可视化和实验性的方法非常适合 IB 数学探究。


2. Foundations: Population, Sample, and Statistic | 基础:总体、样本与统计量

Every simulation begins with a clearly defined population. The population can be finite (e.g. the heights of all students in a school) or infinite (e.g. a normal distribution with mean μ and standard deviation σ). A sample is a subset drawn from this population, and a statistic is a numerical summary computed from the sample, such as the sample mean x̄, sample proportion p̂, or sample standard deviation s.

每一次模拟都始于一个明确定义的总体。总体可以是有限的(例如某所学校所有学生的身高),也可以是无限的(例如均值为 μ、标准差为 σ 的正态分布)。样本是从该总体中抽取的一个子集,而统计量则是由样本计算得出的数值概括,例如样本均值 x̄、样本比例 p̂ 或样本标准差 s。

Because a statistic varies from sample to sample, it is a random variable with its own probability distribution – the sampling distribution. Simulation allows us to approximate this distribution by taking a large number of samples, calculating the statistic for each, and plotting the results. Key characteristics to examine include the centre (mean of the statistic), spread (standard error), and shape of the distribution.

由于统计量因样本而异,它是一个具有自身概率分布的随机变量,即抽样分布。通过模拟抽取大量样本、计算每个样本的统计量并绘制结果,我们可以近似得到这个分布。需要考察的关键特征包括中心(统计量的均值)、离散程度(标准误差)以及分布的形状。


3. Designing a Simple Simulation | 设计一个简单的模拟

A typical simulation follows these steps: (1) Define the population and the parameter of interest. (2) Choose a sample size n. (3) Use a random number generator to draw a sample. (4) Calculate the statistic. (5) Repeat steps 3–4 many times (e.g. 1000 or 10 000 repetitions). (6) Summarize and visualize the collection of statistics.

一个典型的模拟遵循以下步骤:(1)定义总体和感兴趣的参数。(2)选择样本量 n。(3)使用随机数生成器抽取一个样本。(4)计算统计量。(5)多次重复步骤 3–4(例如 1000 或 10 000 次)。(6)汇总并可视化这些统计量的集合。

For IB Mathematics, you can implement this using software such as GeoGebra, Excel, or a programmable platform like Python. Even a spreadsheet can generate uniform random numbers and compute means. The key is to ensure that your random number generator is truly random and that the sample size is appropriate for the effect you wish to observe.

在 IB 数学中,你可以使用 GeoGebra、Excel 或 Python 等可编程平台来实现模拟。即使是一个电子表格也能生成均匀随机数并计算均值。关键在于确保你的随机数生成器是真正随机的,并且样本量适合你想要观察的效应。

For example, to simulate rolling a fair six‑ mpute the mean, and repeat 2000 times. The resulting histogram of sample means will illustrate the central tendency of the die.

例如,要模拟掷一枚公平的六面骰子,可将总体定义为整数 1 至 6,每个出现的概率为 1/6。抽取一个 n = 5 的样本,计算其均值,然后重复 2000 次。得到的样本均值直方图将展示骰子的集中趋势。


4. Simulating the Sampling Distribution of the Mean | 模拟样本均值的抽样分布

lation with mean μ and standard deviation σ. The simulation will generate many values of x̄. The mean of these x̄ values, denoted μ_x̄ se to μ, illustrating the unbiasedness of the sample mean. The standard deviation of the x̄ values, known as the standard error, can be compared with the theoretical value σ/√n.

假设我们从一个均值为 μ、标准差为 σ 的总体中抽取样本量为 n 的样本。模拟将生成许多 x̄ 的值。这些 x̄ 值的均值,记为 μ_x̄,应非常接近 μ,这说明了样本均值的无偏性。这些 x̄ 值的标准差,即标准误差,可与理论值 σ/√n 进行比较。

on with μ = 50 and σ = 10, samples of size n = 10 give a theoretical standard error of 10/√10 h 5000 repetitions might yield a simulated standard error of 3.18, confirming the formula.

在 IB 探究中,你可以制作一个表格,比较不同样本量下模拟标准误差与理论标准误差。例如,使用一个 μ = 50、σ = 10 的正态总体,样本量 n = 10 的理论标准误差为 10/√10 ≈ 3.16。经过 5000 次重复的模拟可能得到模拟标准误差为 3.18,这验证了公式。


5. The Central Limit Theorem in Action | 中心极限定理的验证

The Central Limit Theorem (CLT) states that, for a sufficiently large sample size n, the sampling distribution of the sample mean will be approximately normal, regardless of the shape of the population distribution, with mean μ and standard deviation σ/√n. Simulation is a powerful way to demonstrate this theorem visually and numerically.

中心极限定理指出,当样本量 n 足够大时,无论总体分布的形状如何,样本均值的抽样分布将近似服从正态分布,其均值为 μ,标准差为 σ/√n。模拟是直观展示和数值验证这一定理的有力方法。

You can start with a strongly non‑ ample means may still reflect the population shape. For n = 30, the histogram becomes bell‑shaped, and a normal probability plot confirms approximate normality.

你可以从一个强非正态的总体入手,比如指数分布或均匀分布,然后模拟不同 n 下的抽样分布。当 n = 2 时,样本均值的直方图可能仍反映总体的形状。当 n = 30 时,直方图变为钟形,并且正态概率图可确认其近似正态性。

μ_x̄ = μ,   σ_x̄ = σ/√n

μ_x̄ = μ,   σ_x̄ = σ/√n

ting convergence to normality. This provides strong evidence for the CLT without requiring advanced calculus.

一份 IB 探究可以包含一个汇总表,展示 n = 5、15、30 和 50 时模拟样本均值的偏度和峰度,证明其向正态性的收敛。这为中心极限定理提供了强有力的证据,而无需高等微积分。


广告 / Sponsored

6. Sampling Distribution of a Proportion | 比例的抽样分布

When the parameter of interest is a population proportion p, the sample proportion p̂ is the statistic. For a simple random sample of size n, the sampling distribution of p̂ be used to check that the normal approximation is reasonable when np ≥ 10 and n(1−p) ≥ 10.

当感兴趣的参数是总体比例 p 时,样本比例 p̂ 就是统计量。对于一个样本量为 n 的简单随机样本,p̂ 的抽样分布均值为 p,标准差为 √(p(1−p)/n)。可以使用模拟来检验当 np ≥ 10 且 n(1−p) ≥ 10 时正态近似的合理性。

To simulate, you might define a population where each individual is either a 'success' (1) or 'failure' (0) with probability p. Draw n individuals, calculate p̂ as the number of successes divided by n, and repeat many times. The histogram of p̂ values will centre around p, and its spread decreases as n increases.

模拟时,你可以定义一个总体,其中每个个体以概率 p 为“成功”(1)或“失败”(0)。抽取 n 个个体,将成功次数除以 n 得到 p̂,并多次重复。p̂ 值的直方图将围绕 p 集中,并且其离散程度随 n 增大而减小。

SE(p̂) = √(p(1 − p) / n)

标准误差 SE(p̂) = √(p(1 − p) / n)

A practical example is simulating an election poll where 52% of the population support a candidate. With n = 1000, the simulated p̂ values cluster tightly around 0.52, and about 95% of them fall within ±1.96 × SE(p̂) of the true p, illustrating the basis of a confidence interval.

一个实际例子是模拟一次选举民意调查,假设总体中有 52% 支持某位候选人。当 n = 1000 时,模拟的 p̂ 值紧密聚集在 0.52 附近,并且大约 95% 的值落在真实 p 的 ±1.96 × SE(p̂) 范围内,这说明了置信区间的基础。


7. Impact of Sample Size on Variability | 样本量对变异性的影响

One of the most important insights from sampling simulation is how the sample size n affects the precision of an estimator. As n increases, the standard error of the mean decreases by a factor of 1/√n. This means that to halve the standard error, you must quadruple the sample size. Simulation makes this relationship vivid.

抽样模拟最重要的洞见之一,就是样本量 n 如何影响估计量的精度。随着 n 增大,均值的标准误差以 1/√n 的比例减小。这意味着要将标准误差减半,必须将样本量增加为原来的四倍。模拟使这一关系变得生动而清晰。

You can design a simulation where you hold the population constant and vary n from 10 to 1000, calculating the standard deviation of the x̄ values at each level. Plotting standard error against 1/√n should produce a linear relationship, confirming the theoretical formula and providing a powerful visual for your IA report.

你可以设计一个模拟,在总体保持不变的情况下将 n 从 10 变化到 1000,并计算每个水平下 x̄ 值的标准差。将标准误差对 1/√n 作图应呈现线性关系,这验证了理论公式,并为你的 IA 报告提供了强有力的可视化依据。

Similarly, for proportions, the width of an approximate 95% confidence interval, 2 × 1.96 × √(p̂(1−p̂ hat very small samples yield highly variable intervals that often miss the true parameter.

同样,对于比例而言,近似 95% 置信区间的宽度 2 × 1.96 × √(p̂(1−p̂)/n) 会随着 n 的增加而缩小。模拟可以表明,非常小的样本产生的区间变异性极大,常常漏掉真实参数。


8. Bias, Variability, and Efficiency | 偏差、变异性和有效性

A good estimator should be unbiased (its mean equals the true parameter) and have low variability. Simulation enables you to compare different estimators. For example, when estimating a population mean, both the sample mean and the sample median are unbiased, but the mean has smaller standard error for normal populations.

一个好的估计量应当是无偏的(其均值等于真实参数)且具有低变异性。模拟使你能够比较不同的估计量。例如,在估计总体均值时,样本均值和中位数都是无偏的,但对于正态总体来说,均值的标准误差更小。

In your IA, you could set up a simulation where the population contains outliers. The sample mean becomes highly variable, while the median or a trimmed mean may be more robust. By tracking the simulated mean squared error (MSE) for each estimator, you can quantify the trade‑off between bias and variance.

在你的 IA 中,你可以设置一个包含异常值的总体。此时样本均值变得高度可变,而中位数或截尾均值可能更为稳健。通过追踪每种估计量的模拟均方误差,你可以量化偏差与方差之间的权衡。

Moreover, efficiency refers to the relative variability of estimators. A more efficient estimator requires a smaller sample size to achieve the same precision. Simulation studies comparing the standard errors of two estimators across various distributions can form a sophisticated IA section.

此外,有效性指的是估计量的相对变异性。一个更有效的估计量只需较小的样本量即可达到相同的精度。比较两种估计量在不同分布下标准误差的模拟研究,可以构成 IA 中富有深度的一部分。


9. Constructing Confidence Intervals via Simulation | 通过模拟构建置信区间

ation parameter. Using simulation, you can directly observe the confidence level. For a 95% confidence interval for the mean, you can repeatedly draw samples of size n, compute x̄ ± z* × σ/√n, and check whether the interval contains μ. Over many repetitions, the proportion of intervals covering μ should be close to 0.95.

置信区间给出了总体参数的一个合理取值范围。通过模拟,你可以直接观察置信水平。对于均值的 95% 置信区间,你可以反复抽取样本量为 n 的样本,计算 x̄ ± z* × σ/√n,并检验该区间是否包含 μ。在大量重复之后,覆盖 μ 的区间比例应接近 0.95。

This coverage probability experiment is ideal for an IA. You can vary the sample size, population shape, or confidence level, and record the empirical coverage. When the normal approximation is poor (e.g. small n from a skewed population), the empirical coverage may deviate from the nominal level, highlighting the limitations of standard formulas.

这种覆盖概率实验非常适合用来做 IA。你可以改变样本量、总体形状或置信水平,并记录经验覆盖概率。当正态近似性较差时(例如从偏态总体中抽取的小样本),经验覆盖率可能会偏离名义水平,从而凸显标准公式的局限性。

You could also explore bootstrap confidence intervals, which rely on resampling the original data. Simulating the bootstrap procedure and comparing its coverage with the normal‑theory interval can make your investigation deeper and more original.

你还可以探究基于自助法的置信区间,该方法依赖于对原始数据的重抽样。模拟自助法过程,并将其覆盖概率与正态理论区间进行对比,能使你的探究更加深入且富有原创性。


10. Practical IA Application and Tips | 实际 IA 应用与建议

When writing your IA, clearly state your research question: e.g., 'How does the sampling distribution of the mean for a uniform population evolve with sample size, and how accurately does the normal approximation hold?' Provide a method section detailing your simulation design, software used, number of repetitions, and seed for reproducibility.

在撰写 IA 时,要清晰地陈述你的研究问题,例如:“均匀总体的均值抽样分布如何随样本量演变?正态近似的准确性如何?”在方法部分,详细说明你的模拟设计、使用的软件、重复次数以及可重现性的随机种子。

Include well‑labelled tables and histograms. Discuss any discrepancies between simulated and theoretical values, linking them to sampling error or limitations of the random number generator. Reflect on the validity of your simulation and suggest improvements, such as increasing repetitions or using a more sophisticated pseudo‑random algorithm.

要包含标注清晰的表格和直方图。讨论模拟值与理论值之间的任何差异,并将其与抽样误差或随机数生成器的局限性联系起来。反思模拟的有效性,并提出改进建议,例如增加重复次数或使用更为复杂的伪随机算法。

Remember that an excellent IA does not just report results but interprets them in the context of statistical theory. Show genuine engagement by exploring what happens when assumptions are violated, and use your simulation to explain real‑world limitations of polls or experiments.

请记住,一份优秀的 IA 不仅仅是报告结果,而是在统计理论的背景下对其进行解释。通过探索假设违反时会发生什么,以及使用你的模拟来解释民意调查或实验在现实世界中的局限性,来展示真正的投入与思考。


Published by TutorHao | IB Mathematics Revision Series | aleveler.com

广告 / Sponsored
现货 Cambridge Biology for the IB Diploma coursebook 剑桥国际文凭 I…
生物 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥546.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao