Expected Value and Variance

Master expected value and variance: mean, spread, probability distributions, and risk assessment through these 5 detailed exercises.

Expected Value and Variance Concepts
\(E(X) = \sum x_i \cdot P(x_i)\)
Expected Value (Mean)
\(\text{Var}(X) = E(X^2) - [E(X)]^2\)
Variance
\(\sigma = \sqrt{\text{Var}(X)}\)
Standard Deviation
Key Definitions:

Expected Value (Mean): The weighted average of all possible values of a random variable, weighted by their probabilities.

Variance: A measure of how spread out the values of a random variable are from the mean.

Standard Deviation: The square root of variance, representing average distance from the mean.

Random Variable: A variable whose possible values are outcomes of a random phenomenon.

Discrete Distribution: A probability distribution for a discrete random variable.

Properties: E(aX + b) = aE(X) + b, Var(aX + b) = a²Var(X)

Calculation Steps:
  1. Identify all possible values of the random variable
  2. Find the probability of each value
  3. Calculate expected value using E(X) = Σxᵢ·P(xᵢ)
  4. Calculate E(X²) using E(X²) = Σxᵢ²·P(xᵢ)
  5. Find variance using Var(X) = E(X²) - [E(X)]²
  6. Calculate standard deviation as σ = √Var(X)
Linearity: E(aX + bY) = aE(X) + bE(Y) for any constants a, b
Variance of Sum: Var(X + Y) = Var(X) + Var(Y) + 2Cov(X,Y) for dependent variables
Tip 1: Expected value is the "long-run average" if the experiment is repeated many times.
Tip 2: Variance measures the spread of the distribution around the mean.
Tip 3: Standard deviation has the same units as the original variable.
Solution: Exercises 1 to 3
1 Fair Die Roll
Exercise 1
A fair six-sided die is rolled. Find the expected value and variance of the number rolled.
Random Variable:

Let X = outcome of the die roll

Possible values: {1, 2, 3, 4, 5, 6}

Each outcome has probability 1/6

Step 1: Calculate expected value

\(E(X) = \sum_{i=1}^{6} x_i \cdot P(x_i) = 1 \cdot \frac{1}{6} + 2 \cdot \frac{1}{6} + 3 \cdot \frac{1}{6} + 4 \cdot \frac{1}{6} + 5 \cdot \frac{1}{6} + 6 \cdot \frac{1}{6}\)

\(E(X) = \frac{1 + 2 + 3 + 4 + 5 + 6}{6} = \frac{21}{6} = 3.5\)

Step 2: Calculate E(X²)

\(E(X^2) = \sum_{i=1}^{6} x_i^2 \cdot P(x_i) = 1^2 \cdot \frac{1}{6} + 2^2 \cdot \frac{1}{6} + 3^2 \cdot \frac{1}{6} + 4^2 \cdot \frac{1}{6} + 5^2 \cdot \frac{1}{6} + 6^2 \cdot \frac{1}{6}\)

\(E(X^2) = \frac{1 + 4 + 9 + 16 + 25 + 36}{6} = \frac{91}{6}\)

Step 3: Calculate variance

\(\text{Var}(X) = E(X^2) - [E(X)]^2 = \frac{91}{6} - (3.5)^2 = \frac{91}{6} - \frac{49}{4}\)

\(\text{Var}(X) = \frac{182}{12} - \frac{147}{12} = \frac{35}{12} \approx 2.917\)

Step 4: Calculate standard deviation

\(\sigma = \sqrt{\text{Var}(X)} = \sqrt{\frac{35}{12}} \approx 1.708\)

E(X) = 3.5, Var(X) = 35/12 ≈ 2.917, σ ≈ 1.708
Final Answer:

Expected value = 3.5, Variance = 35/12 ≈ 2.917, Standard deviation ≈ 1.708

2 Coin Flip Game
Exercise 2
A game involves flipping a fair coin. If heads, you win $3. If tails, you lose $1. Find the expected value and variance of your winnings.
Random Variable:

Let X = amount won (can be negative for losses)

Possible values: {$3, -$1}

P(X = $3) = 1/2, P(X = -$1) = 1/2

Step 1: Calculate expected value

\(E(X) = 3 \cdot \frac{1}{2} + (-1) \cdot \frac{1}{2} = \frac{3}{2} - \frac{1}{2} = 1\)

Step 2: Calculate E(X²)

\(E(X^2) = 3^2 \cdot \frac{1}{2} + (-1)^2 \cdot \frac{1}{2} = 9 \cdot \frac{1}{2} + 1 \cdot \frac{1}{2} = \frac{9}{2} + \frac{1}{2} = 5\)

Step 3: Calculate variance

\(\text{Var}(X) = E(X^2) - [E(X)]^2 = 5 - 1^2 = 5 - 1 = 4\)

Step 4: Calculate standard deviation

\(\sigma = \sqrt{\text{Var}(X)} = \sqrt{4} = 2\)

E(X) = $1, Var(X) = 4, σ = $2
Final Answer:

Expected value = $1, Variance = 4, Standard deviation = $2

3 Card Game
Exercise 3
A card is drawn from a standard deck. If it's a face card (J, Q, K), you win $5. If it's an ace, you win $2. Otherwise, you lose $1. Find expected value and variance.
Random Variable:

Let X = amount won (negative for loss)

Possible values: {$5, $2, -$1}

Face cards: 12 (3 per suit × 4 suits), Aces: 4, Other: 36

Step 1: Calculate probabilities

P(X = $5) = 12/52 = 3/13

P(X = $2) = 4/52 = 1/13

P(X = -$1) = 36/52 = 9/13

Step 2: Calculate expected value

\(E(X) = 5 \cdot \frac{3}{13} + 2 \cdot \frac{1}{13} + (-1) \cdot \frac{9}{13} = \frac{15}{13} + \frac{2}{13} - \frac{9}{13} = \frac{8}{13} \approx 0.615\)

Step 3: Calculate E(X²)

\(E(X^2) = 5^2 \cdot \frac{3}{13} + 2^2 \cdot \frac{1}{13} + (-1)^2 \cdot \frac{9}{13} = 25 \cdot \frac{3}{13} + 4 \cdot \frac{1}{13} + 1 \cdot \frac{9}{13}\)

\(E(X^2) = \frac{75}{13} + \frac{4}{13} + \frac{9}{13} = \frac{88}{13}\)

Step 4: Calculate variance

\(\text{Var}(X) = E(X^2) - [E(X)]^2 = \frac{88}{13} - \left(\frac{8}{13}\right)^2 = \frac{88}{13} - \frac{64}{169}\)

\(\text{Var}(X) = \frac{88 \cdot 13}{169} - \frac{64}{169} = \frac{1144 - 64}{169} = \frac{1080}{169} \approx 6.391\)

Step 5: Calculate standard deviation

\(\sigma = \sqrt{\text{Var}(X)} = \sqrt{\frac{1080}{169}} = \frac{\sqrt{1080}}{13} \approx 2.528\)

E(X) = $8/13 ≈ $0.615, Var(X) = 1080/169 ≈ 6.391, σ ≈ $2.528
Final Answer:

Expected value ≈ $0.615, Variance ≈ 6.391, Standard deviation ≈ $2.528

Solution: Exercises 4 to 5
4 Investment Portfolio
Exercise 4
An investment has the following possible returns and probabilities:
• 10% return with probability 0.2
• 5% return with probability 0.5
• 0% return with probability 0.2
• -5% return with probability 0.1
Find the expected return and variance of this investment.
Random Variable:

Let X = percentage return

Possible values: {10%, 5%, 0%, -5%}

Probabilities: {0.2, 0.5, 0.2, 0.1}

Step 1: Calculate expected value

\(E(X) = 10 \cdot 0.2 + 5 \cdot 0.5 + 0 \cdot 0.2 + (-5) \cdot 0.1 = 2 + 2.5 + 0 - 0.5 = 4\)

The expected return is 4%.

Step 2: Calculate E(X²)

\(E(X^2) = 10^2 \cdot 0.2 + 5^2 \cdot 0.5 + 0^2 \cdot 0.2 + (-5)^2 \cdot 0.1 = 100 \cdot 0.2 + 25 \cdot 0.5 + 0 \cdot 0.2 + 25 \cdot 0.1\)

\(E(X^2) = 20 + 12.5 + 0 + 2.5 = 35\)

Step 3: Calculate variance

\(\text{Var}(X) = E(X^2) - [E(X)]^2 = 35 - 4^2 = 35 - 16 = 19\)

Step 4: Calculate standard deviation

\(\sigma = \sqrt{\text{Var}(X)} = \sqrt{19} \approx 4.359\%\)

Step 5: Interpretation

This investment has an expected return of 4% but with significant risk (standard deviation of 4.359%).

E(X) = 4%, Var(X) = 19, σ ≈ 4.359%
Final Answer:

Expected return = 4%, Variance = 19, Standard deviation ≈ 4.359%

5 Sum of Two Dice
Exercise 5
Two fair dice are rolled. Let X be the sum of the numbers shown. Find E(X) and Var(X).
Random Variable:

Let X = sum of two dice

Possible values: {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}

Total possible outcomes: 36

Step 1: Calculate probabilities for each sum

Sum 2: (1,1) → P(X=2) = 1/36

Sum 3: (1,2), (2,1) → P(X=3) = 2/36

Sum 4: (1,3), (2,2), (3,1) → P(X=4) = 3/36

Sum 5: (1,4), (2,3), (3,2), (4,1) → P(X=5) = 4/36

Sum 6: (1,5), (2,4), (3,3), (4,2), (5,1) → P(X=6) = 5/36

Sum 7: (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) → P(X=7) = 6/36

Sum 8: (2,6), (3,5), (4,4), (5,3), (6,2) → P(X=8) = 5/36

Sum 9: (3,6), (4,5), (5,4), (6,3) → P(X=9) = 4/36

Sum 10: (4,6), (5,5), (6,4) → P(X=10) = 3/36

Sum 11: (5,6), (6,5) → P(X=11) = 2/36

Sum 12: (6,6) → P(X=12) = 1/36

Step 2: Calculate expected value

\(E(X) = \sum x_i \cdot P(x_i) = 2 \cdot \frac{1}{36} + 3 \cdot \frac{2}{36} + 4 \cdot \frac{3}{36} + 5 \cdot \frac{4}{36} + 6 \cdot \frac{5}{36} + 7 \cdot \frac{6}{36} + 8 \cdot \frac{5}{36} + 9 \cdot \frac{4}{36} + 10 \cdot \frac{3}{36} + 11 \cdot \frac{2}{36} + 12 \cdot \frac{1}{36}\)

\(E(X) = \frac{2 + 6 + 12 + 20 + 30 + 42 + 40 + 36 + 30 + 22 + 12}{36} = \frac{252}{36} = 7\)

Step 3: Calculate E(X²)

\(E(X^2) = 2^2 \cdot \frac{1}{36} + 3^2 \cdot \frac{2}{36} + 4^2 \cdot \frac{3}{36} + 5^2 \cdot \frac{4}{36} + 6^2 \cdot \frac{5}{36} + 7^2 \cdot \frac{6}{36} + 8^2 \cdot \frac{5}{36} + 9^2 \cdot \frac{4}{36} + 10^2 \cdot \frac{3}{36} + 11^2 \cdot \frac{2}{36} + 12^2 \cdot \frac{1}{36}\)

\(E(X^2) = \frac{4 + 18 + 48 + 100 + 180 + 294 + 320 + 324 + 300 + 242 + 144}{36} = \frac{1974}{36} = \frac{329}{6}\)

Step 4: Calculate variance

\(\text{Var}(X) = E(X^2) - [E(X)]^2 = \frac{329}{6} - 7^2 = \frac{329}{6} - 49 = \frac{329 - 294}{6} = \frac{35}{6} \approx 5.833\)

Step 5: Calculate standard deviation

\(\sigma = \sqrt{\text{Var}(X)} = \sqrt{\frac{35}{6}} \approx 2.415\)

E(X) = 7, Var(X) = 35/6 ≈ 5.833, σ ≈ 2.415
Final Answer:

Expected value = 7, Variance = 35/6 ≈ 5.833, Standard deviation ≈ 2.415

Comprehensive Summary: Expected Value and Variance
Core Concepts:

Expected Value: The theoretical average of a random variable over many trials.

Variance: A measure of how much the values of a random variable deviate from the mean.

Standard Deviation: The square root of variance, providing a measure of spread in the same units as the original variable.

Essential Formulas:
  1. Expected Value: \(E(X) = \sum x_i \cdot P(x_i)\)
  2. Variance: \(\text{Var}(X) = E(X^2) - [E(X)]^2\)
  3. Standard Deviation: \(\sigma = \sqrt{\text{Var}(X)}\)
  4. Linear Transformation: \(E(aX + b) = aE(X) + b\), \(\text{Var}(aX + b) = a^2\text{Var}(X)\)
Key Properties:

Linearity: \(E(aX + bY) = aE(X) + bE(Y)\) for any constants a, b

Independence: If X and Y are independent, then \(\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y)\)

Non-negativity: Variance is always ≥ 0

Zero Variance: If \(\text{Var}(X) = 0\), then X is a constant

Memory Tip: Expected value is the "center" of the distribution
Strategy Tip: Always verify that probabilities sum to 1
Visualization Tip: Higher variance means more spread out values
Verification Tip: Use E(X²) ≥ [E(X)]² (by Cauchy-Schwarz inequality)
Expected Value and Variance Calculation
1
List Possible Values
2
Find Probabilities
3
Calculate E(X)
4
Calculate E(X²)
5
Find Variance
6
Calculate Std Dev

Questions & Answers

Question: What does it mean when the expected value is different from any of the actual possible outcomes?

Answer: This is completely normal! The expected value is a theoretical average over many trials, not necessarily a possible outcome. For example, when rolling a fair die, the expected value is 3.5, which is impossible to get on a single roll. However, if you roll the die many times, the average of all results will approach 3.5.

Think of expected value as the "center of mass" of the probability distribution - it's where the distribution balances, even if that point isn't actually possible.

Question: Why do we use variance and standard deviation? What's the difference?

Answer: Both measure the spread of a distribution:

  • Variance: Measures average squared deviation from the mean. Units are squared, which makes interpretation less intuitive.
  • Standard Deviation: Square root of variance. Has the same units as the original variable, making it more interpretable.

We use both because variance is mathematically convenient for calculations, while standard deviation is more meaningful for interpretation. For example, if measuring heights in inches, variance would be in square inches, but standard deviation would be in inches.

Question: Can variance ever be negative? What does it mean if it is?

Answer: No, variance can never be negative! This is because variance is defined as the expected value of squared deviations: \(\text{Var}(X) = E[(X - E[X])^2]\).

Since we're squaring the deviations \((X - E[X])^2\), the result is always non-negative, and therefore the expected value (average) of these squared values is also non-negative.

If you calculate a negative variance, you made an error in your calculation. Common mistakes include forgetting to square the deviations or making arithmetic errors in the formula \(\text{Var}(X) = E(X^2) - [E(X)]^2\).