A waiting time measured in minutes has a variance measured in square minutes, which is awkward to set beside an actual wait. Taking a square root brings the spread back to minutes. What happens to the mean and to that spread if every wait gets five extra minutes, or if the times are recorded in seconds instead? This lesson defines the standard deviation, compares it with the mean absolute deviation, and derives exact rules for the variable when and are constants.
Key terms
Standard deviation
Definition Let be a random variable with a finite second moment , so that its mean and its variance are finite. The standard deviation of is the nonnegative square root of its variance,
It is often written . It is also called the root-mean-square deviation, a name that lists the operations from the outside in. The computation runs the other way. Take each deviation , square it, average the squares with the probability weights, and then take the root. The standard deviation has the same units as , and it equals exactly when .
In plain words Variance measures spread in squared units, and the square root brings it back to the units of . The standard deviation is a single summary of how far tends to fall from its mean, in which larger deviations count more because they are squared before averaging. It does not determine the whole distribution, and on its own it does not say how much probability lies within one standard deviation of the mean.
Example Let be a constructed waiting time in minutes that equals , or with probabilities , and . Its mean is minutes, its deviations from the mean are , and minutes, and the probability-weighted average of their squares is . So square minutes, and the standard deviation is minutes. Both and solve , and the definition takes the nonnegative one.
Mean absolute deviation
Definition For a random variable with finite mean , the mean absolute deviation is the probability-weighted average distance from the mean,
On this page it is always measured from the mean. When also has finite variance,
because gives . Equality holds exactly when is constant with probability , that is, when or when equals and with probability each for some .
In plain words Both numbers describe spread in the units of , but they are different measures. The mean absolute deviation averages the distances themselves, while the standard deviation averages the squared distances and then takes a root, which gives large deviations more weight. A number computed one way should not be reported under the other name.
Example For the waiting time , the distances from the mean are , and minutes, so the mean absolute deviation is minute, less than minutes. Now let equal or minutes with probability each. It has mean and variance , the same mean and standard deviation as . Yet never equals , while equals with probability , and the mean absolute deviation of is , the equality case. Two distributions with the same mean and standard deviation can still be different distributions.
Shift
Definition Let have finite mean and let be a constant. The shifted variable adds to every value of and keeps every probability. Linearity gives , so the deviations do not change,
If has finite variance, it follows that
In plain words Adding the same amount to every outcome slides the whole distribution, and its mean, by that amount. Each distance from the new mean equals the old distance from the old mean, so the spread stays the same. Adding to the standard deviation as well is a common mistake.
Example Add a fixed preparation time of minutes to every wait and let . The values become , and minutes with the same probabilities, and the mean becomes minutes. The deviations from are , and minutes, exactly as before, so square minutes and minutes.
Change of scale and change of units
Definition Let have finite variance and let be a constant. A change of scale multiplies by . Every deviation is multiplied by , since , and every squared deviation by . Hence
A change of units writes the same quantity on another scale. Often it multiplies by a positive conversion factor, such as from minutes to seconds, which is a change of scale. Some changes of units also add a constant, as in the conversion from degrees Celsius to degrees Fahrenheit, and those are affine transformations, described in the next card.
In plain words Doubling every value doubles every distance from the mean, so the standard deviation doubles and the variance, which is in squared units, becomes four times as large. A standard deviation is a number together with a unit. A change of units can make that number larger without the process becoming any less consistent, so spreads should be compared only on a common scale.
Example Record the waiting time in seconds as . The values become , and seconds, and the mean becomes seconds. The variance is square seconds, and the standard deviation is seconds, the same physical spread as minutes. The variance grew by the factor , while the standard deviation grew by the factor .
Affine transformation
Definition An affine transformation of a random variable is a random variable for constants and , a change of scale followed by a shift. If has finite variance, then
The reason is that the shift cancels from the deviation, . Squaring and taking expectations gives the variance, and the nonnegative square root of is . When , the variable is the constant and its variance and standard deviation are both . When , the order of the values is reversed, but the spread is not negative.
In plain words The shift moves the center and drops out of every distance from the center. The factor multiplies every distance from the center by , and a negative factor also mirrors the distribution. So the new standard deviation depends on the old one and on , and not on .
Example Define the score , so and . The rules give , and score units. A direct check agrees. The values , and go to , and , the deviations from are , and , and . The order of the outcomes is reversed, yet the standard deviation is positive.
Check yourself
- A score equals or with probability each, and . Find the mean, variance and standard deviation of , and check them by listing the values of .
Show the answer
The score has mean , deviations and , variance and standard deviation . With and , the affine rules give , and . Directly, equals or with probability each. Both values lie units from , which confirms the variance and the standard deviation . The negative factor swaps which value is larger, but distances from the mean stay nonnegative, so the spread is positive.
- A random temperature in degrees Celsius has mean and standard deviation . The same temperature in degrees Fahrenheit is . Find the mean, standard deviation and variance of . Someone reports the standard deviation in degrees Fahrenheit as . What went wrong?
Show the answer
This is an affine change of units with and . The mean is degrees Fahrenheit, the standard deviation is degrees Fahrenheit, and the variance is square degrees Fahrenheit. The added moves the zero point of the scale, so it changes the mean but cancels from every deviation. Adding it to the standard deviation is the mistake.
- Let equal with probability and with probability . Find its mean and standard deviation, and the probability that lies within one standard deviation of its mean. Is that probability close to 68 percent?
Show the answer
The mean is , and , so and . The interval from to contains the value but not the value , so the probability is , or 90 percent, and the answer is no. The figure of about 68 percent belongs to normal distributions and is not a property of standard deviations in general. How much probability lies within one standard deviation of the mean depends on the whole distribution.