Continuous Random Variables
A continuous random variable can take any value in an interval: a time, a length, a mass, a waiting time. Its probabilities are not listed in a table but described by a curve, the probability density function, and probabilities are areas under that curve. On Paper 6 every continuous random variable question begins with a density function like , and asks you to find , sketch the graph, find probabilities, and then the mean, variance, median or a percentile. This note covers the density function itself and probabilities; the next two notes cover the averages and spread.
From bars to a curve
For a discrete random variable, each value has its own probability, and those probabilities add to . Draw them as bars of width and the area of each bar is its probability.
Now imagine measuring a waiting time more and more precisely: to the nearest minute, then the nearest second, then the nearest hundredth of a second. The bars get narrower and more numerous, each one with a tinier probability, while the total area stays . In the limit, the tops of the bars become a smooth curve. That curve is the probability density function.
Two consequences follow immediately.
- Probability is area. The probability that lies between and is the area under the curve between and , which is an integral.
- A single value has probability zero. The "bar" above one exact value has zero width, so zero area: . Only intervals have positive probability. As a result, for a continuous variable, and give the same probability: .
The height is not itself a probability. It is a density: probability per unit of . It can be bigger than , as long as the total area is .
The probability density function
A continuous random variable has a probability density function (pdf) such that
- for all ;
- the total area under the graph is : , which in practice means integrating over the interval where is non-zero;
- probabilities are areas:
On Paper 6 the density is non-zero on a single interval only, and is written in the form
The interval may be infinite, for example for . Such integrals are improper integrals, worked out by letting the upper limit tend to infinity.
To be a valid pdf on its interval, must satisfy
Finding the constant
Most questions give the density with an unknown constant . The total-area condition gives an equation for .
- Write the integral of over its whole interval and set it equal to .
- Integrate and substitute the limits. For an infinite upper limit, use the fact that terms like (with ) and (with ) tend to .
- Solve for . If asked to "show that ", show every step and do not start from the answer.
- Sanity check: is throughout the interval with your ?
The random variable has probability density function
(a) Show that .
(b) Sketch the graph of .
(c) Find .
Solution
(a)
Setting this equal to gives .
(b) The graph is an arch, zero at and , symmetric about , with maximum . It is zero outside .
The shaded region is .
(c)
So .
A Paper 6 sketch needs the right shape, the end points of the interval marked on the -axis, the value of at any important points (ends, maximum), and outside the interval (along the axis). It does not need to be drawn to scale. For polynomials, find where is zero and where it is greatest; for a decreasing function like , show it falling towards the axis without touching it.
The random variable has probability density function for , and otherwise.
(a) Find .
(b) Find .
Solution
(a)
As , , which is why the upper limit contributes .
(b)
Notice that : a density can be greater than . What matters is that the area is .
The time, minutes, that a customer waits to be served has probability density function for , and otherwise.
(a) Find .
(b) Find the probability that a customer waits more than minutes.
Solution
(a)
(b)
Two unknowns and repeated observations
If a density contains two unknown constants, you need two equations: one from the total area and one from extra information, typically a given probability or (see the next note) a given mean.
Once you have a probability for one observation, a question about several independent observations is a binomial question, exactly as with the Poisson.
The random variable has probability density function for , and otherwise, where and are constants. It is given that .
(a) Find and .
(b) Three independent observations of are taken. Find the probability that exactly two of them are greater than .
Solution
(a) Total area:
Given probability:
Subtracting: , so and .
Check: on , so it is a valid pdf.
(b) . Let be the number of observations greater than ; .
The function is called the cumulative distribution function. The 9709 syllabus states that explicit knowledge of it is not required, so you will not be asked to find or use by name. You will, however, use exactly this kind of integral with a variable upper limit when finding medians and percentiles.
- Treating as a probability. does not mean ; . Probabilities come from integrating.
- Integrating over the wrong range. Use only the interval on which is defined. Outside it, contributes nothing.
- Mishandling infinite limits. , not . Keep careful track of signs.
- "Showing" by substituting it in. "Show that " must be derived from the total-area equation, with the integral visible.
- Forgetting the zero part of the sketch. The graph should be drawn as zero (along the axis) outside the interval, and the ends of the interval labelled.
- Missing the non-negativity check. If a calculated constant makes negative anywhere on the interval, something is wrong.
- Show the integral, the antiderivative in square brackets, and the substituted limits. On "show that" questions the examiner needs every line.
- Exact answers () are fine and often preferred; otherwise give 3 significant figures.
- A sketch earns marks for the correct shape over the correct interval, with key values labelled. A sketch of the formula outside the interval (for example continuing the parabola below the axis) loses the mark.
- When the question uses and you have computed , there is nothing to adjust: for a continuous variable they are equal. Do not apply a continuity correction.
- Expect a binomial follow-up: "three independent observations... exactly two exceed 1".
- A pdf satisfies and total area .
- ; single values have probability , so and are interchangeable.
- Find unknown constants from the total area (and a second condition if there are two).
- Infinite intervals: let the upper limit tend to infinity; and .
- is a density, not a probability, and can exceed .
- Sketches: correct shape on the correct interval, ends labelled, zero elsewhere.
- Several independent observations lead to a binomial calculation.
Practice questions
- for , and otherwise. Find and .
- for , and otherwise. Find and .
- Explain why for (and otherwise) is not a probability density function.
- for , and otherwise. Find and .
- for , and otherwise. Find and .
- for , and otherwise. Find and .
- for , and otherwise, where and are positive constants. Given that , find and .
- The lifetime, hours, of a type of bulb has probability density function for , and otherwise. (a) Find . (b) Find the probability that a bulb lasts more than hours. (c) Three bulbs are fitted. Assuming their lifetimes are independent, find the probability that at least one of them fails within hours.
Answers
-
, so . .
-
, so . .
-
for , and a density cannot be negative. (Also the total area is , not .)
-
, so . .
-
. .
-
, so . .
-
Total area: . . Subtracting: , so , and then , so .
-
(a) , so . (b) . (c) . .