This page is a drill through every case the properties of expected value, variance and standard deviation can throw at you. Before we solve anything, we lay out a map of all the case classes so you can see that nothing is left out. Then every worked example is tagged with the map cell it covers.
If a symbol here is unfamiliar, it was built in the parent note — but we re-anchor each one as we use it, from zero.
Read this as: "what could possibly change from problem to problem?" Each row is a distinct kind of situation. Our examples below are chosen so that every row gets hit at least once .
#
Case class
What is tricky about it
Covered by
A
Positive scale, shift (a X + b , a > 0 )
shift must vanish, scale squares
Ex 1
B
Negative scale (a < 0 )
SD uses ∣ a ∣ ; sign traps
Ex 2
C
Zero scale / degenerate constant (a = 0 )
variance collapses to 0
Ex 3
D
Sum of independent variables
covariance term dies
Ex 4
E
Sum of dependent variables (incl. X + X )
must keep 2 Cov
Ex 5
F
Limiting behaviour (Bernoulli spread vs p )
where is spread biggest/zero?
Ex 6
G
Real-world word problem (units, money)
translate words → symbols
Ex 7
H
Exam twist — average of n i.i.d. (shrinking spread)
connects to big theorems
Ex 8
Intuition The two moves that generate every row
Everything is combinations of just two operations on a random variable: stretch/flip (multiply by a ) and slide (add b ), plus combine (add two variables). Rows A–C are stretch/flip/slide; rows D–E are combine; F–H are these under a limit or a story.
We will lean on three tools. Here they are in one place, each with the question it answers :
Here E [ X ] means the average value (balance point) of X ; Var ( X ) is the average squared distance from that balance point ; SD ( X ) = Var ( X ) brings us back to ordinary units; and Cov ( X , Y ) = E [ X Y ] − E [ X ] E [ Y ] measures how two variables move together .
Our running character is the fair die : X ∈ { 1 , 2 , 3 , 4 , 5 , 6 } , each with probability 6 1 . From the parent note we already know its two summaries:
E [ X ] = 3.5 , Var ( X ) = 12 35 ≈ 2.9167 , SD ( X ) ≈ 1.708.
The picture below is the whole idea of stretch-and-slide on a mass distribution — keep it in your mind for the first three examples.
Worked example Convert die pips to a score
A game turns each die roll into a score Y = 10 X + 5 . Find E [ Y ] , Var ( Y ) , SD ( Y ) .
Forecast: guess before reading — does the "+ 5 " change the spread? Does the "10 " multiply the variance by 10 or by something else?
Step 1. E [ Y ] = 10 E [ X ] + 5 = 10 ( 3.5 ) + 5 = 40 .
Why this step? Mean is linear — a stretch scales the centre, a slide moves it. Both survive.
Step 2. Var ( Y ) = 1 0 2 Var ( X ) = 100 ⋅ 12 35 = 12 3500 ≈ 291.67 .
Why this step? The + 5 slides the whole mass rigidly — distances-to-centre are unchanged, so it vanishes from variance. The 10 stretches every distance by 10 ; squared distances by 1 0 2 .
Step 3. SD ( Y ) = ∣ 10 ∣ ⋅ 1.708 = 17.08 .
Why this step? SD is a distance, so it scales by the raw factor (absolute value), not its square.
Verify: 291.67 ≈ 17.08 ✓, matching Step 3. Units check: if pips scale by 10 , spread in "score units" scales by 10 — consistent.
Worked example Flip the die
Let Z = − 2 X + 1 . Find E [ Z ] , Var ( Z ) , SD ( Z ) .
Forecast: the − 2 flips the distribution left-to-right. Does variance become negative ? Does SD become − 2 ⋅ 1.708 ?
Step 1. E [ Z ] = − 2 ( 3.5 ) + 1 = − 6 .
Why this step? Linearity of the mean holds for any sign of a ; the flip drags the centre to the negative side.
Step 2. Var ( Z ) = ( − 2 ) 2 Var ( X ) = 4 ⋅ 12 35 = 12 140 = 3 35 ≈ 11.667 .
Why this step? a 2 = ( − 2 ) 2 = 4 — squaring erases the sign . Variance can never be negative; a mirror flip does not change how scattered the points are.
Step 3. SD ( Z ) = ∣ − 2 ∣ ⋅ 1.708 = 2 ⋅ 1.708 = 3.416 .
Why this step? SD uses ∣ a ∣ . Writing − 2 ⋅ 1.708 would give a negative "distance", which is impossible.
Verify: 35/3 ≈ 3.416 ✓. Sanity: reflecting a cloud of darts about a point leaves the cloud equally wide.
Worked example A "die" that is really a constant
Let C = 0 ⋅ X + 7 = 7 always. Find E [ C ] , Var ( C ) , SD ( C ) .
Forecast: if a number never changes, what should its "spread" be?
Step 1. E [ C ] = 0 ⋅ 3.5 + 7 = 7 .
Why this step? The mean of a constant is the constant — there is only one value.
Step 2. Var ( C ) = 0 2 ⋅ Var ( X ) = 0 .
Why this step? Every outcome equals the mean, so every squared distance from the mean is 0 ; their average is 0 . This is the degenerate case: all mass sits at one point.
Step 3. SD ( C ) = 0 = 0 .
Why this step? No scatter at all.
Verify: using the computational formula Var ( C ) = E [ C 2 ] − ( E [ C ] ) 2 = 49 − 49 = 0 ✓.
Intuition Zero variance ⟺ no randomness
Var ( X ) = 0 exactly when X is a constant (with probability 1 ). It is the floor: variance is never below 0 .
Worked example Two independent dice
Roll two independent fair dice X 1 , X 2 and let S = X 1 + X 2 . Find E [ S ] , Var ( S ) , SD ( S ) .
Forecast: the mean surely doubles to 7 . Does the variance also just double?
Step 1. E [ S ] = E [ X 1 ] + E [ X 2 ] = 3.5 + 3.5 = 7 .
Why this step? Linearity of expectation holds always , independent or not.
Step 2. Because the dice are independent, Cov ( X 1 , X 2 ) = 0 , so
Var ( S ) = Var ( X 1 ) + Var ( X 2 ) = 12 35 + 12 35 = 12 70 = 6 35 ≈ 5.833.
Why this step? One die tells you nothing about the other, so there is no "moving together" term to add. See Covariance and Correlation for why independence forces Cov = 0 .
Step 3. SD ( S ) = 35/6 ≈ 2.415 .
Why this step? Root returns to pip units.
Verify: 2 × 2.9167 = 5.833 ✓. Note SD ( S ) ≈ 2.415 is less than 2 × 1.708 = 3.416 : independent spreads add in quadrature (like Pythagoras), not linearly. This is the seed of the Law of Large Numbers .
Worked example The self-sum trap
For one die X , compare Var ( X + X ) with the "independent guess" 2 Var ( X ) .
Forecast: X + X and 2 X are the same thing. Does the sum rule still give 2 Var ( X ) ?
Step 1. X + X = 2 X , so by the scale rule Var ( 2 X ) = 2 2 Var ( X ) = 4 ⋅ 12 35 = 3 35 ≈ 11.667 .
Why this step? This is stretch-by-2 , cell B/A machinery — no independence assumed.
Step 2. Now via the sum rule with Y = X : Cov ( X , X ) = Var ( X ) (a variable is perfectly correlated with itself). So
Var ( X + X ) = Var ( X ) + Var ( X ) + 2 Var ( X ) = 4 Var ( X ) .
Why this step? Cov ( X , X ) = E [ X ⋅ X ] − E [ X ] E [ X ] = E [ X 2 ] − μ 2 = Var ( X ) — that IS the definition of variance.
Step 3. Both routes agree: 4 ⋅ 12 35 = 3 35 ≈ 11.667 , not 2 ⋅ 12 35 ≈ 5.833 .
Why this step? The naive "just add variances" answer is wrong by exactly the 2 Cov term.
Verify: 35/3 ≈ 11.667 from Step 1 equals 4 × 2.9167 ✓. The dependent answer is double the independent answer of Ex 4 — dependence matters enormously.
Worked example Bernoulli spread as
p varies
An indicator X is 1 with probability p , else 0 . Its variance is Var ( X ) = p ( 1 − p ) . For which p is spread largest? What happens at the limits p → 0 and p → 1 ?
Forecast: a coin is "most uncertain" at p = 2 1 . Do you expect variance to peak there and vanish at the ends?
Step 1. Write v ( p ) = p ( 1 − p ) = p − p 2 .
Why this step? We turn "spread vs p " into a plain function of one variable so we can find its top.
Step 2. The top is where the slope is zero: v ′ ( p ) = 1 − 2 p = 0 ⇒ p = 2 1 , giving v ( 2 1 ) = 4 1 .
Why the derivative? v ′ ( p ) answers "is spread still rising as I nudge p ?" It crosses zero exactly at the peak.
Step 3. Limits: v ( 0 ) = 0 and v ( 1 ) = 0 .
Why this step? At p = 0 (never happens) or p = 1 (always happens) the outcome is a constant — that is the degenerate zero-variance case from Ex 3.
Verify: v ( 0.5 ) = 0.25 ; v ( 0.1 ) = 0.09 ; v ( 0 ) = v ( 1 ) = 0 ✓. The curve is an upside-down parabola peaking at the fair coin — see Bernoulli and Binomial Distributions .
Worked example Daily profit
A stall's daily demand D (units sold) has E [ D ] = 40 and SD ( D ) = 6 . Each unit gives $3 profit but there is a fixed $20 daily rent. Profit is P = 3 D − 20 . Find the mean profit and its standard deviation.
Forecast: does the $20 rent affect how variable profit is day to day?
Step 1. Translate words to symbols: P = 3 D − 20 , so a = 3 (dollars per unit), b = − 20 (fixed rent).
Why this step? Every "per-unit price" is a scale a ; every "fixed cost" is a shift b .
Step 2. E [ P ] = 3 E [ D ] − 20 = 3 ( 40 ) − 20 = 100 dollars.
Why this step? Linearity of the mean.
Step 3. Var ( D ) = SD ( D ) 2 = 6 2 = 36 , so Var ( P ) = 3 2 ⋅ 36 = 324 , and SD ( P ) = ∣ 3 ∣ ⋅ 6 = 18 dollars.
Why this step? Fixed rent slides profit down but does not change day-to-day scatter, so b = − 20 drops out. The $3/unit stretches the scatter by 3 .
Verify: 324 = 18 ✓. Units: SD of P is in dollars (=3\ \tfrac{\ }{\text{unit}}\times 6\ \text{units}) ✓. Mean \ 100, typical swing $18.
Worked example Why averaging tames randomness
Take n independent fair dice and form the sample mean X ˉ n = n X 1 + ⋯ + X n . Find E [ X ˉ n ] and Var ( X ˉ n ) . What happens as n → ∞ ?
Forecast: the average is still "around 3.5 ". Does its spread stay the same, grow, or shrink as n grows?
Step 1. E [ X ˉ n ] = n 1 ∑ i = 1 n E [ X i ] = n 1 ⋅ n ⋅ 3.5 = 3.5 .
Why this step? Linearity: the mean of an average of same-mean variables is that common mean, for any n .
Step 2. Independence lets variances add: Var ( ∑ i X i ) = n Var ( X ) . Then the n 1 is a scale, squared:
Var ( X ˉ n ) = n 2 1 ⋅ n Var ( X ) = n Var ( X ) = n 35/12 .
Why this step? Sum rule (cell D) then scale rule (cell A) with a = n 1 , so a 2 = n 2 1 .
Step 3. As n → ∞ , Var ( X ˉ n ) = n 35/12 → 0 , and SD ( X ˉ n ) = n 1.708 shrinks like 1/ n .
Why this step? Dividing by n drives the spread to zero — the average concentrates on 3.5 .
Verify (numeric): for n = 100 , Var ( X ˉ 100 ) = 100 35/12 ≈ 0.029167 and SD ≈ 0.1708 ✓. The mean is pinned at 3.5 but the swing is 10 × smaller than one die. This is the mechanism behind the Law of Large Numbers and the 1/ n scale in the Central Limit Theorem .
Recall One-line answers to the whole matrix
Shift b in Var ? ::: Always vanishes — spread is shift-invariant.
Scale a in Var ? ::: Multiplies by a 2 ; in SD by ∣ a ∣ .
Var of a constant? ::: Exactly 0 (degenerate).
Var ( X + Y ) for independent X , Y ? ::: Var ( X ) + Var ( Y ) .
Var ( X + X ) ? ::: 4 Var ( X ) , not 2 Var ( X ) — Cov ( X , X ) = Var ( X ) .
Where is Bernoulli spread largest? ::: At p = 2 1 , value 4 1 ; zero at p = 0 , 1 .
Var of the average of n i.i.d.? ::: Var ( X ) / n → 0 ; SD shrinks like 1/ n .
Mnemonic Shift slides, scale squares, sums need covariance
Three words carry cells A–E: slide (shift does nothing to spread), square (scale enters as a 2 ), covariance (sums only add cleanly when it's zero).