Practise › Questions › Continuous random variables: density and distribution functions
Continuous random variables: density and distribution functions questions
When a variable can take any value in a range, no single value has a probability. Areas do instead, and the function whose areas they are is the density.
6 original questions · 22 marks · the continuous random variables: density and distribution functions notes · Further Statistics 2
Every question here is written for this library rather than taken from a past paper. Write your answer out before opening the worked one: the answers award marks point by point, and the marks are easier to see when you have something of your own to compare against.
Explain why P(X = 1.5) = 0 for a continuous random variable, and what follows for strict and non-strict inequalities.
Worked answer
Probability is the area under the density, and the area over a single point is zero, so no individual value carries any probability. It follows that P(X < a) and P(X ≤ a) are equal, so the inequality signs make no difference. B1 for the zero area over a point, B1 for the two inequalities agreeing. That is a genuine simplification compared with discrete distributions.f(x) = k(4 − x²) for 0 ≤ x ≤ 2 and zero elsewhere. Find k.
Worked answer
The integral of 4 − x² from 0 to 2 is [4x − x³/3] = 8 − 8/3 = 16/3. Setting k × 16/3 = 1 gives k = 3/16. M1 for integrating and setting the total area to 1, A1 for 16/3, A1 for k = 3/16. The density is non-negative throughout the interval, so it is valid.The random variable X has density f(x) = (3/16)(4 − x²) for 0 ≤ x ≤ 2 and zero elsewhere. Find F(x) and hence P(X < 1).
Worked answer
Integrate the density from the bottom of the range: F(x) = (3/16)(4x − x³/3) = 3x/4 − x³/16 for 0 ≤ x ≤ 2, with F = 0 below 0 and F = 1 above 2. A distribution function must be defined everywhere, so both of those branches are needed for full marks.
Check F(2) = 1.5 − 0.5 = 1, which every F must satisfy at the top of its range.
Then P(X < 1) = F(1) = 0.75 − 0.0625 = 0.6875. M1 for integrating the density, A1 for 3x/4 − x³/16, B1 for the branches outside the range, A1 for 0.6875. Reaching for the integral again wastes time once F is known.The random variable X has density f(x) = x/8 for 0 ≤ x ≤ 4 and zero elsewhere. Find F(x), the median and the lower quartile.
Worked answer
Integrating, F(x) = x²/16 on the interval.
Quartiles come from solving F = the required proportion, never from the density. The median solves m²/16 = 0.5, so m² = 8 and m = 2√2 = 2.828. The lower quartile solves q²/16 = 0.25, so q² = 4 and q = 2. M1 A1 for F(x) = x²/16, A1 for the median 2.828, A1 for the lower quartile 2.
Both lie inside 0 to 4, and the lower quartile lies below the median, which is the check to make before moving on. The negative roots are discarded because the density is zero below 0.A variable has F(x) = x²/16 on 0 ≤ x ≤ 4. Find its density and P(1 < X < 3).
Worked answer
Differentiating, f(x) = x/8 on the interval and zero elsewhere. P(1 < X < 3) = F(3) − F(1) = 9/16 − 1/16 = 8/16 = 0.5. B1 for f(x) = x/8, M1 for F(3) − F(1), A1 for 0.5. Subtracting values of F is quicker than integrating.The random variable X has density f(x) = x for 0 ≤ x < 1 and f(x) = 2 − x for 1 ≤ x ≤ 2, and zero elsewhere. Verify that f is a valid density, find F(x) in full, and find the upper quartile of X, giving an exact answer.
Worked answer
Validity. f is non-negative on the whole range, and the two triangles each have area 1/2, so the total area is 1. Both conditions are needed; area alone is not enough.
The distribution function. For 0 ≤ x < 1, F(x) = x²/2. For the second branch, start from the 1/2 already accumulated rather than integrating from 0, which is the step most answers get wrong: F(x) = 1/2 + [2t − t²/2] from 1 to x = 2x − x²/2 − 1.
Two checks. At x = 1 both branches give 0.5, so F is continuous, and F(2) = 4 − 2 − 1 = 1 as it must be.
The upper quartile. Since F(1) = 0.5 < 0.75, the quartile lies in the upper branch. Choosing the branch first is worth a mark, and using x²/2 = 0.75 here is the standard error.
Solve 2q − q²/2 − 1 = 0.75, that is q² − 4q + 3.5 = 0, giving q = 2 ± √2/2.
The root 2 + √2/2 ≈ 2.71 lies outside the range, so the upper quartile is q = 2 − √2/2, about 1.293. B1 for the validity check, M1 for integrating the first branch, A1 for both branches of F, B1 for choosing the upper branch, dM1 for solving the quadratic, A1 for q = 2 − √2/2. Say why the other root is rejected; a bare pair of roots does not finish the question.
The same practice on paper: the printable workbook for this topic, questions and a worked answer book.
Practise continuous random variables: density and distribution functions one question at a time
The player marks nothing for you. It shows one question, waits, then shows the worked answer so you can mark yourself, and brings a question back sooner when it went badly.