📚 Variance and Standard Deviation: Calculation and Applications | 方差与标准差:计算与应用详解
Variance and standard deviation are fundamental measures of dispersion in statistics. They quantify how far data points spread out from the mean, providing critical insight into the reliability and consistency of a dataset.
方差与标准差是统计学中衡量数据离散程度的基本指标。它们量化了数据点偏离均值的程度,为数据集的可靠性与一致性提供了关键信息。
1. What Is Dispersion? | 什么是离散程度?
Dispersion describes the spread of data values around a central value such as the mean or median. A small dispersion means the data are clustered closely; a large dispersion means they are widely scattered.
离散程度描述的是数据值围绕中心值(如均值或中位数)的分布情况。离散程度小,说明数据紧密聚集;离散程度大,说明数据分布广泛。
Consider two datasets: 5, 5, 5, 5, 5 and 0, 5, 5, 5, 10. Both have the same mean of 5, but their spreads are obviously different. Variance and standard deviation capture this difference numerically.
考虑两组数据:5, 5, 5, 5, 5 和 0, 5, 5, 5, 10。两者均值都为 5,但离散程度明显不同。方差与标准差在数值上刻画了这一差异。
2. Population vs. Sample | 总体与样本
In statistics, we distinguish between a population (all members of interest) and a sample (a subset of the population). The formulas for variance differ slightly because we use different denominators.
在统计学中,我们区分总体(所有感兴趣的对象)和样本(总体的一个子集)。由于分母不同,方差的计算公式略有区别。
- Population variance uses \(N\), the total number of observations.
- Sample variance uses \(n – 1\), where \(n\) is the sample size, to correct for bias.
总体方差使用 \(N\),即观测总数。
样本方差使用 \(n – 1\),其中 \(n\) 是样本量,以修正偏差。
3. Defining Variance | 方差的定义
Variance is the average of the squared deviations from the mean. Squaring ensures that positive and negative deviations do not cancel each other out.
方差是各数据与均值之差的平方的平均值。平方运算确保了正负偏差不会相互抵消。
Population variance: σ² = Σ(xᵢ − μ)² / N
Here, μ is the population mean, xᵢ represents each data point, and N is the population size. For a sample, the formula becomes:
其中,μ 是总体均值,xᵢ 表示每个数据点,N 是总体容量。对于样本,公式变为:
Sample variance: s² = Σ(xᵢ − x̄)² / (n − 1)
Notice that the sample mean x̄ replaces μ, and we divide by n − 1 instead of n.
注意,样本均值 x̄ 取代了 μ,并且我们除以 n − 1 而不是 n。
4. Defining Standard Deviation | 标准差的定义
Standard deviation is simply the square root of the variance. It is expressed in the same units as the original data, making it easier to interpret.
标准差就是方差的正平方根。它与原数据具有相同的单位,因此更容易解释。
Population standard deviation: σ = √(σ²) = √(Σ(xᵢ − μ)² / N)
Sample standard deviation: s = √(s²) = √(Σ(xᵢ − x̄)² / (n − 1))
Because σ and s share the data’s unit, we can say “the scores are about 2.3 points away from the mean” — something impossible to say directly with variance.
因为 σ 和 s 与数据单位一致,我们可以说“这些分数大约偏离均值 2.3 分”——这是直接使用方差无法表达的。
5. Step-by-Step Calculation | 分步计算方法
To compute variance manually, follow these five steps:
手动计算方差,请遵循以下五个步骤:
- Find the mean of the data.
- Subtract the mean from each data point to get deviations.
- Square each deviation.
- Sum all squared deviations.
- Divide by N for population, or by n − 1 for sample.
求出数据的均值。
用每个数据点减去均值,得到偏差。
对每个偏差平方。
将所有平方偏差相加。
总体除以 N,样本除以 n − 1。
Finally, take the square root to obtain the standard deviation.
最后开平方根,得到标准差。
6. Worked Example | 计算实例
Let’s calculate the sample variance and standard deviation for the data set: 4, 8, 6, 5, 7.
让我们为数据集 4, 8, 6, 5, 7 计算样本方差和标准差。
Step 1: Compute the mean.
第一步:计算均值。
x̄ = (4 + 8 + 6 + 5 + 7) / 5 = 30 / 5 = 6
Step 2: Deviations from the mean:
第二步:各数据与均值的偏差:
4 − 6 = −2, 8 − 6 = 2, 6 − 6 = 0, 5 − 6 = −1, 7 − 6 = 1
Step 3: Square each deviation:
第三步:将每个偏差平方:
4, 4, 0, 1, 1
Step 4: Sum of squared deviations:
第四步:平方偏差之和:
4 + 4 + 0 + 1 + 1 = 10
Step 5: For a sample, divide by n − 1 = 4:
第五步:对于样本,除以 n − 1 = 4:
s² = 10 / 4 = 2.5
Thus, the sample standard deviation is:
因此,样本标准差为:
s = √2.5 ≈ 1.58
If this were a population, we would divide by N = 5 to get σ² = 2, and σ = √2 ≈ 1.41.
如果这是总体,我们会除以 N = 5,得到 σ² = 2,σ = √2 ≈ 1.41。
7. Why Use n − 1? | 为什么使用 n − 1?
The sample variance uses n − 1 to provide an unbiased estimate of the population variance. Dividing by n tends to underestimate the true variance, especially for small samples.
样本方差使用 n − 1 是为了提供总体方差的无偏估计。除以 n 往往会低估真实方差,尤其是在小样本情况下。
This adjustment is called Bessel’s correction. Intuitively, we already used the sample mean to compute deviations, which reduces the degrees of freedom by one.
这种调整称为贝塞尔校正。直观上,我们已经使用了样本均值来计算偏差,这使自由度减少了一个。
Degrees of freedom = n − 1 indicates the number of independent pieces of information available to estimate variability.
自由度 = n − 1 表示可用于估计变异性的独立信息数量。
8. Properties of Variance and Standard Deviation | 方差与标准差的性质
These measures obey several useful rules:
这些度量遵循几个有用的规则:
- Adding a constant to every data point does not change the variance or standard deviation.
- Multiplying every data point by a constant k multiplies the standard deviation by |k|, and the variance by k².
- The variance and standard deviation are always non-negative. They are zero only if all data values are identical.
对每个数据点加上一个常数,方差和标准差不变。
将每个数据点乘以常数 k,标准差变为原来的 |k| 倍,方差变为原来的 k² 倍。
方差和标准差始终非负。只有当所有数据值相同时,它们才为零。
9. Applications in Real Life | 在实际生活中的应用
Standard deviation and variance are widely used across many fields:
标准差和方差在许多领域中得到广泛应用:
- Finance: Stock return volatility is measured by the standard deviation of returns.
- Quality control: Manufacturing processes use standard deviation to monitor consistency and product specifications.
- Education: Test score variability helps teachers understand class performance.
- Weather: Temperature fluctuations are summarized through standard deviation.
金融:股票收益的波动性用收益的标准差来衡量。
质量控制:制造过程使用标准差来监控一致性和产品规格。
教育:考试分数的变异程度帮助教师了解班级表现。
气象:气温波动通过标准差来概括。
10. Variance vs. Standard Deviation: Which to Use? | 方差与标准差:使用哪一个?
Variance is useful in mathematical calculations because it avoids square roots and has additive properties in probability theory. However, its units are the square of the original data units, which can be confusing.
方差在数学计算中很有用,因为它避免了平方根,并在概率论中具有可加性。然而,它的单位是原数据单位的平方,这可能令人困惑。
Standard deviation is preferred for reporting and interpretation because it is in the same unit as the data. It directly describes the typical distance of values from the mean.
标准差更适用于报告和解释,因为它与数据单位一致。它直接描述了数值偏离均值的典型距离。
In many statistical formulas, variance is used internally, while standard deviation is reported in the final summary.
在许多统计公式中,方差在内部计算中应用,而标准差则在最终总结中报告。
11. Common Mistakes | 常见错误
Students often make these errors when calculating and interpreting spread:
学生在计算和解释离散程度时经常犯以下错误:
- Forgetting to square the deviations, which causes negative and positive deviations to cancel out.
- Using the sample formula instead of the population formula, or vice versa, without checking the context.
- Confusing the variance with the standard deviation and forgetting to take the square root.
- Interpreting standard deviation as the average distance, which is only approximate; the exact average of absolute deviations is a different measure.
忘记将偏差平方,导致正负偏差相互抵消。
没有检查语境,错误地使用样本公式或总体公式。
混淆方差与标准差,忘记开平方根。
将标准差解释为平均距离,这只是近似;绝对值偏差的平均值是另一种度量。
12. Summary | 总结
Variance and standard deviation are essential tools for measuring variability. The standard deviation is the square root of the variance and is expressed in the original units, making it more interpretable. Understanding these concepts enables deeper statistical analysis, from confidence intervals to hypothesis testing.
方差和标准差是衡量变异性的基本工具。标准差是方差的正平方根,并以原始单位表示,因此更具可解释性。理解这些概念能够帮助进行更深入的统计分析,从置信区间到假设检验。
Always remember: the larger the standard deviation, the more spread out the data are. Conversely, a smaller standard deviation indicates more consistent, clustered data.
始终记住:标准差越大,数据越分散。相反,标准差越小,数据越一致、越集中。
Published by TutorHao | 数学 Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导