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.