Expected value & variance
Average outcomes, spread, and the binomial count.
Pen and paper is fine · a calculator helps on some problems why?
Opens at level 33. You're level 1. You can read and practice here now.
the idea
A random variable is a number decided by chance, like a game's payout. Its expected value is the long-run average: weight each value by its probability and add.
more of the idea
The variance is the average squared distance from that expected value, and its square root is the standard deviation. A binomial count is the number of successes in n independent tries, each with the same chance p. Its mean is np and its variance is np(1 − p).
techniques
Weight and add
- Expected value: multiply each value by its probability and add. Keep any minus signs.
- Mean of the squares: the same, with each value squared.
- Variance: the mean of the squares minus the expected value squared.
X is 0 with probability 0.8 and 5 with probability 0.2. What is the variance of X?
- Expected value: 5 × 0.2 = 1.
- Mean of the squares: 25 × 0.2 = 5.
- Variance: 5 − 1 × 1 = 4.
Answer: 4
One order, times the orders
- One order: p for each success and 1 − p for each failure, multiplied.
- Number of orders: C(n, k), the ways to choose which k tries succeed.
- Multiply the two and reduce.
You flip a fair coin 4 times. What is the probability of exactly 2 heads? Answer as a fraction.
- One order, like HHTT: 1/2 × 1/2 × 1/2 × 1/2 = 1/16.
- Orders: C(4, 2) = 6.
- 6 × 1/16 = 6/16 = 3/8.
Answer: 3/8
Binomial mean and spread
- Mean: n × p.
- Standard deviation: the square root of n × p × (1 − p). Round only at the end.
An event has a 25% chance on each of 200 independent trials. What is the standard deviation of the number of successes? Round to 2 decimal places.
- Variance: 200 × 0.25 × 0.75 = 37.5.
- The square root of 37.5 ≈ 6.12.
Answer: 6.12
watch out for
- Averaging the values and ignoring the probabilities.
- Giving the standard deviation when the question asks for the variance, or the other way round.
- Finding the chance of one particular order and forgetting the others. Exactly 3 heads in 5 flips can happen in 10 orders.
practice
New here? Start the four-problem warm-up. No sign-up.
Expected value
worked example
X is 76 with probability 0.25 and 19 with probability 0.75. What is the expected value of X?
- Weight each value by its chance: 76 × 0.25 + 19 × 0.75
- = 19 + 14.25 = 33.25.
Answer: 33.25
Variance
worked example
X is 9 with probability 0.3 and 19 with probability 0.7. What is the variance of X?
- E[X] = 9 × 0.3 + 19 × 0.7 = 16.
- E[X²] = 81 × 0.3 + 361 × 0.7 = 277.
- Var(X) = E[X²] − (E[X])² = 277 − 256 = 21.
Answer: 21
Exactly k successes
worked example
You flip a fair coin 6 times. What is the probability of getting exactly 1 head? Give the answer as a fraction in lowest terms.
- There are C(6, 1) = 6 orders with exactly 1 head, each with chance (1/2)⁶ = 1/64.
- So the probability is 6/64 = 3/32.
Answer: 3/32
Binomial mean & SD
worked example
Each item a machine makes has a 25% chance of being defective, independently of the others. A batch has 90 items. What is the standard deviation of the number of defective items in the batch? Round to 2 decimal places.
- SD = √(np(1 − p)) = √(90 × 0.25 × 0.75) = √16.875 ≈ 4.1079, which rounds to 4.11.
- (The mean is np = 22.5.)
Answer: 4.11