Continuous random variables AA HL
A continuous random variable is described by a probability density function, and every probability, mean and median comes from integrating it. This page shows how to use the total area of one to find an unknown constant, how to find a probability, the mode and the median, and how to find the mean and variance from two integrals. Most questions are exact integrals of simple powers, so practise them without a calculator, and keep the working in fractions.
Formulas at a glance
The mean and the variance of a continuous random variable are in the formula booklet. The total area of one, the probability integral, the integral for and the median condition are not, so learn them.
Total probability: the area under a probability density function is one, taken where is not zero
Not in the bookletProbability that lies between and
Not in the bookletMedian : half of the area lies to its left
Not in the bookletMean of a continuous random variable
In the bookletThe second integral, found separately before the subtraction
Not in the bookletVariance
In the bookletStandard deviation
Not in the bookletWhich method to use
Read what the question asks for, then decide whether it needs one integral of , a stationary point, or an integral with an extra factor of or . Always integrate over the interval where is not zero.
| The question has | Use | Notes |
|---|---|---|
| An unknown constant in | Set over the given interval and solve for | Once is found, check that on the whole interval |
| The probability that lies in a range | Integrate between the two bounds | Strict and non-strict inequalities give the same answer |
| A function given in two or more pieces | Integrate each piece over its own interval | When a range crosses a boundary, add the integrals of the two pieces |
| The mode | The value of where is greatest | Look for a stationary point, then compare with the ends of the interval |
| The median | Solve , where is the lower end of the interval | Choose the solution that lies inside the interval |
| The mean | Integrate over the interval | The mean is not always the middle of the interval |
| The variance or the standard deviation | Find and , then | A variance is never negative; take the square root last for the standard deviation |
Continuous random variables
A continuous random variable has a probability density function , and probabilities are areas under its graph, found by integration. The total area is , which lets you find unknown constants, and further integrals give the mean, median, mode and variance.
Key terms
What is a probability density function?
It is a function with whose total area is . Probability is given by area under the graph, so itself is not a probability.
e.g. for is valid because .
How do you find a probability from ?
Integrate between the limits: . A single value has probability zero, so strict and non-strict inequalities give the same answer.
e.g. For on , .
What are the mode and the median?
The mode is the value of at which is greatest, which may be a stationary point or an endpoint of the domain. The median splits the area in half, so the area up to is .
e.g. For on , the mode is , and the median satisfies , so .
Worked example, step by step
The question No calculator needed [6 marks]
The continuous random variable has probability density function where is a constant.
(a) Show that .
(b) Find the mode of .
(c) Find .
Worked solution: worked example
Answer: (a) (b) mode (c)
Step 1 - Use the total area.
The total area under a probability density function is , and is zero outside , so M1 - Use
Why? Only the interval where is not zero contributes, so those are the limits. The constant comes outside the integral.
Step 2 - Evaluate and solve for .
Then , so . A1 - , so (complete working)
Why? Expand the bracket first so that each term is a simple power. Finishing at completes the "show that".
Step 3 - Find the mode.
The mode is the value of at which is greatest. With , The graph of is a downward parabola, so this stationary point is the maximum and the mode is . M1 - Set to find the maximum of A1 - mode
Why? The mode comes from where the density is largest, not from an integral. A downward parabola has its greatest value at its stationary point, so no further check is needed.
Step 4 - Set up the mean.
M1 - Substitute into
Why? The mean integrates times the density over the interval where the density is not zero. Multiplying by raises each power by one.
Step 5 - Evaluate.
A1 -
Why? Here the mean equals the mode, which is expected because the graph of is symmetrical about . That is a quick check, not a method.
M1 Use
A1 , so (complete working)
M1 Set to find the maximum of
A1 mode
M1 Substitute into
A1
Now you try: enter your answers to be marked
These are real practice questions. Type your answer in each box and press Mark it. The worked solution and mark scheme appear straight away, and your first attempt is the one that counts. Use the keyboard for powers, roots and trig, and the working box for your notes.
Worked solution: practice question 1
Find the median of .
Worked solution: practice question 2
Worked solution: practice question 3
Your score so far: 0 out of 11 marks
Common mistakes
- Integrating over the wrong domain. is only nonzero on the interval given in the question - integrating from to , or over the wrong bounds entirely, throws off every answer that follows.
- Treating as a probability. is a density, not - for a continuous variable, is always for any single value; only an integral over a range gives an actual probability.
- Skipping the subtraction step in the variance formula. It is easy to compute correctly and then forget to subtract - the variance is never just on its own.
Syllabus content covered
| Code | Syllabus content |
|---|---|
| AHL4.14 | Continuous random variables and their probability density functions, including piecewise functions. Mode and median of continuous random variables: a value at which the probability density function has a maximum value is called a mode, and the median satisfies . Mean, variance and standard deviation of continuous random variables. Use of the notation , , , where and related formulae. |
Official IB source: Mathematics: analysis and approaches subject brief (PDF, ibo.org).
Quick questions
How do you find an unknown constant in a probability density function?
Set over the domain where is nonzero, since total probability must equal 1, then solve for the constant.
How do I check that a piecewise function is a valid probability density function?
Check that each piece is non-negative on its own interval. Then integrate each piece over its own interval and confirm that the areas add up to .
How do I find the variance of a continuous random variable?
Find and over the domain, then use . The standard deviation is the square root of the variance.
Can f(x) be greater than 1?
Yes, because is a density, not a probability. It only has to keep the total area equal to : for example, on has total area .
Ready to practise properly?
Practice questions on every section, marked instantly like the real exam.