Maths › Further Statistics 2 › Continuous random variables: density and distribution functions
Continuous random variables: density and distribution functions
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.
Builds on The normal distribution and Definite integrals and areas.
IN THIS TOPIC
- Check that a proposed density is valid and use it to find probabilities.
- Move between the density and the cumulative distribution function in both directions.
- Use the distribution function to find the median and other percentiles.
WHAT YOU PROBABLY THINK
For a continuous random variable, P(X = 1.5) is the height of the density at 1.5.
Areas, not heights
A probability density function f(x) is never a probability. It is non-negative, its total area is 1, and probabilities are the areas beneath it:
Since the area over a single point is zero, P(X = c) = 0 for every c: the opening claim confuses a height with a probability. It also means the inequality signs never matter for a continuous variable, which is a genuine simplification after all the care discrete distributions demand.
WORKED EXAMPLE
Checking a density and using it
f(x) = 3x²/8 for 0 ≤ x ≤ 2 and zero elsewhere. Verify it is a density and find P(1 < X ≤ 1.5).
It is non-negative on the interval. Its integral is [x³/8] from 0 to 2 = 8/8 = 1, so it is valid.
P(1 < X ≤ 1.5) = [x³/8] from 1 to 1.5 = 3.375/8 − 1/8 = 0.297 to three decimal places.
The distribution function
The cumulative distribution function collects everything to the left: F(x0) = P(X ≤ x0), the integral of f from the lower end up to x0. It climbs from 0 to 1 and never falls. Differentiating undoes the integration:
So F is the more useful of the two for reading probabilities off, and f is the more useful for describing shape. Percentiles come from F: the median m solves F(m) = 0.5, and the lower quartile solves F(q) = 0.25. Piecewise definitions need every branch stated, including the 0 below the range and the 1 above it.
YOUR TURN
From density to median
For f(x) = 3x²/8 on 0 ≤ x ≤ 2, write down F(x) in full and find the median.
Show the working
Integrating from 0: F(x) = x³/8 on the interval. In full, F(x) = 0 for x < 0, x³/8 for 0 ≤ x ≤ 2, and 1 for x > 2.
The median solves m³/8 = 0.5, so m³ = 4 and m = 1.587 to three decimal places.
Checking: F(1.587) = 3.998/8 ≈ 0.5, and the value sits inside the range as it must.
THE EXAM BIT
- Verify a density by checking both conditions: non-negative, and total area exactly 1.
- Write a piecewise F(x) with every branch, including the flat 0 and the flat 1.
- Read probabilities from F by subtraction; going back to the integral wastes time.
- For a percentile, set F equal to the proportion and solve, then check the root lies in range.
CHECK YOURSELF
f(x) = kx for 0 ≤ x ≤ 4 and zero elsewhere. Find k and F(x) on the interval.
Show a hint
Total area 1 fixes k, then integrate from the lower end.
Show the answer
T
h
e
a
r
e
a
i
s
k
[
x
²
/
2
]
f
r
o
m
0
t
o
4
=
8
k
,
s
o
k
=
1
/
8
.
T
h
e
n
F
(
x
)
=
x
²
/
1
6
o
n
0
≤
x
≤
4
,
w
i
t
h
F
=
0
b
e
l
o
w
a
n
d
F
=
1
a
b
o
v
e
.
For a continuous variable, probability is area under the density: P(a < X ≤ b) is the integral of f from a to b, and P(X = c) = 0.
F is the integral of f from the lower end, climbing from 0 to 1; differentiating F gives f back, and F(m) = 0.5 gives the median.
WORKBOOK
Printable practice for this topic: original exam-style questions with room to work, and a fully worked answer book. Free to use; please do not redistribute or sell.
CHECK YOUR PROGRESS
Rate how confident you feel with each objective for this lesson. Ratings are saved in this browser, on this device only.
- Check that a proposed density is valid and use it to find probabilities.
- Move between the density and the cumulative distribution function in both directions.
- Use the distribution function to find the median and other percentiles.
Open the full revision checklist to see every objective in the course in one place.
No animated video for this topic yet; these notes stand alone.