← Year 12: Statistical Analysis

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 OpusReviewed by Better Tuition Academy10 min answer

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, and find the mean, variance, median and mode using integrals.

The answer

Probability density functions

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

  • IMATH_9 for all xx,
  • IMATH_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.

For a continuous random variable, P(X=c)=0P(X = c) = 0 for any single value cc. Probabilities live on intervals only.

Probabilities as integrals

For any interval [c,d][c, d] inside the support,

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

Because single points have zero probability, P(c≀X≀d)=P(c<X<d)P(c \le X \le d) = P(c < X < d). The strict and non-strict inequalities give the same value.

Cumulative distribution function

The cumulative distribution function (cdf) is

F(x)=P(X≀x)=βˆ«βˆ’βˆžxf(t) dt.F(x) = P(X \le x) = \int_{-\infty}^{x} f(t) \, dt.

Useful properties:

  • IMATH_18 is non-decreasing, with F(βˆ’βˆž)=0F(-\infty) = 0 and F(∞)=1F(\infty) = 1.
  • IMATH_21 .
  • Where ff is continuous, Fβ€²(x)=f(x)F'(x) = f(x).

Mean, variance, median, mode

The mean (expected value) is

E(X)=ΞΌ=βˆ«βˆ’βˆžβˆžxf(x) dx.E(X) = \mu = \int_{-\infty}^{\infty} x f(x) \, dx.

The variance is

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 distribution 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, the mode is at a critical point of ff (or at an endpoint if ff is monotone there).

Worked examples

Finding a constant and a probability

f(x)=c(1βˆ’x2)f(x) = c(1 - x^2) for βˆ’1≀x≀1-1 \le x \le 1, 00 elsewhere. Find cc, then P(X>0)P(X > 0).

βˆ«βˆ’11c(1βˆ’x2) dx=c[xβˆ’x33]βˆ’11=c(23βˆ’(βˆ’23))=4c3=1\int_{-1}^{1} c(1 - x^2) \, dx = c \left[ x - \frac{x^3}{3} \right]_{-1}^{1} = c \left( \frac{2}{3} - \left(-\frac{2}{3}\right) \right) = \frac{4 c}{3} = 1, so c=34c = \frac{3}{4}.

By symmetry of 1βˆ’x21 - x^2 about x=0x = 0, P(X>0)=12P(X > 0) = \frac{1}{2}.

Computing the mean and variance

For f(x)=x8f(x) = \frac{x}{8} on [0,4][0, 4]:

E(X)=∫04xβ‹…x8 dx=18β‹…643=83E(X) = \int_0^4 x \cdot \frac{x}{8} \, dx = \frac{1}{8} \cdot \frac{64}{3} = \frac{8}{3}.

E(X2)=∫04x2β‹…x8 dx=18β‹…2564=8E(X^2) = \int_0^4 x^2 \cdot \frac{x}{8} \, dx = \frac{1}{8} \cdot \frac{256}{4} = 8.

Var(X)=8βˆ’(83)2=8βˆ’649=89\text{Var}(X) = 8 - \left(\frac{8}{3}\right)^2 = 8 - \frac{64}{9} = \frac{8}{9}. So Οƒ=223\sigma = \frac{2\sqrt{2}}{3}.

Cdf from a pdf

For f(x)=x8f(x) = \frac{x}{8} on [0,4][0, 4], the cdf is

F(x)=∫0xt8 dt=x216,0≀x≀4.F(x) = \int_0^x \frac{t}{8} \, dt = \frac{x^2}{16}, \quad 0 \le x \le 4.

So P(X≀2)=F(2)=416=14P(X \le 2) = F(2) = \frac{4}{16} = \frac{1}{4}.

Median and mode

For f(x)=x8f(x) = \frac{x}{8} on [0,4][0, 4], the median mm solves m216=12\frac{m^2}{16} = \frac{1}{2}, so m2=8m^2 = 8 and m=22β‰ˆ2.83m = 2 \sqrt{2} \approx 2.83.

The mode is at x=4x = 4, the right endpoint, because ff is increasing on [0,4][0, 4].

Common traps

Treating P(X=c)>0P(X = c) > 0. For a continuous random variable, single points have zero probability. The pdf value f(c)f(c) is a density, not a probability.

Forgetting to enforce total probability. When a pdf has an unknown constant, the first step is always ∫f=1\int f = 1.

Confusing pdf and cdf. ff is the density (can exceed 11), FF is the cumulative probability (always between 00 and 11). f=Fβ€²f = F' where FF is differentiable.

Integrating xf(x)x f(x) over the wrong range. When computing E(X)E(X), integrate only over the support. Outside the support, f=0f = 0 contributes nothing.

Picking an interior critical point that is actually a minimum. The mode is the maximum of ff. If ff is monotone, the mode is at an endpoint of the support.

In one sentence

A continuous random variable is described by a pdf ff with ∫f=1\int f = 1; probabilities come from integrating ff over intervals, the cdf is F(x)=βˆ«βˆ’βˆžxfF(x) = \int_{-\infty}^{x} f, and the mean, variance, median and mode are computed by integrals or by solving F(m)=12F(m) = \frac{1}{2}.

Past exam questions, worked

Real questions from past NESA papers on this dot point, with our answer explainer.

2022 HSC Q285 marksA continuous random variable $X$ has probability density function $f(x) = k x$ for $0 \le x \le 4$ and $0$ elsewhere. Find $k$, $P(1 \le X \le 3)$, and the mean $E(X)$.
Show worked answer β†’

Total probability: ∫04kx dx=kβ‹…x22∣04=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(1≀X≀3)=∫13x8 dx=18β‹…x22∣13=116(9βˆ’1)=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)=∫04xβ‹…x8 dx=18∫04x2 dx=18β‹…x33∣04=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) = \frac{3}{8} x^2$ for $0 \le x \le 2$. Find the median of $X$.
Show worked answer β†’

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

∫0m38x2 dx=38β‹…m33=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=43β‰ˆ1.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