Skip to main content
返回术语表
statistics难度:基础statisticsprobabilityvariance
Share

方差fāngchā

variance
4 分钟阅读
更新于 2025-01-24
已完成

Core Concept

The variance of a random variable measures the spread or dispersion of its values around the expected value (mean).

Definition

For a random variable XX with expected value μ=E(X)\mu = E(X):

Var(X)=E[(Xμ)2]=E(X2)(E(X))2\text{Var}(X) = E\left[(X - \mu)^2\right] = E(X^2) - (E(X))^2

Notation

  • Var(X)\text{Var}(X) or V(X)V(X) - Variance of XX
  • σ2\sigma^2 (sigma squared) - Common symbol for variance
  • D(X)D(X) - Alternative notation (used in Chinese textbooks)

Two Formulas

Formula 1: Definition

Var(X)=E[(Xμ)2]=i=1n(xiμ)2pi\text{Var}(X) = E\left[(X - \mu)^2\right] = \sum_{i=1}^{n} (x_i - \mu)^2 \cdot p_i

Formula 2: Computational (more practical)

Var(X)=E(X2)(E(X))2\text{Var}(X) = E(X^2) - (E(X))^2

Memory aid: "Mean of squares minus square of mean"

Properties of Variance

1. Non-negativity

Var(X)0\text{Var}(X) \geq 0

Equality holds only when XX is constant.

2. Constant Factor

Var(aX)=a2Var(X)\text{Var}(aX) = a^2 \cdot \text{Var}(X)

Note: The factor is squared.

3. Adding a Constant

Var(X+b)=Var(X)\text{Var}(X + b) = \text{Var}(X)

Adding a constant doesn't change the spread.

4. Combined Linear Transformation

Var(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2 \cdot \text{Var}(X)

5. Sum of Independent Variables

If XX and YY are independent: Var(X+Y)=Var(X)+Var(Y)\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y)

Warning: This does NOT hold for dependent variables!

6. Variance of a Constant

Var(c)=0\text{Var}(c) = 0

Common Distributions

DistributionVariance
Bernoulli(pp)p(1p)p(1-p)
Binomial(n,pn, p)np(1p)np(1-p)
Uniform({1,...,n}\{1,...,n\})n2112\dfrac{n^2-1}{12}

CSCA Practice Problems

💡 Note: The following practice problems are designed based on the CSCA exam syllabus.

Example 1: Basic (Difficulty ★★☆☆☆)

A random variable XX has the distribution:

XX012
PP0.30.50.2

Find Var(X)\text{Var}(X).

Solution:

First, find E(X)E(X): E(X)=0(0.3)+1(0.5)+2(0.2)=0+0.5+0.4=0.9E(X) = 0(0.3) + 1(0.5) + 2(0.2) = 0 + 0.5 + 0.4 = 0.9

Find E(X2)E(X^2): E(X2)=02(0.3)+12(0.5)+22(0.2)=0+0.5+0.8=1.3E(X^2) = 0^2(0.3) + 1^2(0.5) + 2^2(0.2) = 0 + 0.5 + 0.8 = 1.3

Apply formula: Var(X)=E(X2)(E(X))2=1.30.81=0.49\text{Var}(X) = E(X^2) - (E(X))^2 = 1.3 - 0.81 = 0.49

Answer: Var(X)=0.49\text{Var}(X) = 0.49


Example 2: Intermediate (Difficulty ★★★☆☆)

If Var(X)=4\text{Var}(X) = 4, find Var(3X+2)\text{Var}(3X + 2).

Solution:

Using the property Var(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2 \cdot \text{Var}(X): Var(3X+2)=32Var(X)=9×4=36\text{Var}(3X + 2) = 3^2 \cdot \text{Var}(X) = 9 \times 4 = 36

Answer: 3636


Example 3: Intermediate (Difficulty ★★★☆☆)

A fair coin is tossed 100 times. Let XX be the number of heads. Find Var(X)\text{Var}(X).

Solution:

XX follows Binomial(n=100n=100, p=0.5p=0.5).

Var(X)=np(1p)=100×0.5×0.5=25\text{Var}(X) = np(1-p) = 100 \times 0.5 \times 0.5 = 25

Answer: Var(X)=25\text{Var}(X) = 25


Example 4: Advanced (Difficulty ★★★★☆)

If E(X)=2E(X) = 2 and E(X2)=8E(X^2) = 8, find Var(2X3)\text{Var}(2X - 3).

Solution:

First, find Var(X)\text{Var}(X): Var(X)=E(X2)(E(X))2=84=4\text{Var}(X) = E(X^2) - (E(X))^2 = 8 - 4 = 4

Then: Var(2X3)=22Var(X)=4×4=16\text{Var}(2X - 3) = 2^2 \cdot \text{Var}(X) = 4 \times 4 = 16

Answer: 1616


Example 5: Advanced (Difficulty ★★★★★)

If XX and YY are independent with Var(X)=2\text{Var}(X) = 2 and Var(Y)=3\text{Var}(Y) = 3, find Var(2X3Y+1)\text{Var}(2X - 3Y + 1).

Solution:

Using properties: Var(2X3Y+1)=Var(2X3Y)\text{Var}(2X - 3Y + 1) = \text{Var}(2X - 3Y) =Var(2X)+Var(3Y)= \text{Var}(2X) + \text{Var}(-3Y) (independence) =4Var(X)+9Var(Y)= 4\text{Var}(X) + 9\text{Var}(Y) =4(2)+9(3)=8+27=35= 4(2) + 9(3) = 8 + 27 = 35

Answer: 3535

Standard Deviation

The standard deviation is the square root of variance: σ=Var(X)\sigma = \sqrt{\text{Var}(X)}

Standard deviation has the same units as XX, making it more interpretable.

Variance vs. Expected Value

PropertyExpected Value E(X)E(X)Variance Var(X)\text{Var}(X)
MeasuresCenter (location)Spread (dispersion)
Linear transformE(aX+b)=aE(X)+bE(aX+b) = aE(X)+bVar(aX+b)=a2Var(X)\text{Var}(aX+b) = a^2\text{Var}(X)
SumAlways additiveAdditive only if independent

Common Mistakes

❌ Mistake 1: Forgetting to Square the Coefficient

Wrong: Var(3X)=3Var(X)\text{Var}(3X) = 3 \cdot \text{Var}(X)

Correct: Var(3X)=9Var(X)\text{Var}(3X) = 9 \cdot \text{Var}(X)

❌ Mistake 2: Adding Variances of Dependent Variables

Wrong: If XX and YY are dependent, Var(X+Y)=Var(X)+Var(Y)\text{Var}(X+Y) = \text{Var}(X) + \text{Var}(Y)

Correct: This only works for independent variables ✓

❌ Mistake 3: Confusing Variance with Standard Deviation

Wrong: Standard deviation of Binomial(n,pn,p) is np(1p)np(1-p)

Correct: Variance is np(1p)np(1-p); standard deviation is np(1p)\sqrt{np(1-p)}

Study Tips

  1. Use computational formula: E(X2)(E(X))2E(X^2) - (E(X))^2 is usually easier
  2. Remember coefficient is squared: Var(aX)=a2Var(X)\text{Var}(aX) = a^2\text{Var}(X)
  3. Check independence: Variance of sum only adds for independent variables
  4. Know binomial variance: np(1p)np(1-p) is frequently tested

💡 Exam Tip: When computing variance, always find E(X)E(X) and E(X2)E(X^2) separately first. The computational formula is less error-prone than the definition!