📚 Variance of Discrete Random Variables: Definition and Calculation | 离散随机变量方差的定义与计算
In A-Level Further Mathematics, the variance of a discrete random variable measures how spread out the possible values are around the mean. It is a core concept in probability and statistics, forming the foundation for standard deviation, expectation algebra, and many exam questions.
在 A-Level 进阶数学中,离散随机变量的方差衡量可能取值围绕均值的分散程度。它是概率与统计的核心概念,是标准差、期望运算以及许多考试题目的基础。
1. Review: Expectation of a Discrete Random Variable | 回顾:离散随机变量的期望
Before defining variance, we must recall the expected value. For a discrete random variable X with probability distribution P(X = x) = p, the expectation (mean) is given by the sum of each value multiplied by its probability.
在定义方差之前,我们必须回顾期望的概念。对于离散随机变量 X,其概率分布为 P(X = x) = p,期望(均值)等于每个取值乘以其概率后的总和。
E(X) = Σ x·P(X = x)
Here, the summation is over all possible values of X. The expectation represents the long-run average value of the random variable.
这里对所有可能的 X 取值求和。期望表示随机变量的长期平均值。
2. Definition of Variance | 方差的定义
Variance is the expected value of the squared deviation of a random variable from its mean. It quantifies dispersion: a larger variance means the values are more spread out, while a smaller variance means they are concentrated near the mean.
方差是随机变量与其均值之差的平方的期望值。它量化了离散程度:方差越大,取值越分散;方差越小,取值越集中在均值附近。
Var(X) = E[(X − E(X))²]
This definition directly measures the average squared distance from the mean. Since the deviations are squared, both positive and negative differences contribute equally.
这个定义直接度量了与均值的平均平方距离。由于偏差被平方,正负差异都会同等贡献。
3. Equivalent Computational Formula | 等价计算公式
In practice, we rarely use the definition directly. Instead, we use the computational formula, which is mathematically equivalent but usually easier to apply.
在实际计算中,我们很少直接使用定义式,而是使用等价的计算公式。它在数学上与定义式等价,但通常更容易应用。
Var(X) = E(X²) − [E(X)]²
This formula states that the variance equals the expectation of the square minus the square of the expectation. It is derived by expanding the square in the definition and using linearity of expectation.
该公式说明方差等于平方的期望减去期望的平方。它是通过展开定义中的平方并利用期望的线性性质推导出来的。
4. Proof of the Equivalence | 等价性的证明
Let μ = E(X). Then Var(X) = E[(X − μ)²] = E(X² − 2μX + μ²). By linearity of expectation, this equals E(X²) − 2μE(X) + μ². Since E(X) = μ, we obtain E(X²) − 2μ² + μ² = E(X²) − μ². Thus Var(X) = E(X²) − [E(X)]².
设 μ = E(X)。则 Var(X) = E[(X − μ)²] = E(X² − 2μX + μ²)。根据期望的线性性质,它等于 E(X²) − 2μE(X) + μ²。由于 E(X) = μ,得到 E(X²) − 2μ² + μ² = E(X²) − μ²。因此 Var(X) = E(X²) − [E(X)]²。
This proof is a frequent exam question, and you should be comfortable with every step.
这一证明是常见考题,你应该熟悉每一步。
5. Step-by-Step Calculation Procedure | 分步计算步骤
To calculate the variance of a discrete random variable, follow these steps:
要计算离散随机变量的方差,请按以下步骤进行:
-
List all possible values x and their probabilities p.
列出所有可能取值 x 及其概率 p。
-
Calculate E(X) = Σ x·p.
计算 E(X) = Σ x·p。
-
Calculate E(X²) = Σ x²·p.
计算 E(X²) = Σ x²·p。
-
Apply Var(X) = E(X²) − [E(X)]².
应用 Var(X) = E(X²) − [E(X)]²。
Always check that your probabilities sum to 1 before beginning.
开始前务必检查所有概率之和为 1。
6. Worked Example: Simple Distribution | 示例:简单分布
A random variable X has the following probability distribution:
随机变量 X 的概率分布如下:
| x | 1 | 2 | 3 | 4 |
| P(X=x) | 0.2 | 0.3 | 0.4 | 0.1 |
First compute the mean: E(X) = 1(0.2) + 2(0.3) + 3(0.4) + 4(0.1) = 0.2 + 0.6 + 1.2 + 0.4 = 2.4.
首先计算均值:E(X) = 1(0.2) + 2(0.3) + 3(0.4) + 4(0.1) = 0.2 + 0.6 + 1.2 + 0.4 = 2.4。
Next compute E(X²) = 1²(0.2) + 2²(0.3) + 3²(0.4) + 4²(0.1) = 0.2 + 1.2 + 3.6 + 1.6 = 6.6.
接着计算 E(X²) = 1²(0.2) + 2²(0.3) + 3²(0.4) + 4²(0.1) = 0.2 + 1.2 + 3.6 + 1.6 = 6.6。
Therefore Var(X) = 6.6 − 2.4² = 6.6 − 5.76 = 0.84.
因此 Var(X) = 6.6 − 2.4² = 6.6 − 5.76 = 0.84。
7. Standard Deviation | 标准差
The standard deviation is the square root of the variance. It is denoted by σ or sd(X).
标准差是方差的平方根,记作 σ 或 sd(X)。
σ = √Var(X)
Unlike variance, the standard deviation is expressed in the same units as the original data, making it easier to interpret. In the example above, σ = √0.84 ≈ 0.9165.
与方差不同,标准差与原始数据具有相同的单位,因此更容易解释。上例中,σ = √0.84 ≈ 0.9165。
8. Properties of Variance | 方差的性质
Several algebraic properties of variance are essential for solving problems:
方差的若干代数性质对解题至关重要:
-
Var(X + c) = Var(X) for any constant c. Adding a constant shifts the distribution but does not change spread.
对任意常数 c,Var(X + c) = Var(X)。加上常数会平移分布,但不会改变离散程度。
-
Var(aX) = a²Var(X) for any constant a. Scaling a variable by a scales the variance by the square of the factor.
对任意常数 a,Var(aX) = a²Var(X)。变量乘以 a 后,方差变为原来的 a² 倍。
-
Var(aX + b) = a²Var(X). This combines the two results above.
Var(aX + b) = a²Var(X)。这结合了上述两个结果。
These properties are frequently tested in examination questions.
这些性质在考试中经常被考查。
9. Independent Random Variables and Variance | 独立随机变量与方差
If X and Y are independent random variables, then the variance of their sum is the sum of their variances.
如果 X 和 Y 是独立随机变量,那么它们和的方差等于各自方差之和。
Var(X + Y) = Var(X) + Var(Y)
Similarly, Var(X − Y) = Var(X) + Var(Y) because subtracting independent variables still adds variances.
类似地,Var(X − Y) = Var(X) + Var(Y),因为对独立变量做减法时方差仍然相加。
This result does not hold for dependent variables; it requires independence.
该结论不适用于相关变量;它要求变量相互独立。
10. Worked Example: More Complex Distribution | 示例:更复杂的分布
Suppose X has the probability distribution given by P(X = 0) = 0.5, P(X = 1) = 0.3, P(X = 2) = 0.2. Find the variance.
设 X 的概率分布为:P(X = 0) = 0.5,P(X = 1) = 0.3,P(X = 2) = 0.2。求方差。
First, E(X) = 0(0.5) + 1(0.3) + 2(0.2) = 0.7. Then E(X²) = 0²(0.5) + 1²(0.3) + 2²(0.2) = 0 + 0.3 + 0.8 = 1.1. Hence Var(X) = 1.1 − 0.7² = 1.1 − 0.49 = 0.61.
首先,E(X) = 0(0.5) + 1(0.3) + 2(0.2) = 0.7。然后 E(X²) = 0²(0.5) + 1²(0.3) + 2²(0.2) = 0 + 0.3 + 0.8 = 1.1。因此 Var(X) = 1.1 − 0.7² = 1.1 − 0.49 = 0.61。
If we define Y = 3X + 2, then Var(Y) = 3²Var(X) = 9 × 0.61 = 5.49.
若定义 Y = 3X + 2,则 Var(Y) = 3²Var(X) = 9 × 0.61 = 5.49。
11. Common Mistakes and Exam Tips | 常见错误与考试技巧
Students often make the mistake of computing the variance as the mean of squares minus the square of the mean, but forgetting to use probabilities correctly. Always use the formula Var(X) = E(X²) − [E(X)]² with expectation computed as weighted sums.
学生常犯的错误是:在计算方差时虽然使用了“平方的均值减去均值的平方”,但未能正确使用概率权重。务必使用 Var(X) = E(X²) − [E(X)]²,其中期望是按概率加权的和。
Another common mistake is confusing E(X²) with (E(X))². They are generally not equal. Only for degenerate constants is the variance zero.
另一个常见错误是混淆 E(X²) 与 (E(X))²。它们通常不相等。只有当变量为退化常数时方差才为零。
When applying Var(aX + b), remember the constant b has no effect on variance.
应用 Var(aX + b) 时,记住常数 b 对方差没有影响。
12. Variance in Recognised Distributions | 常见分布中的方差
For the binomial distribution X ~ B(n, p), the variance is Var(X) = np(1 − p).
对于二项分布 X ~ B(n, p),方差为 Var(X) = np(1 − p)。
For the Poisson distribution X ~ Po(λ), the mean and variance are both equal to λ: Var(X) = λ.
对于泊松分布 X ~ Po(λ),其均值与方差都等于 λ:Var(X) = λ。
For a uniform distribution over values 1 to n, the variance is Var(X) = (n² − 1) / 12.
对于取值 1 到 n 上的均匀分布,方差为 Var(X) = (n² − 1) / 12。
These formulas can save time in exams, but you must still be able to derive them from the definition when required.
这些公式在考试中可以节省时间,但你也应该能够在需要时从定义出发推导它们。
Published by TutorHao | Further Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply