Skip to main content

Continuous random variables and pdf: QCE Maths Methods Unit 4

Syllabus dot point

“Define a continuous random variable, its probability density function (pdf), cumulative distribution function (cdf), and compute probabilities, expected value (mean), variance and standard deviation 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, with probabilities computed as definite integrals P(a≤X≤b)=∫fP(a \leq X \leq b) = \int f, expected value as E(X)=∫xf dxE(X) = \int x f \, dx, and variance as E(X2)−[E(X)]2E(X^2) - [E(X)]^2 where E(X2)=∫x2f dxE(X^2) = \int x^2 f \, dx.

Jump to a section
  1. What this dot point is asking
  2. Continuous random variable
  3. Probability density function (pdf)
  4. Cumulative distribution function (cdf)
  5. Expected value (mean)
  6. Variance and standard deviation
  7. Median and quartiles
  8. The uniform distribution
  9. PSMT and EA contexts
  10. Exam-style questions

What this dot point is asking

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

Continuous random variable

A continuous random variable XX takes values in a continuum (an interval of real numbers). Examples: a waiting time, a length, a temperature. Because XX has uncountably many possible values, P(X=x)=0P(X = x) = 0 for any single value; probabilities are computed for intervals.

Probability density function (pdf)

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

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

Two conditions for a valid pdf:

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

For XX supported on [a,b][a, b] (and f=0f = 0 outside), condition 2 becomes ∫abf(x) dx=1\int_{a}^{b} f(x) \, dx = 1.

Finding a normalising constant

A common PSMT and EA question gives f(x)=kg(x)f(x) = k g(x) on [a,b][a, b] and asks for kk. Set ∫kg=1\int k g = 1; solve for kk.

Cumulative distribution function (cdf)

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

Properties:

  • FF is non-decreasing.
  • F(−∞)=0F(-\infty) = 0, F(∞)=1F(\infty) = 1.
  • P(a≤X≤b)=F(b)−F(a)P(a \leq X \leq b) = F(b) - F(a).
  • F′(x)=f(x)F'(x) = f(x) where ff is continuous (fundamental theorem of calculus).

Expected value (mean)

The expected value of XX is:

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

(For XX on [a,b][a, b], the limits reduce to aa and bb.)

Interpretation: the centre of mass of the pdf; the long-run average of independent observations.

Linearity: E(aX+b)=aE(X)+bE(aX + b) = a E(X) + b.

Variance and standard deviation

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

where E(X2)=∫x2f(x) dxE(X^2) = \int x^2 f(x) \, dx.

The right-hand identity is the working formula.

Standard deviation σ=Var(X)\sigma = \sqrt{\text{Var}(X)}.

Property: Var(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2 \text{Var}(X).

Median and quartiles

Median: mm such that P(X≤m)=1/2P(X \leq m) = 1/2. Solve ∫amf dx=1/2\int_{a}^{m} f \, dx = 1/2.

Quartiles: ∫=1/4\int = 1/4 and ∫=3/4\int = 3/4.

For symmetric pdfs 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 f(x)=1b−af(x) = \frac{1}{b-a} on [a,b][a, b], 00 elsewhere.

  • E(X)=(a+b)/2E(X) = (a+b)/2.
  • Var(X)=(b−a)2/12\text{Var}(X) = (b-a)^2 / 12.
  • P(c≤X≤d)=(d−c)/(b−a)P(c \leq X \leq d) = (d-c)/(b-a) for a≤c≤d≤ba \leq c \leq d \leq b.
Triangular pdf

The pdf f(x)=kxf(x) = kx on [0,2][0, 2] and 00 elsewhere forms a triangular shape. We find kk, then compute the mean, variance and standard deviation.

Step 1: Find the normalising constant kk

Every valid pdf must integrate to 11 over its support. Setting up the normalisation condition gives an equation in kk.

∫02kx dx=[kx22]02=k⋅42=2k=1\int_0^2 kx \, dx = \left[\frac{kx^2}{2}\right]_0^2 = \frac{k \cdot 4}{2} = 2k = 1

Solving gives k=12k = \dfrac{1}{2}, so the pdf is f(x)=x2f(x) = \dfrac{x}{2} on [0,2][0, 2].

Step 2: Compute the mean E(X)E(X)

The expected value is E(X)=∫xf(x) dxE(X) = \int x f(x) \, dx. We substitute f(x)=x2f(x) = \tfrac{x}{2} and integrate x22\tfrac{x^2}{2}.

E(X)=∫02x⋅x2 dx=∫02x22 dx=12⋅[x33]02=12⋅83=43E(X) = \int_0^2 x \cdot \frac{x}{2} \, dx = \int_0^2 \frac{x^2}{2} \, dx = \frac{1}{2} \cdot \left[\frac{x^3}{3}\right]_0^2 = \frac{1}{2} \cdot \frac{8}{3} = \frac{4}{3}

Step 3: Compute the variance and standard deviation

To use the shortcut formula Var(X)=E(X2)−[E(X)]2\mathrm{Var}(X) = E(X^2) - [E(X)]^2, we first compute E(X2)=∫x2f(x) dxE(X^2) = \int x^2 f(x) \, dx.

E(X2)=∫02x2⋅x2 dx=∫02x32 dx=12⋅[x44]02=12⋅164=2E(X^2) = \int_0^2 x^2 \cdot \frac{x}{2} \, dx = \int_0^2 \frac{x^3}{2} \, dx = \frac{1}{2} \cdot \left[\frac{x^4}{4}\right]_0^2 = \frac{1}{2} \cdot \frac{16}{4} = 2

Now apply the variance shortcut.

Var(X)=E(X2)−[E(X)]2=2−(43)2=2−169=18−169=29\mathrm{Var}(X) = E(X^2) - [E(X)]^2 = 2 - \left(\frac{4}{3}\right)^2 = 2 - \frac{16}{9} = \frac{18 - 16}{9} = \frac{2}{9}

Final answer: k=12k = \dfrac{1}{2}, E(X)=43E(X) = \dfrac{4}{3}, Var(X)=29\mathrm{Var}(X) = \dfrac{2}{9}, and σ=29=23\sigma = \sqrt{\dfrac{2}{9}} = \dfrac{\sqrt{2}}{3}.

PSMT and EA contexts

The IA3 PSMT often models a continuous distribution arising from a real-world variable (waiting time, lifetime, error magnitude). Typical questions:

  • Find the normalising constant for a given pdf shape.
  • Compute the probability of a specific event.
  • Compute and interpret the mean and standard deviation.
  • Compute the median or a percentile.

The EA Paper 2 short response examines the formulas explicitly.

Common errors
Forgetting normalisation
A pdf must integrate to 1. Forgetting this in finding kk is the most common slip.
Using f(x)f(x) as probability
f(2)=0.3f(2) = 0.3 does not mean P(X=2)=0.3P(X = 2) = 0.3. The pdf is a density, not a probability.
Wrong variance formula
Var=E(X2)−[E(X)]2\text{Var} = E(X^2) - [E(X)]^2, not E(X2)−E(X)E(X^2) - E(X).
Forgetting the pdf inside E(X)E(X)
E(X)=∫xf(x) dxE(X) = \int x f(x) \, dx, not ∫x dx\int x \, dx.
Wrong support
If f=0f = 0 outside [a,b][a, b], the integrals must be on [a,b][a, b], not (−∞,∞)(-\infty, \infty).

Exam-style questions

Questions in the style of QCAA 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.

Practice5 marks
Paper 2 (complex familiar). A continuous random variable XX has pdf f(x)=k(4−x2)f(x) = k(4 - x^2) on [−2,2][-2, 2] and 00 elsewhere. (a) Determine kk. (b) Determine E(X)E(X). (c) Determine Var(X)\text{Var}(X).
Show worked answer →

(a) Find kk. Normalisation: ∫f=1\int f = 1.

∫−22k(4−x2) dx=2k∫02(4−x2) dx\int_{-2}^{2} k(4 - x^2) \, dx = 2k \int_{0}^{2} (4 - x^2) \, dx (by symmetry).

=2k[4x−x33]02=2k(8−83)=2k⋅163=32k3= 2k \left[ 4x - \frac{x^3}{3} \right]_{0}^{2} = 2k \left( 8 - \frac{8}{3} \right) = 2k \cdot \frac{16}{3} = \frac{32 k}{3}.

Set 32k3=1\frac{32k}{3} = 1: k=332k = \frac{3}{32}.

(b) Expected value. E(X)=∫−22x⋅332(4−x2) dxE(X) = \int_{-2}^{2} x \cdot \frac{3}{32}(4 - x^2) \, dx.

The integrand x(4−x2)x(4 - x^2) is an odd function on a symmetric interval [−2,2][-2, 2], so the integral is 0. E(X)=0E(X) = 0.

(c) Variance. Need E(X2)E(X^2).

E(X2)=∫−22x2⋅332(4−x2) dx=332∫−22(4x2−x4) dxE(X^2) = \int_{-2}^{2} x^2 \cdot \frac{3}{32}(4 - x^2) \, dx = \frac{3}{32} \int_{-2}^{2} (4 x^2 - x^4) \, dx.

By symmetry: =316∫02(4x2−x4) dx=316[4x33−x55]02= \frac{3}{16} \int_{0}^{2} (4 x^2 - x^4) \, dx = \frac{3}{16} \left[ \frac{4 x^3}{3} - \frac{x^5}{5} \right]_{0}^{2}.

Evaluate: =316(323−325)=316⋅160−9615=316⋅6415=192240=45= \frac{3}{16} \left( \frac{32}{3} - \frac{32}{5} \right) = \frac{3}{16} \cdot \frac{160 - 96}{15} = \frac{3}{16} \cdot \frac{64}{15} = \frac{192}{240} = \frac{4}{5}.

Var(X)=E(X2)−[E(X)]2=45−0=45\text{Var}(X) = E(X^2) - [E(X)]^2 = \frac{4}{5} - 0 = \frac{4}{5}.

Markers reward the normalisation calculation with symmetry shortcut, the odd-integrand observation for E(X)E(X), and the variance formula with correct arithmetic.

Practice4 marks
Paper 2 (complex familiar). A waiting time XX (minutes) has pdf f(x)=x8f(x) = \dfrac{x}{8} on [0,4][0, 4] and 00 elsewhere. (a) Verify that ff is a valid pdf. (b) Determine P(X≤2)P(X \leq 2). (c) Determine the median waiting time.
Show worked answer →

(a) ∫04x8 dx=[x216]04=1616=1\displaystyle\int_0^4 \dfrac{x}{8}\,dx = \left[\dfrac{x^2}{16}\right]_0^4 = \dfrac{16}{16} = 1, and f(x)≥0f(x) \geq 0 on [0,4][0, 4], so ff is a valid pdf.

(b) P(X≤2)=∫02x8 dx=[x216]02=416=14.P(X \leq 2) = \displaystyle\int_0^2 \dfrac{x}{8}\,dx = \left[\dfrac{x^2}{16}\right]_0^2 = \dfrac{4}{16} = \dfrac{1}{4}.

(c) The median mm solves ∫0mx8 dx=12\displaystyle\int_0^m \dfrac{x}{8}\,dx = \dfrac{1}{2}, so m216=12\dfrac{m^2}{16} = \dfrac{1}{2}, m2=8m^2 = 8, m=22≈2.83m = 2\sqrt 2 \approx 2.83 minutes.

Markers reward the normalisation check, the probability integral, and solving for the median.

Practise this

Sources & how we know this

ExamExplained