Skip to main content
SingaporeFurther MathsSyllabus dot point

How does a probability density function describe a continuous random variable, and how do we find its mean, variance and median?

Work with continuous random variables defined by a probability density function, finding probabilities, the cumulative distribution function, expectation, variance and median

A focused answer to the H2 Further Mathematics outcome on continuous random variables. The probability density function and its conditions, probabilities as areas, the cumulative distribution function, and the expectation, variance and median by integration.

Generated by Claude Opus 4.811 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

SEAB wants you to handle a continuous random variable defined by a probability density function (pdf): to use the conditions a pdf must satisfy, to find probabilities as areas (integrals), to construct and use the cumulative distribution function, and to compute the expectation, variance and median by integration.

The answer

The probability density function

A continuous random variable XX is described by a probability density function f(x)\mathrm{f}(x) satisfying

f(x)0for all x,f(x)dx=1.\mathrm{f}(x) \geq 0 \quad\text{for all } x, \qquad \int_{-\infty}^{\infty} \mathrm{f}(x)\,\mathrm{d}x = 1.

The total area under the density is 11. The density itself is not a probability; only areas are.

Probabilities as areas

For a continuous variable, the probability of any single value is zero, and a probability over an interval is the area under the density:

P(aXb)=abf(x)dx.\mathrm{P}(a \leq X \leq b) = \int_a^b \mathrm{f}(x)\,\mathrm{d}x.

Because point probabilities are zero, << and \leq give the same answer.

The cumulative distribution function

The cumulative distribution function (cdf) is

F(x)=P(Xx)=xf(t)dt.\mathrm{F}(x) = \mathrm{P}(X \leq x) = \int_{-\infty}^{x} \mathrm{f}(t)\,\mathrm{d}t.

It increases from 00 to 11, and differentiating recovers the density, F(x)=f(x)\mathrm{F}'(x) = \mathrm{f}(x). The cdf is convenient for probabilities such as P(X>x)=1F(x)\mathrm{P}(X > x) = 1 - \mathrm{F}(x).

Expectation and variance

By analogy with the discrete sums, replace summation by integration:

E(X)=xf(x)dx,Var(X)=E(X2)[E(X)]2,\mathrm{E}(X) = \int_{-\infty}^{\infty} x\,\mathrm{f}(x)\,\mathrm{d}x, \qquad \operatorname{Var}(X) = \mathrm{E}(X^2) - [\mathrm{E}(X)]^2,

where E(X2)=x2f(x)dx\mathrm{E}(X^2) = \displaystyle\int_{-\infty}^{\infty} x^2\,\mathrm{f}(x)\,\mathrm{d}x.

The median and other quantiles

The median mm splits the area in half:

mf(x)dx=12,equivalentlyF(m)=12.\int_{-\infty}^{m} \mathrm{f}(x)\,\mathrm{d}x = \frac{1}{2}, \quad\text{equivalently}\quad \mathrm{F}(m) = \frac{1}{2}.

Other quantiles (quartiles, percentiles) are found the same way with the appropriate cumulative probability.

Examples in context

Example 1. Waiting times. The time until the next event in a random process is a continuous variable with an exponential density; integrating it gives the probability of waiting more than a set time and its mean waiting time, the basis of queueing and reliability models.

Example 2. Measurement error. The error in a physical measurement is modelled by a continuous density; the area within a tolerance band is the probability the measurement is acceptable, and the median and mean summarise the typical error.

Try this

Q1. State the two conditions a probability density function must satisfy. [2 marks]

  • Cue. f(x)0\mathrm{f}(x) \geq 0 everywhere, and f(x)dx=1\int_{-\infty}^{\infty} \mathrm{f}(x)\,\mathrm{d}x = 1.

Q2. How is the median mm of a continuous variable defined in terms of the cdf? [1 mark]

  • Cue. F(m)=12\mathrm{F}(m) = \tfrac{1}{2} (the cumulative probability up to mm is one half).

Q3. Write the expression for E(X)\mathrm{E}(X) of a continuous variable with density f\mathrm{f}. [1 mark]

  • Cue. E(X)=xf(x)dx\mathrm{E}(X) = \displaystyle\int_{-\infty}^{\infty} x\,\mathrm{f}(x)\,\mathrm{d}x.

Exam-style practice questions

Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Original6 marksA continuous random variable XX has probability density function f(x)=kx2\mathrm{f}(x) = kx^2 for 0x20 \leq x \leq 2 and f(x)=0\mathrm{f}(x) = 0 otherwise. Find kk and P(X>1)\mathrm{P}(X > 1).
Show worked answer →

The density must integrate to 11 over its range:

02kx2dx=k[x33]02=k83=1k=38.\int_0^2 kx^2\,\mathrm{d}x = k\left[\frac{x^3}{3}\right]_0^2 = k\cdot\frac{8}{3} = 1 \Rightarrow k = \frac{3}{8}.

Then P(X>1)=1238x2dx=38[x33]12=38813=3873=78.\mathrm{P}(X > 1) = \displaystyle\int_1^2 \frac{3}{8}x^2\,\mathrm{d}x = \frac{3}{8}\left[\frac{x^3}{3}\right]_1^2 = \frac{3}{8}\cdot\frac{8 - 1}{3} = \frac{3}{8}\cdot\frac{7}{3} = \frac{7}{8}.$

Markers reward the normalisation integral giving k=38k = \tfrac{3}{8}, the probability as an integral from 11 to 22, and the value 78\tfrac{7}{8}.

Original7 marksFor the density f(x)=38x2\mathrm{f}(x) = \dfrac{3}{8}x^2 on 0x20 \leq x \leq 2, find E(X)\mathrm{E}(X) and the median mm.
Show worked answer →

Expectation: E(X)=02x38x2dx=3802x3dx=38[x44]02=38164=384=32.XKATEXDISPLAYTOKEN0XEND38m33=12m38=12m3=4m=41/31.587.\mathrm{E}(X) = \displaystyle\int_0^2 x\cdot\frac{3}{8}x^2\,\mathrm{d}x = \frac{3}{8}\int_0^2 x^3\,\mathrm{d}x = \frac{3}{8}\left[\frac{x^4}{4}\right]_0^2 = \frac{3}{8}\cdot\frac{16}{4} = \frac{3}{8}\cdot 4 = \frac{3}{2}.XKATEXDISPLAYTOKEN0XEND\frac{3}{8}\cdot\frac{m^3}{3} = \frac{1}{2} \Rightarrow \frac{m^3}{8} = \frac{1}{2} \Rightarrow m^3 = 4 \Rightarrow m = 4^{1/3} \approx 1.587.$

Markers reward the expectation integral xf(x)dx=32\int x\,\mathrm{f}(x)\,\mathrm{d}x = \tfrac{3}{2}, setting the cumulative probability to 12\tfrac{1}{2} for the median, and m=41/3m = 4^{1/3}.

Related dot points