learn › Probability & Statistics

Expected value & variance

lesson · about 3 minutes

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 The expected value or the variance, from values and their probabilities.
  1. Expected value: multiply each value by its probability and add. Keep any minus signs.
  2. Mean of the squares: the same, with each value squared.
  3. Variance: the mean of the squares minus the expected value squared.

example X is 0 with probability 0.8 and 5 with probability 0.2. What is the variance of X?

  1. Expected value: 5 × 0.2 = 1.
  2. Mean of the squares: 25 × 0.2 = 5.
  3. Variance: 5 − 1 × 1 = 4.

Answer: 4

One order, times the orders The chance of exactly k successes in n tries.
  1. One order: p for each success and 1 − p for each failure, multiplied.
  2. Number of orders: C(n, k), the ways to choose which k tries succeed.
  3. Multiply the two and reduce.

example You flip a fair coin 4 times. What is the probability of exactly 2 heads? Answer as a fraction.

  1. One order, like HHTT: 1/2 × 1/2 × 1/2 × 1/2 = 1/16.
  2. Orders: C(4, 2) = 6.
  3. 6 × 1/16 = 6/16 = 3/8.

Answer: 3/8

Binomial mean and spread The mean or standard deviation of a count of successes.
  1. Mean: n × p.
  2. Standard deviation: the square root of n × p × (1 − p). Round only at the end.

example 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.

  1. Variance: 200 × 0.25 × 0.75 = 37.5.
  2. The square root of 37.5 ≈ 6.12.

Answer: 6.12

watch out for · 3 traps

practice

Sign in to try one

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?

  1. Weight each value by its chance: 76 × 0.25 + 19 × 0.75
  2. = 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?

  1. E[X] = 9 × 0.3 + 19 × 0.7 = 16.
  2. E[X²] = 81 × 0.3 + 361 × 0.7 = 277.
  3. 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.

  1. There are C(6, 1) = 6 orders with exactly 1 head, each with chance (1/2)⁶ = 1/64.
  2. 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.

  1. SD = √(np(1 − p)) = √(90 × 0.25 × 0.75) = √16.875 ≈ 4.1079, which rounds to 4.11.
  2. (The mean is np = 22.5.)

Answer: 4.11

Sign in to start