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

Variance and Standard Deviation | 方差与标准差

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

📚 Variance and Standard Deviation | 方差与标准差

Variance and standard deviation are the fundamental measures of dispersion in statistics: they quantify how spread out the values of a data set are around the mean. In IB Mathematics, both Analysis and Approaches (AA) and Applications and Interpretation (AI), at SL and HL, require you to calculate these quantities accurately, interpret them in context, and apply them to the normal distribution, hypothesis testing, regression and data analysis. They are also heavily examined in A Level and AP Statistics courses, so the skills here transfer directly.

方差与标准差是统计学中最基本的离散程度度量:它们量化了一组数据的取值围绕均值的分散程度。在IB数学中,无论是分析与方法(AA)还是应用与解释(AI),无论SL还是HL,都要求你准确计算这两个统计量、结合情境解释它们,并将它们应用于正态分布、假设检验、回归分析和数据处理。在A Level和AP统计中它们同样是重点考查内容,因此这里掌握的技能可以直接迁移使用。


1. Measures of Dispersion | 离散程度的度量

When summarizing a data set, measures of central tendency (mean, median and mode) are only half of the story. They tell you where the centre of the data lies, but nothing about how tightly or loosely the observations cluster. Two classes can both average 75 marks on a test while one is highly consistent and the other is wildly inconsistent.

在概括一组数据时,集中趋势指标(均值、中位数、众数)只讲了一半的故事。它们告诉你数据中心在哪里,却没有说明观测值是紧密聚集还是松散分布。两个班级的平均分都可能是75分,但一个班非常整齐,另一个班则差异极大。

Variance and standard deviation are the most commonly used measures of dispersion because they take every data point into account. Alternative measures such as the range and the interquartile range (IQR) are quicker to compute and more resistant to outliers, but they deliberately ignore the middle of the data set.

方差与标准差是最常用的离散度量,因为它们考虑了每一个数据点。像极差和四分位距(IQR)这样的替代指标计算更快、对异常值更稳健,但它们有意忽略了数据集中间的大部分信息。

For example, consider two classes with the same mean of 75. Class A has scores clustered tightly around 75, while Class B has scores ranging from 30 to 100. The mean alone cannot distinguish them; the variance makes the difference obvious.

例如,考虑两个均值同为75分的班级。A班的成绩紧密聚集在75分附近,而B班的成绩分布在30到100分之间。仅凭均值无法区分二者,而方差能清楚地显示这一差异。

Measure | 指标 Uses all data? | 是否使用全部数据 Units | 单位 Outlier sensitive? | 是否受异常值影响
Range 极差 No 否 Same as data 同数据 Very 非常敏感
IQR 四分位距 No 否 Same as data 同数据 Low 较稳健
Variance 方差 Yes 是 Squared units 平方单位 High 敏感
Standard deviation 标准差 Yes 是 Same as data 同数据 High 敏感

2. Defining Variance and Standard Deviation | 方差与标准差的定义

Variance is defined as the mean of the squared deviations from the mean. Each observation is compared with the mean, the differences are squared (so that positive and negative deviations do not cancel), and the results are averaged. The squaring explains why variance is measured in squared units, such as marks² or cm².

方差的定义是:各观测值与均值之差的平方的平均值。把每个观测值与均值比较,差值平方(这样正负偏差不会相互抵消),再求平均。平方运算也解释了为什么方差的单位是原始单位的平方,例如"分²"或cm²。

σ² = Σ(xᵢ − μ)² ÷ N    (population variance 总体方差)

s² = Σ(xᵢ − x̄)² ÷ (n − 1)    (sample variance 样本方差)

Standard deviation is simply the positive square root of the variance. Because the square root undoes the squaring, the standard deviation is measured in the same units as the original data, which makes it the more natural quantity to quote in context.

标准差就是方差的非负平方根。由于开方抵消了平方,标准差的单位与原始数据相同,因此在实际情境中报出标准差更自然、更直观。

σ = √(Σ(xᵢ − μ)² ÷ N)    s = √(Σ(xᵢ − x̄)² ÷ (n − 1))

A useful shortcut for computation uses the raw sums instead of the deviations, which reduces rounding error in long calculations. It is algebraically identical to the definition above.

一个实用的计算捷径是用原始和代替偏差来运算,可以减少长计算中的舍入误差。它在代数上与上面的定义完全等价。

s² = (Σx² − (Σx)² ÷ n) ÷ (n − 1)


3. Population versus Sample: Why n − 1? | 总体与样本:为什么用 n − 1?

If you measure every member of a population, you use N, the population mean μ, the population variance σ² and the population standard deviation σ. If you only have a sample drawn from a larger population, you use the sample size n, the sample mean x̄, the sample variance s² and the sample standard deviation s.

如果你测量的是总体的全部个体,就使用总体容量N、总体均值μ、总体方差σ²和总体标准差σ。如果你只拥有从更大总体中抽取的样本,就使用样本容量n、样本均值x̄、样本方差s²和样本标准差s。

The divisor n − 1 in the sample variance is called Bessel's correction. Dividing by n would systematically underestimate the variability of the population, because the sample mean x̄ sits at the centre of the sample and therefore makes the deviations look smaller than they really are. Using n − 1 corrects this bias.

样本方差中的分母n − 1称为贝塞尔校正。若除以n,会系统性地低估总体的变异性,因为样本均值x̄位于样本中心,会使偏差看起来比实际更小。使用n − 1可以修正这一偏差。

The number n − 1 is also the number of degrees of freedom: once the mean is fixed, only n − 1 of the deviations are free to vary, since the deviations always sum to zero. In IB examinations, always read the question carefully to decide which divisor is expected; many questions say "estimate the variance of the population" or "treat the data as a sample".

n − 1同时也代表自由度:均值一旦确定,只有n − 1个偏差可以自由变化,因为所有偏差之和恒为零。在IB考试中,务必仔细读题以判断应使用哪个分母;许多题目会写"估计总体的方差"或"将这些数据视为样本"。


4. Step-by-Step Calculation from Raw Data | 原始数据的逐步计算

For small data sets, the definition formula is the clearest route. Follow a fixed order of operations so that marks for method are always visible in your working, even if the final answer is wrong.

对于小数据集,使用定义公式最为清晰。按固定顺序运算,这样即便最终答案出错,你的解题步骤分也能被看见。

Worked example: the data set is 4, 8, 6, 10, 12. The sum is 40, so the mean is 8. The deviations are −4, 0, −2, 2, 4, and their squares are 16, 0, 4, 4, 16, which total 40.

例题:数据集为4, 8, 6, 10, 12。总和为40,因此均值为8。偏差为 −4, 0, −2, 2, 4,平方后为16, 0, 4, 4, 16,合计40。

Treating the data as a population: σ² = 40 ÷ 5 = 8 and σ = √8 ≈ 2.83. Treating it as a sample: s² = 40 ÷ 4 = 10 and s = √10 d deviation is larger, which reflects the extra uncertainty about the true population spread.

若视为总体:σ² = 40 ÷ 5 = 8,σ = √8 ≈ 2.83。若视为样本:s² = 40 ÷ 4 = 10,s = √10 ≈ 3.16。注意样本标准差更大,这反映了对总体真实离散程度估计的额外不确定性。


5. Calculating from a Frequency Table | 由频数表计算

When data are given in a frequency table, each value x occurs f times, and the sums are weighted by frequency. Always check whether the table gives individual values or grouped class intervals: for grouped data you must use the mid-interval value of each class as x.

当数据以频数表给出时,每个数值x出现f次,求和时要按频数加权。务必确认表格给出的是单个数值还是分组组区间:对于分组数据,必须用每组的组中值作为x。

x̄ = Σfx ÷ Σf    s² = (Σfx² − (Σfx)² ÷ Σf) ÷ (Σf − 1)

广告 / Sponsored

d 3 respectively, so Σf = 10. Then Σfx = 2 + 10 + 9 = 21 and Σfx² = 2 + 20 + 27 = 49, so x̄ = 2.1.

例题:数值1、2、3的频数分别为2、5、3,因此Σf = 10。则Σfx = 2 + 10 + 9 = 21,Σfx² = 2 + 20 + 27 = 49,所以x̄ = 2.1。

, giving s ≈ 0.738. Quoting both makes clear that the choice of divisor genuinely matters.

总体方差为(49 − 21² ÷ 10) ÷ 10 = (49 − 44.1) ÷ 10 = 0.49,因此σ = 0.7。样本方差为(49 − 44.1) ÷ 9 = 4.9 ÷ 9 ≈ 0.544,因此s ≈ 0.738。同时给出两者可以清楚说明分母的选择确实有影响。

Note that using mid-interval values for grouped data gives an estimate of the true variance, not an exact value, because the individual observations inside each class are unknown. This is a standard comment expected in IB AI examinations.

注意,对分组数据使用组中值得到的只是真实方差的估计值而非精确值,因为每组内部的具体观测值未知。这是IB应用与解释(AI)考试中经常要求指出的标准说明。


6. Worked Example: Two Classes Compared | 例题:两个班级的比较

Suppose Class A scores 73, 74, 75, 76, 77 and Class B scores 45, 65, 75, 85, 105. Both have a mean of 75, so the centres are identical, but the spreads are completely different.

假设A班成绩为73, 74, 75, 76, 77,B班成绩为45, 65, 75, 85, 105。两者均值都是75,即中心完全相同,但分散程度截然不同。

ions are −30, −10, 0, 10, 30, so the squared deviations total 2000, the population variance is 400 and σ = 20.

A班的偏差为 −2, −1, 0, 1, 2,平方和为10,总体方差为10 ÷ 5 = 2,σ ≈ 1.41。B班的偏差为 −30, −10, 0, 10, 30,平方和为2000,总体方差为400,σ = 20。

The interpretation is the key mark-earning sentence: Class B has a much larger standard deviation, so its marks are far more variable and less consistent, even though the two classes performed equally well on average. Always compare the values and then translate the comparison into the language of the problem.

得分关键的解释句是:B班的标准差大得多,说明其成绩波动更大、稳定性更差,尽管两个班的平均水平相同。一定要先比较数值,再把比较结果翻译成题目情境的语言。


7. Interpreting the Standard Deviation | 如何解读标准差

A standard deviation is only meaningful in context, because it carries the same units as the data. A standard deviation of 2 marks has a very different practical implication from a standard deviation of 20 marks. A standard deviation of zero means every observation is identical and there is no variability at all.

标准差只有在具体情境中才有意义,因为它与数据单位相同。2分的标准差与20分的标准差在实践中的含义天差地别。标准差为零意味着所有观测值完全相同,完全没有变异性。

For roughly symmetric, bell-shaped data, the empirical rule applies: about 68% of values lie within one standard deviation of the mean, about 95% within two, and about 99.7% within three. This rule is the bridge between descriptive statistics and the normal distribution.

对于近似对称的钟形数据,可应用经验法则:约68%的数值落在均值±1个标准差内,约95%落在±2个标准差内,约99.7%落在±3个标准差内。这一法则正是描述统计与正态分布之间的桥梁。

When comparing data sets measured on different scales, use the coefficient of variation, which expresses the standard deviation as a percentage of the mean. It is dimensionless and therefore allows a fair comparison between, for example, height in centimetres and mass in kilograms.

当比较不同量纲的数据集时,可使用变异系数,即标准差占均值的百分比。它没有量纲,因此可以在例如身高(厘米)与体重(千克)之间进行公平比较。

CV = (σ ÷ μ) × 100%


8. Coding and Linear Transformations of Data | 数据的编码与线性变换

constants with b ≠ 0, then the mean and standard deviation transform in a predictable way.

编码是一种合法且常被考查的捷径。若用y = (x − a) ÷ b定义新变量y(a、b为常数且b ≠ 0),则均值与标准差会按可预测的方式变换。

x̄ = a + b·ȳ     sₓ = |b| · sy

Adding or subtracting a constant shifts every value equally, so it changes the mean but leaves the standard deviation untouched. Multiplying or dividing by a constant stretches or compresses the whole distribution, so it multiplies the standard deviation by the absolute value of that constant. Variance is multiplied by b², since it involves squares.

加减一个常数会使每个数值同量平移,因此均值改变而标准差不变。乘除一个常数会拉伸或压缩整个分布,因此标准差乘以该常数的绝对值。由于方差涉及平方,它乘以的是b²。

In an examination, coding lets you work with small numbers such as 0, 1, 2 instead of large values such as 2010, 2011, 2012 in a time series. Remember to convert the coded answers back to the original scale before writing your final sentence; a standard deviation left in coded units earns no interpretation mark.

在考试中,编码可以让你用0、1、2这样的小数字代替时间序列中2010、2011、2012这样的大数值。切记在写最终结论前把编码后的答案换算回原始尺度;若标准差仍停留在编码单位,将得不到解释分。


9. Using the GDC and the Formula Booklet | 使用图形计算器与公式手册

In IB examinations you are expected to use a graphic display calculator (GDC) for routine calculations. Enter the data into a list, choose the one-variable statistics option, and read the sample standard deviation and the population standard deviation from the output.

在IB考试中,常规计算应使用图形计算器(GDC)。把数据输入列表,选择单变量统计功能,然后从输出中读取样本标准差和总体标准差。

Be careful with notation: many calculators label the sample standard deviation sₓ or σₙ₋₁ and the population standard deviation σₓ or σₙ. Selecting the wrong one is one of the most common causes of lost marks, especially when the question specifies a sample.

注意符号:许多计算器把样本标准差标为sₓ或σₙ₋₁,把总体标准差标为σₓ或σₙ。选错是失分最常见的原因之一,尤其在题目明确说明是样本时。

The IB formula booklet provides the definitions you need, so you are not required to memorise them word for word, but you must know when each applies. Show the substituted formula at least once in your written solution so the examiner can follow your reasoning and award method marks.

IB公式手册中提供了所需定义,因此不要求逐字背诵,但必须知道每种情况该用哪一个公式。在书面解答中至少写出一次代入公式的过程,让阅卷人能够跟上你的思路并给出方法分。


10. Combining Two Data Sets | 两组数据的合并

Sometimes you are given summary statistics for two separate groups and asked for the statistics of the combined group. The combined mean is a weighted average, weighted by the group sizes.

有时题目给出两组各自的摘要统计量,要求合并后的统计量。合并均值是以各组样本量为权的加权平均数。

x̄_c = (n₁x̄₁ + n₂x̄₂) ÷ (n₁ + n₂)

For the pooled variance you must account for both the spread within each group and the distance between each group mean and the combined mean. The formula below is the standard result for combining two samples.

计算合并方差时,既要考虑各组内部的离散程度,也要考虑各组均值与合并均值之间的距离。下面的公式是合并两个样本的标准结果。

s² = ((n₁ − 1)s₁² + (n₂ − 1)s₂² + n₁(x̄₁ − x̄_c)² + n₂(x̄₂ − x̄_c)²) ÷ (n₁ + n₂ − 1)

Example: group 1 has n₁ = 10, x̄₁ = 60, s₁ = 5; group 2 has n₂ = 20, x̄ d mean is (600 + 1400) ÷ 30 ≈ 66.67. Substituting gives a pooled variance of approximately

广告 / Sponsored
IBDP国际文凭计算机科学学生用书 高级及标准水平 Computer Science for the IB Diplo…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥524.0

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

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