Skip to main content
NSWMaths AdvancedSyllabus dot point

How do probability density functions describe continuous random variables, and how do we extract probabilities and summary statistics from them?

Use probability density functions and cumulative distribution functions to find probabilities, medians, modes, means and variances of continuous random variables

A focused answer to the HSC Maths Advanced dot point on continuous random variables. Probability density functions, cumulative distribution functions, computing probabilities by integration, and finding mean, median, mode and variance, with worked examples.

Generated by Claude Opus 4.815 min answer

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

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

What this dot point is asking

NESA wants you to work with continuous random variables defined by a probability density function (pdf). You must find unknown constants by enforcing total probability =1= 1, compute probabilities as definite integrals, build the cumulative distribution function, and find the mean, variance, median and mode using integrals. The thread running through all of it is one picture: the pdf is a curve, and the probability of any interval is the area under that curve, so every task here is an area or an integral.

The answer

A probability density functionThe density f of x equals x over 8 on the interval 0 to 4, a straight line rising from the origin; the whole triangular area beneath it equals 1.xf(x)01234area = 1f(x) = x/8Step 1A valid density encloses total area 1.Here ½ × 4 × 0.5 = 1, so f(x) = x/8 is valid.

Probability density functions

A continuous random variable XX is described by a probability density function ff satisfying

  • f(x)0f(x) \ge 0 for all xx (a density cannot be negative),
  • f(x)dx=1\int_{-\infty}^{\infty} f(x) \, dx = 1 (the total area under the curve is 11).

In Maths Advanced, ff is non-zero only on a finite interval [a,b][a, b] called the support, and the total integral is taken over that interval. The value f(x)f(x) is a density, not a probability: it can exceed 11, and on its own it tells you nothing until you integrate it over an interval. This is the key shift from the discrete case, where each value carried its own probability pip_i.

The most important consequence is that for a continuous random variable, P(X=c)=0P(X = c) = 0 for any single value cc. A single point has no width, so it has no area, so it has no probability. Probabilities live on intervals only.

Probabilities as integrals

For any interval [c,d][c, d] inside the support, the probability is the area under the density over that interval:

P(cXd)=cdf(x)dx.P(c \le X \le d) = \int_c^d f(x) \, dx.

Because single points have zero probability, P(cXd)=P(c<X<d)P(c \le X \le d) = P(c < X < d). The strict and non-strict inequalities give the same value, so you never have to worry about whether the endpoints are included.

Probability is the area over an intervalThe same density with the region between x equals 1 and x equals 3 shaded; that area equals the probability that X lies between 1 and 3, which is one half.xf(x)01234P(1 ≤ X ≤ 3)= ½Step 2P(1 ≤ X ≤ 3) is the shaded area = ∫₁³ x/8 dx = ½.Single points have zero width, so they add no probability.

Cumulative distribution function

The cumulative distribution function (cdf) accumulates probability from the left:

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

Useful properties:

  • FF is non-decreasing, with F()=0F(-\infty) = 0 and F()=1F(\infty) = 1 (and F=0F = 0 below the support, F=1F = 1 above it).
  • P(cXd)=F(d)F(c)P(c \le X \le d) = F(d) - F(c), so once you have FF every interval probability is a subtraction.
  • Where ff is continuous, F(x)=f(x)F'(x) = f(x): the pdf is the derivative of the cdf, the cdf is the integral of the pdf. They are two views of the same distribution.

Mean, variance, median, mode

The mean (expected value) weights each value xx by its density and integrates:

E(X)=μ=xf(x)dx.E(X) = \mu = \int_{-\infty}^{\infty} x f(x) \, dx.

The variance integrates the squared deviation from the mean, and is almost always computed via the shortcut on the right:

Var(X)=σ2=(xμ)2f(x)dx=E(X2)μ2,\text{Var}(X) = \sigma^2 = \int_{-\infty}^{\infty} (x - \mu)^2 f(x) \, dx = E(X^2) - \mu^2,

where E(X2)=x2f(x)dxE(X^2) = \int x^2 f(x) \, dx. The standard deviation is σ=Var(X)\sigma = \sqrt{\text{Var}(X)}.

The median mm splits the area in half:

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

The mode is the value of xx where ff is largest. If ff is differentiable on the interior of the support, look for a critical point of ff; if ff is monotone on the support, the mode is at the endpoint where ff is highest.

Why every technique here is an integral

Continuous random variables are where the calculus and statistics strands of Maths Advanced meet. A probability is an integral, the cdf is an integral with a variable upper limit, the mean weights xx by the density and integrates, and the variance integrates the squared deviation. So the practical skill being tested is your integration: setting up the right definite integral over the support, finding the antiderivative, and evaluating cleanly. The statistics is the interpretation wrapped around the calculus, which is also why this dot point pairs so naturally with the integration techniques from the calculus strand.

The standard problem types

NESA questions on this dot point fall into a small number of recognisable shapes, and naming the type tells you the first move:

  • "Find the value of the constant kk": enforce f=1\int f = 1 over the support.
  • "Find P(aXb)P(a \le X \le b)": integrate ff from aa to bb (or use F(b)F(a)F(b) - F(a)).
  • "Find the mean / expected value": integrate xf(x)x f(x).
  • "Find the variance / standard deviation": compute E(X2)E(X^2), then use Var(X)=E(X2)μ2\text{Var}(X) = E(X^2) - \mu^2.
  • "Find the median": solve F(m)=12F(m) = \frac{1}{2}.
  • "Find the mode": maximise ff on the support.

Sketching the density

A quick sketch of ff over its support guides the work. The total area under the curve must be 11, the median splits that area in half, and the mode sits under the highest point of the curve. For a symmetric density the mean, median and mode coincide at the centre of symmetry, which can save an integral if you spot the symmetry early.

How exam questions ask about continuous random variables

  • "Show that k=k = \dots" or "find the value of kk." Set supportf=1\int_{\text{support}} f = 1 and solve.
  • "Find P(X>a)P(X > a) / P(aXb)P(a \le X \le b)." Integrate ff over the interval, or use FF. For a "greater than" question, integrate up to the top of the support (or use 1F(a)1 - F(a)).
  • "Find the expected value / mean." Integrate xf(x)x f(x) over the support.
  • "Find the variance / standard deviation." Find E(X2)=x2fE(X^2) = \int x^2 f, then Var(X)=E(X2)μ2\text{Var}(X) = E(X^2) - \mu^2, then square-root for σ\sigma.
  • "Find the cumulative distribution function." Integrate ff with a variable upper limit; remember to state F=0F = 0 below the support and F=1F = 1 above it.
  • "Find the median / mode." Solve F(m)=12F(m) = \frac12 for the median; maximise ff for the mode.

Edge cases worth knowing

  • A piecewise density. If ff is defined in pieces, integrate each piece over its own sub-interval and add. The cdf is then also piecewise, continuous at the joins.
  • The mode at an endpoint. When ff is monotone on the support there is no interior critical point, so the mode is the endpoint where ff is largest. Do not chase a derivative that never vanishes.
  • A density that exceeds 11. This is fine: ff is a density, not a probability. On a narrow support the height can be well above 11 while the area stays 11.
  • Spotting symmetry. If ff is symmetric about a centre cc, then E(X)=E(X) = median =c= c immediately, and P(X>c)=12P(X > c) = \frac12, saving you an integral.

Exam-style practice questions

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

2022 HSC Q285 marksA continuous random variable XX has probability density function f(x)=kxf(x) = k x for 0x40 \le x \le 4 and 00 elsewhere. Find kk, P(1X3)P(1 \le X \le 3), and the mean E(X)E(X).
Show worked answer →

Total probability: 04kxdx=kx2204=8k=1\int_0^4 k x \, dx = k \cdot \frac{x^2}{2} \Big|_0^4 = 8 k = 1, so k=18k = \frac{1}{8}.

P(1X3)=13x8dx=18x2213=116(91)=816=12P(1 \le X \le 3) = \int_1^3 \frac{x}{8} \, dx = \frac{1}{8} \cdot \frac{x^2}{2} \Big|_1^3 = \frac{1}{16} (9 - 1) = \frac{8}{16} = \frac{1}{2}.

Mean: E(X)=04xx8dx=1804x2dx=18x3304=6424=83E(X) = \int_0^4 x \cdot \frac{x}{8} \, dx = \frac{1}{8} \int_0^4 x^2 \, dx = \frac{1}{8} \cdot \frac{x^3}{3} \Big|_0^4 = \frac{64}{24} = \frac{8}{3}.

Markers reward solving for kk using the total probability, computing the probability as a definite integral, and using E(X)=xf(x)dxE(X) = \int x f(x) \, dx over the support.

2021 HSC Q264 marksA continuous random variable has probability density function f(x)=38x2f(x) = \frac{3}{8} x^2 for 0x20 \le x \le 2. Find the median of XX.
Show worked answer →

The median mm satisfies 0mf(x)dx=12\int_0^m f(x) \, dx = \frac{1}{2}.

0m38x2dx=38m33=m38\int_0^m \frac{3}{8} x^2 \, dx = \frac{3}{8} \cdot \frac{m^3}{3} = \frac{m^3}{8}.

Set m38=12\frac{m^3}{8} = \frac{1}{2}, so m3=4m^3 = 4 and m=431.587m = \sqrt[3]{4} \approx 1.587.

Markers expect the median condition stated as a definite integral equal to 12\frac{1}{2}, the antiderivative, and the cube root taken cleanly.

Related dot points