📚 Variance of Discrete Random Variables: Calculation and Significance | IB数学:离散随机变量的方差计算与意义
In the study of probability and statistics within IB Mathematics, the variance of a discrete random variable is a fundamental measure of spread. While the mean tells us where the centre of a distribution lies, the variance quantifies how much the values of a random variable deviate from that centre on average. Understanding variance is essential not only for solving examination questions but also for interpreting real-world data and making informed decisions under uncertainty.
在IB数学的概率与统计学习中,离散随机变量的方差是一个衡量数据离散程度的基本指标。均值告诉我们分布的中心位置,而方差则量化了随机变量的取值在平均意义上偏离这个中心的程度。理解方差不仅对解答考试题目至关重要,也能帮助我们解读现实世界中的数据,并在不确定性下做出明智的决策。
1. Definition of Variance | 方差的定义
For a discrete random variable X with probability mass function P(X = x), the variance, denoted as Var(X) or σ², is defined as the expected value of the squared deviation of X from its mean μ. Formally,
对于概率质量函数为P(X = x)的离散随机变量X,其方差记为Var(X)或σ²,定义为X与其均值μ之差的平方的期望值。形式上表示为:
Var(X) = E[(X − μ)²] = Σ (x − μ)² · P(X = x)
where the summation is taken over all possible values of x that the random variable can take. The square root of the variance, σ, is called the standard deviation, which shares the same units as the original data.
其中求和覆盖随机变量所有可能取值x。方差的正平方根σ称为标准差,其单位与原数据保持一致。
2. The Mean and Its Role | 均值及其作用
Before calculating the variance, the mean μ must first be determined. The mean, or expected value, of a discrete random variable is given by:
在计算方差之前,需要先确定均值μ。离散随机变量的均值(即期望值)由下式给出:
E(X) = μ = Σ x · P(X = x)
The mean serves as the reference point against which each outcome is compared. A deviation (x − μ) can be positive or negative, but squaring ensures that all deviations contribute positively to the variance, preventing cancellation between positive and negative differences.
均值作为比较每个结果的参照点。偏差(x − μ)可正可负,但平方处理确保所有偏差对方差都作出正贡献,避免正负差异相互抵消。
3. Step-by-Step Calculation | 分步计算方法
To compute the variance of a discrete random variable, follow these steps:
计算离散随机变量的方差,可遵循以下步骤:
- Step 1: Calculate the mean μ using the formula μ = Σ x · P(X = x).
- 步骤1:使用公式μ = Σ x · P(X = x)计算均值μ。
- Step 2: For each value x, compute the squared deviation (x − μ)².
- 步骤2:对每一个取值x,计算平方偏差(x − μ)²。
- Step 3: Multiply each squared deviation by its corresponding probability P(X = x).
- 步骤3:将每个平方偏差乘以其对应的概率P(X = x)。
- Step 4: Sum all these products to obtain Var(X).
- 步骤4:将所有乘积求和得到Var(X)。
This procedure is direct and always applicable, provided the probability distribution is fully specified.
这一过程直观且始终适用,前提是概率分布已被完整给定。
4. Worked Example: Rolling a Fair Die | 例题:掷一颗均匀骰子
Consider a fair six-sided die. Let X be the score obtained in a single throw. The probability distribution is uniform: P(X = x) = 1/6 for x = 1, 2, 3, 4, 5, 6.
考虑一颗均匀的六面骰子。设X为单次投掷所得的点数。其概率分布为均匀分布:当x = 1, 2, 3, 4, 5, 6时,P(X = x) = 1/6。
First, compute the mean:
首先计算均值:
μ = (1+2+3+4+5+6) × (1/6) = 21/6 = 3.5
Next, compute the squared deviations and their weighted sum:
接下来计算平方偏差及其加权和:
| x | x − μ | (x − μ)² | (x − μ)² × P(X=x) |
|---|---|---|---|
| 1 | −2.5 | 6.25 | 1.0417 |
| 2 | −1.5 | 2.25 | 0.3750 |
| 3 | −0.5 | 0.25 | 0.0417 |
| 4 | 0.5 | 0.25 | 0.0417 |
| 5 | 1.5 | 2.25 | 0.3750 |
| 6 | 2.5 | 6.25 | 1.0417 |
Summing the final column:
Var(X) = 1.0417 + 0.3750 + 0.0417 + 0.0417 + 0.3750 + 1.0417 = 2.9167 ≈ 35/12
Thus, the variance of a fair die roll is 35/12, and the standard deviation is approximately 1.71.
因此,均匀骰子投掷的方差为35/12,标准差约为1.71。
5. The Alternative Formula E(X²) − [E(X)]² | 简化公式 E(X²) − [E(X)]²
Variance can also be calculated using a computationally more convenient formula:
方差还可以通过一个计算上更便捷的公式来计算:
Var(X) = E(X²) − [E(X)]²
where E(X²) = Σ x² · P(X = x). This formula is derived by expanding the squared term in the original definition and applying linearity of expectation. Many IB questions are designed to reward students who use this shortcut, as it simplifies arithmetic considerably.
其中E(X²) = Σ x² · P(X = x)。此公式由原始定义中的平方项展开并运用期望的线性性质推导而来。许多IB题目特意考查学生能否使用这一捷径,因为它能大幅简化运算。
6. Example Using the Alternative Formula | 使用简化公式的例题
Let us revisit the die example. First compute E(X²):
我们重新考察骰子例题。首先计算E(X²):
E(X²) = (1²+2²+3²+4²+5²+6²) × (1/6) = (91)/6 ≈ 15.1667
Since E(X) = 3.5, we have:
已知E(X) = 3.5,于是:
Var(X) = 15.1667 − (3.5)² = 15.1667 − 12.25 = 2.9167
This matches the previous result, confirming the validity of the shortcut. Notice how this method avoids computing six separate squared deviations.
这一结果与先前一致,验证了简化公式的正确性。注意该方法避免了逐一计算六个平方偏差。
7. Properties of Variance | 方差的性质
Understanding the algebraic properties of variance is crucial for solving more complex problems:
理解方差的代数性质对于解决更复杂的问题至关重要:
- Var(c) = 0, where c is a constant: there is no spread in a constant.
- Var(c) = 0,其中c为常数:常数没有离散度。
- Var(X + c) = Var(X): shifting all values by a constant does not change the spread.
- Var(X + c) = Var(X):所有取值平移一个常数不会改变离散程度。
- Var(cX) = c²Var(X): scaling a random variable by a factor c scales the variance by c².
- Var(cX) = c²Var(X):随机变量乘以常数c时,方差变为原来的c²倍。
- If X and Y are independent, Var(X + Y) = Var(X) + Var(Y).
- 若X与Y独立,则Var(X + Y) = Var(X) + Var(Y)。
These properties frequently appear in IB exam questions, particularly in combination with linear transformations of random variables.
这些性质在IB考试中频繁出现,尤其是在涉及随机变量线性变换的题目中。
8. Variance of Common Discrete Distributions | 常见离散分布的方差
IB Mathematics requires familiarity with the variance formulas for standard distributions:
IB数学要求熟悉几种标准分布的方差公式:
| Distribution | Parameters | Mean E(X) | Variance Var(X) |
|---|---|---|---|
| Discrete Uniform (1 to n) | n | (n+1)/2 | (n² − 1)/12 |
| Bernoulli | p | p | p(1 − p) |
| Binomial | n, p | np | np(1 − p) |
| Geometric | p | 1/p | (1 − p)/p² |
| Poisson | λ | λ | λ |
These formulas save significant time in examinations, and students should be comfortable deriving them from first principles if asked.
这些公式在考试中能节省大量时间,学生也应当具备从基本原理推导它们的能力,以防考题要求证明。
9. The Meaning of Variance in Context | 方差的实际意义
Variance is not merely a formula to memorise—it carries deep practical meaning. A small variance indicates that the outcomes are clustered closely around the mean, implying high predictability and low risk. Conversely, a large variance signifies that outcomes are spread widely, implying greater uncertainty and higher risk.
方差不仅仅是一个需要记忆的公式——它承载着深刻的实际意义。方差小表明结果紧密聚集在均值附近,意味着可预测性高、风险低。反之,方差大表明结果分布分散,意味着不确定性大、风险高。
In finance, variance is used to measure the volatility of asset returns. In quality control, a low variance in product dimensions indicates consistent manufacturing. In sports analytics, comparing the variance of players’ performances helps coaches identify consistency. These real-world connections illustrate why the concept is emphasised in the IB curriculum.
在金融领域,方差用于衡量资产收益的波动性。在质量控制中,产品尺寸的方差小表明制造过程稳定。在体育分析中,比较球员表现的方差有助于教练识别其稳定性。这些现实联系阐释了为什么IB课程如此强调这一概念。
10. Common Mistakes and How to Avoid Them | 常见错误及规避方法
Students often lose marks on variance questions due to avoidable errors. The most common pitfalls include:
学生常在方差题目中因可避免的错误而失分。最常见的陷阱包括:
- Forgetting to square the deviations: using (x − μ) instead of (x − μ)² results in incorrect answers and often zero variance.
- 忘记对偏差做平方:使用(x − μ)而非(x − μ)²会导致错误答案,甚至得出零方差。
- Confusing E(X²) with [E(X)]²: these are different unless the variance is zero. Always compute each separately.
- 混淆E(X²)与[E(X)]²:除非方差为零,否则二者不同。务必分别计算。
- Using the population variance formula incorrectly when the distribution is given as a sample: in probability problems, the distribution is the entire population by definition.
- 当分布以样本形式给出时,错误使用总体方差公式:在概率题中,所给分布本身即为总体。
- Forgetting to divide by the total number of outcomes when using equally likely outcomes approach.
- 在使用等可能结果的求解方法时,忘记除以结果总数。
To avoid these mistakes, always write down the formula first, verify that the probabilities sum to 1, and clearly separate the steps of computing μ and then Var(X).
为规避这些错误,建议先写出公式,确认所有概率之和为1,并清晰区分计算μ和Var(X)的步骤。
11. Exam-Style Question | 考试风格练习
A discrete random variable X has the following probability distribution:
设离散随机变量X具有如下概率分布:
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(X=x) | 0.1 | 0.3 | 0.4 | 0.2 |
(a) Find E(X).
(a) 求E(X)。
E(X) = 0(0.1) + 1(0.3) + 2(0.4) + 3(0.2) = 0 + 0.3 + 0.8 + 0.6 = 1.7
(b) Find E(X²).
(b) 求E(X²)。
E(X²) = 0²(0.1) + 1²(0.3) + 2²(0.4) + 3²(0.2) = 0 + 0.3 + 1.6 + 1.8 = 3.7
(c) Hence find Var(X).
(c) 由此求Var(X)。
Var(X) = E(X²) − [E(X)]² = 3.7 − (1.7)² = 3.7 − 2.89 = 0.81
The standard deviation is therefore √0.81 = 0.9.
因此标准差为√0.81 = 0.9。
12. Conclusion and Key Takeaways | 总结与核心要点
Variance is a powerful statistical tool that measures the spread of a discrete random variable. Mastering the definition, the shortcut formula, and the key properties will allow you to tackle IB questions with confidence. Remember that variance is always non-negative, zero only when the variable is constant, and its magnitude must be interpreted in the context of the units of measurement.
方差是衡量离散随机变量离散程度的强大统计工具。掌握定义、简化公式和关键性质,将使你自信地应对IB题目。切记:方差永远非负,只有当变量为常数时才为零,其大小须结合测量单位在具体情境中加以解读。
We encourage you to practise with a variety of distributions—binomial, Poisson, geometric, and custom-defined ones—to build fluency. The more familiar you are with the patterns, the faster and more accurately you will perform in examinations.
我们鼓励你使用各种分布(二项分布、泊松分布、几何分布以及自定义分布)进行练习,以培养熟练度。你越熟悉其中的规律,在考试中的答题速度和准确性就会越高。
Published by TutorHao | IB Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导