Mathematics guides →

Math · Expected value and variance

Same average wait? What expected value and variance tell you

Edited by: Hitoiki Arcade / Hitoiki Learning team · Published: · Editorial policy

For bus A, there is a 1/4 chance of waiting 2 minutes and a 3/4 chance of waiting 6 minutes. For bus B, the wait is always 5 minutes. These are invented schedules for the example. Using the probabilities, the average wait works out to 5 minutes for each bus. How does the spread compare?

An expected value is an average weighted by probabilities. To compare how much the waits vary, we also look at how far each possible wait is from its expected value. We will use models with a finite list of possible values and a known probability for each value.

Multiply each wait by its probability to find the expected value

Call the wait for bus A X. Imagine four tickets, all equally likely to be drawn, with “2 minutes” on one and “6 minutes” on the other three. The chances of drawing those waits match the probabilities for X. The ticket average is (2 + 6 + 6 + 6) ÷ 4 = 5 minutes. Grouping by value gives 2 × 1/4 + 6 × 3/4 = 5 minutes. For bus B, 5 minutes with probability 1 also gives 5 minutes.

We write the expected value as E[X]. Multiply each value by its probability, then add the products. For bus A, a single wait lasts 2 or 6 minutes. The 5-minute expected value represents the center after accounting for the chances of both waits.

Use the same method in the first quiz question. X equals 0 with probability 1/4 and 4 with probability 3/4, so E[X] = 0 × 1/4 + 4 × 3/4 = 3.

Square the deviations from the mean to find the variance

For bus A, a 2-minute wait is 3 minutes below the 5-minute mean, and a 6-minute wait is 1 minute above it. The deviations are −3 and +1 minutes. Their signed weighted average is (−3) × 1/4 + 1 × 3/4 = 0. The negative and positive deviations cancel, so to measure spread, square each deviation before weighting it by the original probability.

The weighted average of the squared deviations is the variance, written Var(X). For bus A, (−3)² × 1/4 + 1² × 3/4 = 3, in minutes squared. Bus B always has a deviation of zero, so its variance is zero minutes squared. To compare spreads in the original unit, take the square root of the variance. This gives the standard deviation, √3 minutes for bus A and 0 minutes for bus B.

In the second quiz question, 0 and 2 each have probability 1/2, so the mean is 1. The deviations are −1 and +1. Both square to 1, so the variance is 1 × 1/2 + 1 × 1/2 = 1.

Adding a fixed time shifts the mean, and changing units rescales the values

Add a fixed 4-minute walk to the wait for bus A. The total is now 6 or 10 minutes and its mean is 9 minutes. Both values and their mean increase by the same amount. The deviations stay at −3 and +1 minutes, so the variance stays at 3 minutes squared.

Express the wait for bus A in seconds. The waits of 2 and 6 minutes become 120 and 360 seconds, and their mean of 5 minutes becomes 300 seconds. The deviations become −180 and +60 seconds, 60 times their numerical values in minutes. The numerical variance is multiplied by 60², giving 10,800 seconds squared. The standard deviation is 60√3 seconds, the same duration as √3 minutes.

In general, if Y = aX + b, the expected value of Y is aE[X] + b. The same b is added to each scaled value and to the scaled mean, so b cancels when you subtract. Each deviation for Y is a times the corresponding deviation for X. Squaring multiplies it by a², so Var(Y) = a²Var(X). In the third quiz question, Y = 3X, so its variance is multiplied by 9.

Practice multiplying by two and adding one

X equals 1 or 5, each with probability 1/2. Find the expected value, variance and standard deviation of Y = 2X + 1.

The expected value of X is 3, and both squared deviations are 4. The expected value of Y is 2 × 3 + 1 = 7, its variance is 2² × 4 = 16, and its standard deviation is √16 = 4. You can check by listing the two values of Y. They are 3 and 11, so the deviations from 7 are −4 and +4, both with squared value 16.

When you have measured wait times, grouping the values into intervals helps you see the distribution. The related article shows how to read frequencies in a histogram with unequal interval widths.

TRY & READ

Check your understanding with examples

Compare the choices before opening the answer and explanation. Reading an example does not save a test answer or score.

Example 1 · Probability and statistics

X equals 0 with probability 1/4 and 4 with probability 3/4. What is E[X]?

  1. 1
  2. 3
  3. 2
  4. 4
Read the answer and explanation

Answer: 3

An expected value is a probability-weighted average; it need not be an outcome of a single trial. Weight each value by its probability and add: 0 × 1/4 + 4 × 3/4 = 3.

Sources for this example

Example 3 · Probability and statistics

Let Y = 3X. How does Var(Y) relate to Var(X)?

  1. 3Var(X)
  2. Var(X)+3
  3. Var(X)/3
  4. 9Var(X)
Read the answer and explanation

Answer: 9Var(X)

The deviations from the mean are multiplied by 3. Their squares are multiplied by 9, so Var(Y) = 9Var(X).

Sources for this example

Sources for this guide

Continue with a quiz

Topics: Probability and statistics. Range: General knowledge. Difficulty: Standard. These are selected initially. You can change these on the setup screen.

Try this topic in a quiz

This opens the setup screen with this subject and topic selected. Check the mode and question count before you start.

A test shows explanations after submission. Continuous challenge explains each answer. Review uses unresolved mistakes recorded on this device. Casual mode does not update learning records.

Enjoyed it? Share the link

Only the page address is shared. Your saves and results are not included.

Link to this page