S2 2.4 - Continuous expectation and variance
Calculate a continuous distribution's mean and variance by weighting values with density. Use these moments alongside total probability to determine unknown parameters, and check that the resulting density remains valid.
Integrating for the mean
If a density rises from zero to two across , where is its average value of ? The midpoint ignores that values towards the right receive more probability. The mean accounts for those unequal weights.
For a discrete variable, you used . A thin strip near , of width , has probability approximately . Its contribution to the weighted average is approximately . Taking all strips gives an integral.
Continuous expectation
For a variable with density ,
More generally,
These formulae are in the formula booklet. Integrate on the support, splitting at any changes of formula.
The mean is a weighted average of possible values, so for the bounded distributions here it must lie between the support endpoints. It need not equal the median or the mode.
Worked example 1: an increasing density
Find the mean for density on , zero otherwise.
Plan. Multiply the density by before integrating over the support.
Answer. .
Check. It lies within and to the right of the midpoint, where the greater density makes that reasonable. Independently, , so signed deviations balance.
Move the lower support boundary to one while keeping the density proportional to . Normalisation changes the coefficient, so do not simply shift the old mean.
Worked example 2: a changed support
Find the mean for density on , zero otherwise.
Plan. Use the actual support in the weighted integral.
Answer. .
Check. The density's total area is . Its mean lies inside the support and above its midpoint , consistent with the increasing density.
For a transformation, use rather than replacing the density. For example, , because .
A piecewise density needs the same weighting on every branch. The extra step is splitting the integral, rather than changing the definition of the mean.
Worked example 3: a piecewise mean
Find the mean for density on , on , and zero otherwise.
Plan. Multiply each density branch by , integrate on its own interval, then add.
Answer. .
Check. The two contributions to the integral of are and . They cancel, so signed deviations from this mean balance across the two pieces.
The factor is needed in both branches, just as it was for a single density formula.
Watch out
over the full support gives one, not the mean. The mean requires the factor .
Weight both pieces of a new density in the same way.
Second moments and variance
Variance weights squared distances from the mean, and an equivalent second-moment formula usually makes it easier to calculate.
Expand , multiply by and integrate. Since and , the result is .
Second moment and variance
In the formula booklet. The standard deviation is the square root of the variance.
The second moment squares the value , not the density. Squaring would give the wrong weighting and would not calculate .
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account