Continuous Expectation, Variance, And Transformations
Scope Label
Mixed scope. Integrating arbitrary pdfs to construct moments is conceptual support / enrichment under the current scope reference. The expectation, variance, transformation, and independent-sum laws are also prerequisites used directly in core normal-distribution questions. This note explains why those formulas behave as they do.
What This Note Assumes
You should already know:
- a pdf gives probability by area;
- ;
- describes centre;
- describes spread.
This note transfers the discrete expectation and variance ideas into the continuous setting.
Expectation as Continuous Weighted Average
For a discrete random variable,
For an absolutely continuous random variable, probability is spread continuously across the support. When , the corresponding formula is
The pieces have direct meaning:
- is the value being weighted;
- is the probability density near ;
- represents a tiny amount of probability;
- represents a tiny contribution to the average.
Expectation is therefore still a weighted average. It is not necessarily the most likely value, and it does not have to be a value that the random variable can actually take.
Variance as Average Squared Spread
If
then variance is
It measures average squared distance from the mean.
When the second moment is finite, the computational form is usually more efficient:
where
The standard deviation is
It returns the measure of spread to the original unit.
In the examples below these integrals converge. The existence conditions matter because not every density has a finite mean or variance.
Worked Example: Expectation and Variance from a Pdf
Let have density
and otherwise.
First check the pdf:
Now calculate the expectation:
Next calculate :
So
These values pass useful checks: lies inside the support , the variance is non-negative, and the standard deviation is
Variance has squared units; standard deviation returns to the original unit.
How to read this figure. The density puts more weight near , so its weighted centre is . Expectation is a balance point of probability weight, not necessarily the highest-density value.
The workflow is:
- check the total area is ;
- calculate using ;
- calculate using ;
- use .
Linear Transformations
For constants and ,
This rule matches the meaning of average. If every value of is multiplied by and then shifted by , the centre is multiplied by and shifted by .
Variance behaves differently:
The shift does not affect spread. It moves the whole distribution left or right without changing distances from the mean.
The scale factor changes distances by . Since variance uses squared distances, the variance changes by .
How to read this figure. The positive-scale case shifts and stretches without reflection. The negative-scale case reverses orientation as well; in both cases centre follows , spread follows , and variance follows .
The skewed piecewise-linear densities are illustrative. The expectation and variance laws in this section are general continuous-random-variable laws, not normal-distribution-only rules.
Worked Example: Linear Transformation After Finding Moments
Using the density from the earlier example,
we found
Suppose
Then
For variance,
The shift changes the centre but not the spread. The scale factor stretches distances from the mean by , so the variance is multiplied by .
For a negative-scale comparison, let . Since , the transformed support is ; the order reverses because the scale factor is negative. Moreover,
This is the same logic behind normal standardisation. If has mean and standard deviation , then
subtracts the centre and rescales the spread to standard-deviation unit size. The normal-distribution topic adds the special fact that this transformed variable follows the standard normal curve when is normal.
Equivalently, standardisation turns the mean into and the variance into when the original standard deviation is .
Useful Laws
For constants and ,
and
For variance,
and
These laws are the same structural laws used for discrete random variables. The difference is how and may be computed when a pdf is given.
Sums and Differences of Random Variables
For random variables and ,
and
These expectation laws do not require independence.
For variance, independence is the standard sufficient condition used in H2 questions. If and are independent, then
and
The second formula often surprises students. Variance does not subtract for because spread from independent sources accumulates.
Independence is sufficient rather than logically necessary: zero covariance also makes the cross-term vanish. If independence or equivalent information is not given, do not use the simple variance-addition rules.
Why These Laws Matter for Normal Distribution
In the normal-distribution topic, you often meet statements such as:
- ;
- is also normally distributed;
- sums of independent normal variables are normal;
- standardisation subtracts the mean and divides by the standard deviation.
Those procedures depend on the expectation and variance laws here.
For example, if
then
and
So Continuous Random Variables explains what happens to centre and spread. Special Continuous Random Variables then applies those ideas to the special shape of a normal distribution.
Common Pitfalls
| Mistake | Better thinking |
|---|---|
| Treating expectation as the most likely value | Expectation is a weighted average. |
| Forgetting the domain in an integral | Integrate over the support of the pdf. |
| Using instead of | These are different quantities. |
| Writing | Variance rescales by and is not shifted by . |
| Subtracting variances for | For independent variables, variances add for both sums and differences. |
| Using variance-addition without justification | Independence is the usual sufficient condition supplied in H2 questions. |
Revision Checklist
- Can you explain as a continuous weighted average?
- Can you calculate and from a simple pdf?
- Can you use ?
- Can you explain why adding changes expectation but not variance?
- Can you explain why multiplying by changes variance by ?
- Can you state when variances of sums or differences may be added?
- Can you connect these laws to normal-distribution transformations?
- Can you explain why standardisation changes mean to and variance to ?