Mean and Variance of Continuous Random Variables
The mean and variance of a continuous random variable answer the same questions as for a discrete one: where is the centre of the distribution, and how spread out is it? The only change is that sums become integrals. Every Paper 6 continuous random variable question asks for at least one of and , and the formulas are in the formula booklet, so the marks are earned by setting up the integrals correctly and carrying out the integration accurately.
From sums to integrals
For a discrete random variable,
Each value is weighted by its probability. For a continuous variable, a thin strip of width around the value has probability approximately . Weighting each by that and adding over all strips gives an integral.
For a continuous random variable with probability density function :
The integrals are taken over the interval on which is defined. Both formulas are in MF19.
The mean is the balance point of the region under the curve: if the region were cut out of card, it would balance on a pivot at .
- Multiply by , expand, and integrate over the interval: this is .
- Multiply by , expand, and integrate over the interval: this is .
- . Do not forget to subtract the square of the mean.
- Check: the mean lies inside the interval, and the variance is positive. The standard deviation is .
The random variable has probability density function for , and otherwise. Find and .
Solution
The mean is towards the right of , which makes sense: the density increases with , so more of the probability is at the upper end.
Symmetry: the mean for free
If the graph of is symmetric about the line , the balance point is , so with no integration. Typical symmetric densities are on (symmetric about ), on (symmetric about ), and constant densities.
If the question says "state" or "write down" the mean, symmetry is what is wanted. If it says "find", a sentence quoting the symmetry is still acceptable, but the variance must always be integrated.
has probability density function for , and otherwise.
(a) Write down .
(b) Find .
Solution
(a) The graph of is symmetric about , so .
(b)
Infinite intervals and exponentials
The same formulas work on infinite intervals, using improper integrals. Exponential densities need integration by parts from Pure 3, which the syllabus assumes.
has probability density function for , and otherwise. Find the mean and the standard deviation of .
Solution
The waiting time minutes has probability density function for , and otherwise. Find and .
Solution
By parts, with and , so :
The term as because the exponential decays faster than grows.
For , with , :
Linear transformations
The expectation and variance rules from linear combinations of random variables apply to continuous variables too:
So once you have and , you never need to integrate again for a scaled or shifted version.
More generally, the mean of any function of is found by weighting that function by the density: . is the special case . You will occasionally need, for example, , but this is rare.
Unknown constants from the mean
If a density has two unknown constants and you are given the mean, you get two equations: total area and given mean.
The random variable has probability density function for , and otherwise. It is given that .
(a) Find the values of and .
(b) Find .
(c) Find and .
(d) Find .
Solution
(a) Total area:
Mean:
From the first, . Substituting: , so , giving and .
(b)
(c)
(d)
The probability of exceeding the mean is not . The density rises to the right, so the mean and the median are not the same point. This contrast is explored in median and percentiles.
- Forgetting to square the mean. , not .
- Integrating instead of . always; that is not the mean.
- Multiplying only one term by . For , . Expand first, then integrate.
- Writing . These are different; their difference is the variance.
- Losing the constant. Keep (or ) outside the integral and remember to multiply by it at the end.
- A negative variance. This always means an arithmetic or setup error. Check it before moving on.
- The formulas are given in MF19, so the marks are for the integral with the correct integrand and limits, the integration, and the arithmetic. Write before you integrate.
- Exact fractions () are ideal. If you give a decimal, give at least 3 significant figures.
- "Show that " questions need every step, including substituting limits.
- If the question says "state the value of ", the answer is by symmetry: give a reason ("by symmetry of the graph about ").
- Expect the next part to ask for a median or a probability involving the mean, such as . Use the unrounded mean.
- and , over the interval where is defined.
- .
- Symmetry about gives immediately.
- Infinite intervals and exponential densities: improper integrals and integration by parts.
- ; .
- Two unknown constants: use total area together with a given mean or probability.
Practice questions
- for , and otherwise. Find and .
- for , and otherwise. Find and .
- for , and otherwise. Write down and find .
- for , and otherwise. Find and , and hence find and .
- for , and otherwise. State and find the standard deviation of .
- for , and otherwise. Find and .
- for , and otherwise, where and are constants. Given that , find and , and find .
- for , and otherwise. Show that and that .
Answers
-
. . .
-
. . .
-
By symmetry . . .
-
; ; . ; .
-
By symmetry about , . , so and the standard deviation is .
-
By parts, . . .
-
Area: . Mean: . Multiply the first by : . Multiply the second by : . Solving: , . (Check: on .) ; .
-
. . , so . .