Practice Maths

Mean, Variance and Standard Deviation — Full Worked Solutions

← Back to Questions

Full Worked Solutions

  1. Question: X has distribution P(X=0)=0.2, P(X=1)=0.5, P(X=2)=0.3. Find E(X).

    Setting Up E(X)

    E(X) = ∑ x · P(X = x)

    = 0 × 0.2 + 1 × 0.5 + 2 × 0.3
    = 0 + 0.5 + 0.6
    = 1.1

    Interpretation: if we observed this random variable many times, the long-run average would approach 1.1.

  2. Question: Using the distribution from Q1, find Var(X) and SD(X).

    Step 1: Find E(X²)

    E(X²) = ∑ x² · P(X = x)
    = 0²(0.2) + 1²(0.5) + 2²(0.3)
    = 0 + 0.5 + 1.2
    = 1.7

    Step 2: Find Var(X)

    Var(X) = E(X²) − [E(X)]²
    = 1.7 − (1.1)²
    = 1.7 − 1.21
    = 0.49

    Step 3: Find SD(X)

    SD(X) = √Var(X) = √0.49 = 0.7

  3. Question: If E(X) = 4 and Var(X) = 9, find E(3X − 2) and Var(3X − 2).

    E(3X − 2)

    Using E(aX + b) = aE(X) + b with a = 3, b = −2:
    E(3X − 2) = 3E(X) − 2 = 3(4) − 2 = 12 − 2 = 10

    Var(3X − 2)

    Using Var(aX + b) = a²Var(X) with a = 3:
    Var(3X − 2) = 3² × Var(X) = 9 × 9 = 81

    Note: the constant b = −2 has no effect on variance — shifting a distribution does not change its spread.

  4. Question: X has distribution P(X=−1)=1/4, P(X=0)=1/2, P(X=1)=1/4. Find E(X) and E(X²).

    E(X)

    E(X) = (−1)(1/4) + 0(1/2) + 1(1/4)
    = −1/4 + 0 + 1/4
    = 0

    This makes sense — the distribution is symmetric about 0, so the mean is 0.

    E(X²)

    E(X²) = (−1)²(1/4) + 0²(1/2) + 1²(1/4)
    = 1/4 + 0 + 1/4
    = 1/2

    Therefore Var(X) = E(X²) − [E(X)]² = 1/2 − 0 = 1/2.

  5. Question: X has distribution P(X=0)=0.3, P(X=1)=0.4, P(X=2)=0.2, P(X=3)=0.1. Find E(X), Var(X), and SD(X).

    E(X)

    E(X) = 0(0.3) + 1(0.4) + 2(0.2) + 3(0.1)
    = 0 + 0.4 + 0.4 + 0.3
    = 1.1

    E(X²)

    E(X²) = 0²(0.3) + 1²(0.4) + 2²(0.2) + 3²(0.1)
    = 0 + 0.4 + 0.8 + 0.9
    = 2.1

    Var(X) and SD(X)

    Var(X) = 2.1 − (1.1)² = 2.1 − 1.21 = 0.89
    SD(X) = √0.89 ≈ 0.943

  6. Question: A game pays $5 if you roll a 6 on a fair die, and you lose $1 otherwise. Find the expected profit per game.

    Define the Random Variable

    Let X = profit per game.
    P(X = 5) = 1/6  (rolling a 6)
    P(X = −1) = 5/6  (rolling 1, 2, 3, 4, or 5)

    Compute E(X)

    E(X) = 5 × (1/6) + (−1) × (5/6)
    = 5/6 − 5/6
    = $0

    The game is perfectly fair. Over many plays, expected profit is zero. This illustrates why the expected value is called a “fair price” for a game.

  7. Question: X takes values 1, 2, 3 with P(X = k) = k/6. Find E(X), E(X²), and Var(X).

    Verify the Distribution

    P(X=1) = 1/6, P(X=2) = 2/6, P(X=3) = 3/6. Sum = 6/6 = 1 ✓

    E(X)

    E(X) = 1(1/6) + 2(2/6) + 3(3/6)
    = 1/6 + 4/6 + 9/6
    = 14/6 = 7/3 ≈ 2.333

    E(X²)

    E(X²) = 1²(1/6) + 2²(2/6) + 3²(3/6)
    = 1/6 + 8/6 + 27/6
    = 36/6 = 6

    Var(X)

    Var(X) = E(X²) − [E(X)]²
    = 6 − (7/3)²
    = 6 − 49/9
    = 54/9 − 49/9
    = 5/9 ≈ 0.556

  8. Question: X and Y are independent with E(X)=3, Var(X)=2, E(Y)=5, Var(Y)=4. Find E(2X−Y) and Var(2X−Y).

    E(2X − Y)

    Using linearity of expectation:
    E(2X − Y) = 2E(X) − E(Y) = 2(3) − 5 = 6 − 5 = 1

    Var(2X − Y)

    Write 2X − Y as 2X + (−1)Y. For independent variables:
    Var(2X − Y) = Var(2X) + Var(−Y)
    = (2²)Var(X) + (−1)²Var(Y)
    = 4(2) + 1(4)
    = 8 + 4
    = 12

    Key insight: variances always add when combining independent variables, regardless of whether you add or subtract them.

  9. Question: Lottery tickets cost $10 each. Out of 1000 tickets: one wins $1000, five win $50, the rest win nothing. Find E(net gain) per ticket.

    Define Net Gain

    Net gain = prize − cost of ticket ($10).

    Win $1000: net gain = $1000 − $10 = $990,   P = 1/1000
    Win $50: net gain = $50 − $10 = $40,   P = 5/1000
    Win $0: net gain = $0 − $10 = −$10,   P = 994/1000

    E(Net Gain)

    E(X) = 990 × (1/1000) + 40 × (5/1000) + (−10) × (994/1000)
    = 990/1000 + 200/1000 − 9940/1000
    = (990 + 200 − 9940)/1000
    = −8750/1000
    = −$8.75 per ticket

    On average, each ticket loses $8.75. The total prize pool is $1000 + 5($50) = $1250, but 1000 tickets at $10 each collect $10,000, confirming the lottery makes a profit of $8,750 on average.

  10. Question: X has E(X) = μ and Var(X) = σ². Prove that E[(X − μ)²] = σ² using Var(X) = E(X²) − [E(X)]².

    Expand the Square

    E[(X − μ)²] = E[X² − 2μX + μ²]

    Apply Linearity of Expectation

    = E(X²) − 2μ E(X) + μ²

    (Since μ is a constant: E(2μX) = 2μE(X) and E(μ²) = μ².)

    Substitute E(X) = μ

    = E(X²) − 2μ² + μ²
    = E(X²) − μ²
    = E(X²) − [E(X)]²
    = Var(X) = σ²

    This confirms that both definitions of variance — the definitional formula E[(X − μ)²] and the computational formula E(X²) − [E(X)]² — are algebraically identical.