Skip to main content

Continuous random variables: VCE Math Methods Unit 4

Syllabus dot point

“Continuous random variables, their probability density functions, cumulative distribution functions, expected value (mean), variance and standard deviation, and computation of probabilities as definite integrals”

9 min read

Quick answer

A continuous random variable XX is described by a probability density function f(x)f(x) that integrates to 1 over its support and is non-negative; probabilities are computed as definite integrals P(a≤X≤b)=∫abf dxP(a \leq X \leq b) = \int_{a}^{b} f \, dx, expected value as E(X)=∫xf(x) dxE(X) = \int x f(x) \, dx, and variance as E(X2)−[E(X)]2E(X^2) - [E(X)]^2 where E(X2)=∫x2f(x) dxE(X^2) = \int x^2 f(x) \, dx.

Jump to a section
  1. What this dot point is asking
  2. What is a continuous random variable
  3. The probability density function
  4. Computing probabilities
  5. The cumulative distribution function
  6. Expected value (mean)
  7. Variance and standard deviation
  8. Median and quartiles
  9. The uniform distribution
  10. Examples in context
  11. Try this
  12. Exam-style questions

What this dot point is asking

VCAA wants you to define a continuous random variable through its probability density function (pdf), compute probabilities as definite integrals, and compute expected value, variance and standard deviation as integrals. The dot point is the integration application that bridges Unit 4 calculus to Unit 4 statistics.

What is a continuous random variable

A continuous random variable XX takes values in a continuum (an interval of real numbers), not a finite or countable set. Examples: the time a customer waits in a queue, the length of a manufactured part, the maximum temperature on a given day.

Because XX has uncountably many possible values, the probability that XX takes any specific single value is zero. Probabilities are computed for intervals, not for points.

The probability density function

A continuous random variable XX is described by its probability density function f(x)f(x), with the property:

P(a≤X≤b)=∫abf(x) dxP(a \leq X \leq b) = \int_{a}^{b} f(x) \, dx

A valid pdf must satisfy two conditions:

  1. Non-negative. f(x)≥0f(x) \geq 0 for all xx.
  2. Integrates to 1. ∫−∞∞f(x) dx=1\int_{-\infty}^{\infty} f(x) \, dx = 1.

If ff is given as zero outside a finite interval [a,b][a, b] (the most common Unit 4 case), condition 2 becomes ∫abf(x) dx=1\int_{a}^{b} f(x) \, dx = 1. The interval [a,b][a, b] is called the support of the random variable.

Finding a normalising constant

A typical Paper 2 question gives f(x)=kg(x)f(x) = k g(x) on some interval and asks for the value of kk that makes ff a valid pdf.

Procedure: Set ∫abkg(x) dx=1\int_{a}^{b} k g(x) \, dx = 1. Compute the integral; solve for kk.

Example. If f(x)=kx(2−x)f(x) = k x (2 - x) on [0,2][0, 2], normalising gives k=34k = \frac{3}{4} (worked above).

Computing probabilities

For a continuous random variable with pdf ff:

P(a≤X≤b)=∫abf(x) dxP(a \leq X \leq b) = \int_{a}^{b} f(x) \, dx

The endpoints' open or closed nature does not matter: P(X=a)=0P(X = a) = 0 for any single value, so:

P(a≤X≤b)=P(a<X<b)=P(a<X≤b)=P(a≤X<b)P(a \leq X \leq b) = P(a < X < b) = P(a < X \leq b) = P(a \leq X < b)

For probabilities on one side only:

P(X≤c)=∫−∞cf(x) dx,P(X≥c)=∫c∞f(x) dxP(X \leq c) = \int_{-\infty}^{c} f(x) \, dx, \quad P(X \geq c) = \int_{c}^{\infty} f(x) \, dx

For an XX with support [a,b][a, b], these reduce to integrals over the appropriate sub-interval.

The cumulative distribution function

The cumulative distribution function (cdf) of XX is:

F(x)=P(X≤x)=∫−∞xf(t) dtF(x) = P(X \leq x) = \int_{-\infty}^{x} f(t) \, dt

Properties of the cdf:

  • FF is non-decreasing.
  • F(−∞)=0F(-\infty) = 0 and F(∞)=1F(\infty) = 1.
  • P(a≤X≤b)=F(b)−F(a)P(a \leq X \leq b) = F(b) - F(a).

The cdf is the antiderivative of the pdf (with appropriate constant), so F′(x)=f(x)F'(x) = f(x) where ff is continuous. This is the fundamental theorem applied to probability.

Expected value (mean)

The expected value of a continuous random variable XX is:

E(X)=μ=∫−∞∞xf(x) dxE(X) = \mu = \int_{-\infty}^{\infty} x f(x) \, dx

For XX with support [a,b][a, b]:

E(X)=∫abxf(x) dxE(X) = \int_{a}^{b} x f(x) \, dx

Interpretation: E(X)E(X) is the centre of mass of the pdf, the long-run average of many independent observations of XX.

Linearity of expectation

E(aX+b)=aE(X)+bE(aX + b) = a E(X) + b for constants a,ba, b.

E(X+Y)=E(X)+E(Y)E(X + Y) = E(X) + E(Y) for any two random variables on the same sample space.

Expectation of a function

For a function gg:

E[g(X)]=∫abg(x)f(x) dxE[g(X)] = \int_{a}^{b} g(x) f(x) \, dx

In particular, E(X2)=∫abx2f(x) dxE(X^2) = \int_{a}^{b} x^2 f(x) \, dx.

Variance and standard deviation

The variance of XX is:

Var(X)=E[(X−μ)2]=E(X2)−[E(X)]2\text{Var}(X) = E[(X - \mu)^2] = E(X^2) - [E(X)]^2

The right-hand identity is the working formula; compute E(X2)E(X^2) and E(X)E(X) separately, then subtract.

The standard deviation is σ=Var(X)\sigma = \sqrt{\text{Var}(X)}.

Properties

Var(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2 \text{Var}(X). Adding a constant does not change variance; multiplying by a constant scales variance by the constant squared.

Worked variance

For the pdf f(x)=x8f(x) = \frac{x}{8} on [0,4][0, 4] (worked above), E(X)=83E(X) = \frac{8}{3}, E(X2)=8E(X^2) = 8, Var(X)=89\text{Var}(X) = \frac{8}{9}, σ=223\sigma = \frac{2 \sqrt{2}}{3}.

Median and quartiles

The median of a continuous random variable XX is the value mm such that P(X≤m)=12P(X \leq m) = \frac{1}{2}. Find by solving:

∫amf(x) dx=12\int_{a}^{m} f(x) \, dx = \frac{1}{2}

The first and third quartiles satisfy similar equations with 14\frac{1}{4} and 34\frac{3}{4}.

Median and quartiles do not, in general, equal the mean. For symmetric pdfs (rectangle, isosceles triangle, normal) the median equals the mean. For skewed pdfs they differ.

The uniform distribution

The simplest continuous random variable. X∼U(a,b)X \sim U(a, b) has pdf:

f(x)=1b−a for a≤x≤b, 0 elsewheref(x) = \frac{1}{b - a} \text{ for } a \leq x \leq b, \text{ 0 elsewhere}

Properties:

  • E(X)=a+b2E(X) = \frac{a + b}{2} (midpoint)
  • Var(X)=(b−a)212\text{Var}(X) = \frac{(b - a)^2}{12}
  • Median = E(X)E(X) (symmetric)
  • P(c≤X≤d)=d−cb−aP(c \leq X \leq d) = \frac{d - c}{b - a} for a≤c≤d≤ba \leq c \leq d \leq b

The uniform is the "no information" distribution: all values in [a,b][a, b] are equally likely.

Common errors
Forgetting the normalisation condition
A pdf must integrate to 1 over its support. Forgetting to find kk from this condition is the most common Paper 2 mistake.
Using f(x)f(x) as if it were a probability
f(2)=0.3f(2) = 0.3 does not mean "P(X=2)=0.3P(X = 2) = 0.3". For a continuous random variable, P(X=2)=0P(X = 2) = 0 always. The pdf is a density, not a probability.
Wrong formula for variance
Var(X)=E(X2)−[E(X)]2\text{Var}(X) = E(X^2) - [E(X)]^2, not E(X2)−E(X)E(X^2) - E(X) or E(X)2−E(X2)E(X)^2 - E(X^2). The square applies to the mean.
Forgetting to use the pdf inside E(X)E(X)
E(X)=∫xf(x) dxE(X) = \int x f(x) \, dx, not ∫x dx\int x \, dx. The pdf is the weight.
Treating support as (−∞,∞)(-\infty, \infty) when it is [a,b][a, b]
If ff is zero outside [a,b][a, b], do not integrate outside [a,b][a, b]; the integral is zero there. Set limits to aa and bb.
Confusing median and mean
For skewed pdfs the median and mean differ. Symmetric pdfs have median equal to mean.

Examples in context

Example 1. Bus waiting time. Wait time XX (minutes) at a stop is uniform on [0,10][0, 10], so f(x)=110f(x) = \frac{1}{10} for 0≤x≤100 \le x \le 10. The probability of waiting at most 33 minutes is P(X≤3)=∫03110 dx=310=0.3P(X \le 3) = \int_0^3 \frac{1}{10}\,dx = \frac{3}{10} = 0.3. The mean wait is E(X)=0+102=5E(X) = \frac{0 + 10}{2} = 5 minutes, and the variance is (10−0)212=10012=8.33\frac{(10 - 0)^2}{12} = \frac{100}{12} = 8.33.

Example 2. Normalising a lifetime density. A component's lifetime XX (years) is modelled by f(x)=kx(2−x)f(x) = kx(2 - x) on [0,2][0, 2], zero elsewhere. The normalisation condition requires ∫02kx(2−x) dx=1\int_0^2 kx(2 - x)\,dx = 1. Evaluating, k[x2−x33]02=k(4−83)=4k3=1k\left[x^2 - \frac{x^3}{3}\right]_0^2 = k\left(4 - \frac{8}{3}\right) = \frac{4k}{3} = 1, so k=34k = \frac{3}{4}. The density is symmetric about x=1x = 1, so the mean lifetime is E(X)=1E(X) = 1 year.

Try this

Q1. A pdf is f(x)=kxf(x) = kx on [0,4][0, 4], zero elsewhere. Find kk. [2 marks]

  • Cue. ∫04kx dx=8k=1\int_0^4 kx\,dx = 8k = 1, so k=18k = \frac{1}{8}.

Q2. For f(x)=18xf(x) = \frac{1}{8}x on [0,4][0, 4], find P(1≤X≤3)P(1 \le X \le 3). [2 marks]

  • Cue. [x216]13=916−116=12\left[\frac{x^2}{16}\right]_1^3 = \frac{9}{16} - \frac{1}{16} = \frac{1}{2}.

Q3. For f(x)=18xf(x) = \frac{1}{8}x on [0,4][0, 4], find the median mm. [3 marks]

  • Cue. ∫0mx8 dx=m216=12⇒m2=8⇒m=22≈2.83\int_0^m \frac{x}{8}\,dx = \frac{m^2}{16} = \frac{1}{2} \Rightarrow m^2 = 8 \Rightarrow m = 2\sqrt{2} \approx 2.83.

Exam-style questions

Questions in the style of VCAA exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

2024 VCAA-style (Exam 2)5 marks
A continuous random variable XX has probability density function f(x)=kx(2−x)f(x) = k x (2 - x) for 0≤x≤20 \leq x \leq 2 and f(x)=0f(x) = 0 elsewhere. (a) Find the value of kk. (b) Find E(X)E(X).
Show worked answer →

(a) Find kk. A pdf must integrate to 1 over its support.

∫02kx(2−x) dx=k∫02(2x−x2) dx=k[x2−x33]02=k(4−83)=k⋅43\int_{0}^{2} k x (2 - x) \, dx = k \int_{0}^{2} (2x - x^2) \, dx = k \left[ x^2 - \frac{x^3}{3} \right]_{0}^{2} = k \left( 4 - \frac{8}{3} \right) = k \cdot \frac{4}{3}.

Set equal to 1: 4k3=1\frac{4k}{3} = 1, so k=34k = \frac{3}{4}.

(b) Expected value.

E(X)=∫02x⋅34x(2−x) dx=34∫02(2x2−x3) dx=34[2x33−x44]02E(X) = \int_{0}^{2} x \cdot \frac{3}{4} x (2 - x) \, dx = \frac{3}{4} \int_{0}^{2} (2 x^2 - x^3) \, dx = \frac{3}{4} \left[ \frac{2 x^3}{3} - \frac{x^4}{4} \right]_{0}^{2}.

Evaluate. 34(163−4)=34⋅43=1\frac{3}{4} \left( \frac{16}{3} - 4 \right) = \frac{3}{4} \cdot \frac{4}{3} = 1.

E(X)=1E(X) = 1.

Markers reward the normalisation condition for finding kk, the explicit ∫x⋅f(x) dx\int x \cdot f(x) \, dx set-up for expected value, and exact-value evaluation.

2023 VCAA-style (Exam 2)4 marks
A continuous random variable has f(x)=18xf(x) = \frac{1}{8} x for 0≤x≤40 \leq x \leq 4 and 0 elsewhere. (a) Find P(X≤2)P(X \leq 2). (b) Find Var(X)\text{Var}(X).
Show worked answer →

(a) Probability.

P(X≤2)=∫02x8 dx=[x216]02=416=14P(X \leq 2) = \int_{0}^{2} \frac{x}{8} \, dx = \left[ \frac{x^2}{16} \right]_{0}^{2} = \frac{4}{16} = \frac{1}{4}.

(b) Variance. First find E(X)E(X).

E(X)=∫04x⋅x8 dx=∫04x28 dx=[x324]04=6424=83E(X) = \int_{0}^{4} x \cdot \frac{x}{8} \, dx = \int_{0}^{4} \frac{x^2}{8} \, dx = \left[ \frac{x^3}{24} \right]_{0}^{4} = \frac{64}{24} = \frac{8}{3}.

E(X2)=∫04x2⋅x8 dx=∫04x38 dx=[x432]04=25632=8E(X^2) = \int_{0}^{4} x^2 \cdot \frac{x}{8} \, dx = \int_{0}^{4} \frac{x^3}{8} \, dx = \left[ \frac{x^4}{32} \right]_{0}^{4} = \frac{256}{32} = 8.

Var(X)=E(X2)−[E(X)]2=8−(83)2=8−649=72−649=89\text{Var}(X) = E(X^2) - [E(X)]^2 = 8 - \left( \frac{8}{3} \right)^2 = 8 - \frac{64}{9} = \frac{72 - 64}{9} = \frac{8}{9}.

Markers reward correct definite integrals for P(X≤2)P(X \leq 2), E(X)E(X) and E(X2)E(X^2), the variance formula E(X2)−[E(X)]2E(X^2) - [E(X)]^2, and exact-value answers.

Practise this

Sources & how we know this

ExamExplained