Variance & Standard Deviation
The mean locates a random variable; the variance measures how far it typically strays from that centre. For with mean , Definition 13.4 sets — the average squared deviation from the mean — written , with its square root the standard deviation restoring the original units. Squaring the deviation inside the expectation makes Proposition 13.2 a sum for a discrete variable, , but expanding that square yields the far handier computational formula of Proposition 13.3, — the mean of the square minus the square of the mean. From the definition flow the transformation rules of Proposition 13.4: a shift moves the centre but not the spread, while a scale factor comes out squared, (so ). Finally Proposition 13.5 reads off the extreme case — precisely when is almost surely constant. (The specific variances of the Bernoulli, binomial, uniform and geometric families, Examples 13.9–13.12, are collected in a separate lesson on the moments of named distributions.)
Before you start — give these a try
Attempting first primes your brain for the lesson — even if you miss. Nothing is graded or saved; it's just a warm-up.
A random variable has p.m.f. , , . Find the standard deviation . Give your answer as a decimal to places.
Which of the following is the computational formula for the variance of a random variable (Proposition 13.3)?
What you’ll be able to do
- State Definition 13.4: the variance with , the notation , and the standard deviation .
- Compute a variance directly from a p.m.f. using the discrete formula (Proposition 13.2).
- Apply the computational formula (Proposition 13.3) as the fast route to a variance from the first two moments.
- Use the scaling law (Proposition 13.4) and read off that an additive shift leaves spread unchanged while .
- Interpret variance and standard deviation as measures of spread about the mean: always, with exactly when is almost surely constant (Proposition 13.5).
In your course
· MATH2015 · Linear Algebra & Probability- Definition 13.3MomentsThe th moment of is ; the second moment is called the mean square.
- Definition 13.4Variance, with standard deviation .
- Proposition 13.2Variance from the p.m.f. or densityDiscrete: ; density : .
- Proposition 13.3Computational formula for variance.
- Proposition 13.4Mean and variance ofand .
- Proposition 13.5Zero variance, with if and only if is almost surely constant ().
Variance: the average squared deviation
The mean says where a random variable sits; it says nothing about how tightly its values cluster there. Variance fills that gap. Measuring a typical deviation directly is useless because departures above and below the mean cancel: for every . The remedy is to square the deviation before averaging, so that every discrepancy counts positively. Definition 13.4 therefore sets the mean squared deviation from , written . For a discrete , Proposition 13.2 turns this expectation into a weighted sum over the possible values, (with the integral when has density ). Each term weighs how far a value lies from the mean, squared, by how likely that value is: a variable that can land far from with appreciable probability has a large variance, and one glued near a small one. Because the deviation is squared, variance carries the square of 's units — one reason the standard deviation is often reported in its place.
The computational formula $\mathbb{E}[X^2]-\mu^2$
Summing works, but it is clumsy: it needs first and then a fresh pass squaring each centred value. Expanding the square gives a shortcut. Since and is a constant, linearity of expectation yields which collapses to the computational formula of Proposition 13.3: In words, variance is the mean of the square minus the square of the mean. In practice you read two ordinary expectations off the p.m.f. — and the second moment — and subtract . This is almost always the quicker computation by hand, and it is the route used throughout this lesson. It even carries a free sanity check: because , you must always find , so a negative answer signals an arithmetic slip.
Standard deviation: spread in the original units
Variance is measured in the square of 's units — square dollars, square seconds — which makes its size awkward to interpret next to the mean. Taking the square root cures this. The standard deviation is a nonnegative number back in the original units of , representing a typical distance of from its mean. A small means the distribution is concentrated near ; a large means it is widely spread. Variance and standard deviation carry exactly the same information — each determines the other — but is the one you can sensibly compare to , or mark off on the same axis as the values of . In practice you finish most variance computations by taking a square root to report .
Shifting, scaling, and zero variance
Variance responds to the two basic transformations of a random variable in a memorable way. Proposition 13.4 states that for constants , Two things stand out. First, the additive constant disappears: adding slides the whole distribution along the line without changing how spread out it is, so — spread is about distances between values, and a rigid shift preserves those distances. Second, the multiplier comes out squared, not linearly: stretching values by stretches every deviation by , hence every squared deviation by . At the level of the standard deviation this reads cleanly as (the absolute value because a standard deviation is never negative). A useful consequence is that , not . At the opposite extreme, Proposition 13.5 pins down when there is no spread at all: since is the expectation of a nonnegative quantity it is always , and it equals exactly when is almost surely constant, i.e. . (The variances of the standard families — for a Bernoulli, for a binomial, for a uniform, for a geometric — are gathered in a separate lesson on the moments of named distributions.)
Let be a random variable with mean . Its variance is also written . The standard deviation is . For a discrete , (Proposition 13.2), and when has density .
For any random variable with a well-defined mean ,
Let . Provided the mean and variance of exist, Equivalently, .
For any random variable, , and if and only if is almost surely constant, i.e. where .
Worked examples
A random variable has p.m.f. , , . Find , compute using the computational formula , and give the standard deviation.
- 1
Mean.
- 2
Second moment.
- 3
Computational formula (Proposition 13.3).
- 4
Cross-check with the definition. — the same value.
- 5
Standard deviation.
Let have p.m.f. , . (a) Find and . (b) Use Proposition 13.4 to find and . (c) What is ?
Let , so and . Compute directly, confirm it matches the Bernoulli formula , and give .