Skip to main content

Probability density functions: WACE Year 12 Mathematics Methods Unit 4

Syllabus dot point

“Use probability density functions to find probabilities as areas, determine an unknown constant, and compute the mean and variance by integration”

8 min read

Quick answer

A probability density function satisfies f(x)≥0f(x)\ge 0 and total area 11. Probabilities are areas: P(a≤X≤b)=∫abf(x) dxP(a\le X\le b)=\int_a^b f(x)\,dx. The mean is ∫xf(x) dx\int x f(x)\,dx and the variance is ∫x2f(x) dx−μ2\int x^{2} f(x)\,dx-\mu^{2}.

Jump to a section
  1. What this dot point is asking
  2. Validity conditions
  3. Finding an unknown constant
  4. Mean and variance by integration
  5. Variance by integration
  6. The median
  7. Exam-style questions

What this dot point is asking

SCSA Unit 4 introduces continuous random variables, where outcomes fill an interval rather than a list. This dot point asks you to verify a probability density function (pdf), find probabilities and an unknown constant, and compute the mean and variance by integration. It is examined in both sections, with the calculator-assumed section favouring integrals that need numerical evaluation and the calculator-free section favouring polynomial densities with exact answers.

Validity conditions

Probability density function

A function f(x)f(x) is a pdf for a continuous random variable XX when

f(x)≥0 for all x,∫−∞∞f(x) dx=1.f(x)\ge 0 \text{ for all } x, \qquad \int_{-\infty}^{\infty} f(x)\,dx = 1.

Probabilities are areas under ff.

Because area over a single point is zero, P(X=a)=0P(X=a)=0 for any value aa, so P(a≤X≤b)=P(a<X<b)P(a\le X\le b)=P(a<X<b). The inequality endpoints do not change a continuous probability. The density f(x)f(x) is not itself a probability and can exceed 11; only areas under it represent probabilities. The support of the variable is the set of xx where f(x)>0f(x)>0, and outside the support ff is zero, contributing nothing to any integral. Always integrate only across the support.

Finding an unknown constant

If a pdf contains an unknown coefficient, the total-area condition determines it.

Finding the constant and a probability

XX has f(x)=kx2f(x)=k x^{2} for 0≤x≤30\le x\le 3 and 00 otherwise. Find kk, then P(X≤2)P(X\le 2).

Step 1: Use the total-area condition to find kk

Every pdf must integrate to 11 over its support. Setting up this equation is the standard method for finding any unknown constant in a pdf.

∫03kx2 dx=k[x33]03=k⋅9=1,\int_0^3 k x^{2}\,dx = k\left[\frac{x^{3}}{3}\right]_0^3 = k\cdot 9 = 1,

so k=19k=\dfrac{1}{9}.

Step 2: Integrate the pdf over the required interval for the probability

Now that kk is known, substitute and integrate from 00 to 22. The probability equals the area under the curve over that interval.

P(X≤2)=∫0219x2 dx=19[x33]02=19⋅83=827P(X\le 2) = \int_0^2 \frac{1}{9}x^{2}\,dx = \frac{1}{9}\left[\frac{x^{3}}{3}\right]_0^2 = \frac{1}{9}\cdot\frac{8}{3} = \frac{8}{27}

Final answer: k=19k=\dfrac{1}{9} and P(X≤2)=827≈0.296P(X\le 2)=\dfrac{8}{27}\approx 0.296.

Mean and variance by integration

The discrete sums become integrals for a continuous variable.

Mean and variance of a continuous variable

μ=E(X)=∫−∞∞x f(x) dx,Var(X)=∫−∞∞x2 f(x) dx−μ2.\mu = E(X) = \int_{-\infty}^{\infty} x\,f(x)\,dx, \qquad \mathrm{Var}(X) = \int_{-\infty}^{\infty} x^{2}\,f(x)\,dx - \mu^{2}.

Mean by integration

With f(x)=19x2f(x)=\dfrac{1}{9}x^{2} on [0,3][0,3], find E(X)E(X).

Step 1: Set up the mean integral

The mean of a continuous variable is E(X)=∫x f(x) dxE(X)=\int x\,f(x)\,dx. Compared to finding a probability, we multiply the pdf by an extra factor of xx before integrating.

E(X)=∫03x⋅19x2 dx=19∫03x3 dxE(X) = \int_0^3 x\cdot\frac{1}{9}x^{2}\,dx = \frac{1}{9}\int_0^3 x^{3}\,dx

Step 2: Evaluate the integral

Integrating x3x^3 and applying the limits gives the mean directly.

19[x44]03=19⋅814=94\frac{1}{9}\left[\frac{x^{4}}{4}\right]_0^3 = \frac{1}{9}\cdot\frac{81}{4} = \frac{9}{4}

Final answer: E(X)=94=2.25E(X)=\dfrac{9}{4}=2.25. The mean lies toward the right of the interval because the density grows with xx.

Variance by integration

The variance uses the same idea with an extra factor of x2x^{2}, then subtracts the square of the mean, exactly mirroring the discrete shortcut.

Variance of a continuous variable

For the pdf f(x)=19x2f(x)=\dfrac{1}{9}x^{2} on [0,3][0,3] (mean E(X)=2.25E(X)=2.25 from the previous example), find Var(X)\mathrm{Var}(X) and the standard deviation.

Step 1: Compute E(X2)E(X^{2})

The shortcut formula Var(X)=E(X2)−μ2\mathrm{Var}(X)=E(X^{2})-\mu^{2} requires E(X2)E(X^{2}) first. This integral multiplies the pdf by x2x^{2} (one more power of xx than for the mean).

E(X2)=∫03x2⋅19x2 dx=19∫03x4 dx=19[x55]03=19⋅2435=275=5.4E(X^{2})=\int_{0}^{3}x^{2}\cdot\frac{1}{9}x^{2}\,dx=\frac{1}{9}\int_{0}^{3}x^{4}\,dx=\frac{1}{9}\left[\frac{x^{5}}{5}\right]_{0}^{3}=\frac{1}{9}\cdot\frac{243}{5}=\frac{27}{5}=5.4

Step 2: Apply the shortcut formula for variance

Subtracting the square of the mean converts E(X2)E(X^{2}) into the variance. Then the standard deviation is the square root.

Var(X)=E(X2)−μ2=5.4−2.252=5.4−5.0625=0.3375\mathrm{Var}(X)=E(X^{2})-\mu^{2}=5.4-2.25^{2}=5.4-5.0625=0.3375

Final answer: Var(X)=0.3375\mathrm{Var}(X)=0.3375 and standard deviation σ=0.3375≈0.581\sigma=\sqrt{0.3375}\approx 0.581.

The median

The median mm splits the area in half: ∫−∞mf(x) dx=0.5\int_{-\infty}^{m} f(x)\,dx = 0.5. For a symmetric pdf the median equals the mean, but for a skewed density such as the one above they differ, and each must be found from its own integral equation. To find the median of f(x)=19x2f(x)=\dfrac{1}{9}x^{2} on [0,3][0,3], solve 19⋅m33=0.5\dfrac{1}{9}\cdot\dfrac{m^{3}}{3}=0.5, giving m3=13.5m^{3}=13.5 and m≈2.38m\approx 2.38, which lies above the median position you might guess because the density is heaviest near x=3x=3.

Common errors
Treating P(X=a)P(X=a) as nonzero
For a continuous variable the probability of an exact value is 00; probabilities are areas over intervals.
Skipping the area-equals-one step
With an unknown constant, solve ∫f=1\int f=1 first before finding any probability.
Forgetting the extra xx for the mean
E(X)=∫xf(x) dxE(X)=\int x f(x)\,dx, not ∫f(x) dx\int f(x)\,dx.
Integrating over the wrong interval
Use the support where f>0f>0; outside it f=0f=0 contributes nothing.

Exam-style questions

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

WACE 2022-style7 marks
Calculator-assumed. A continuous random variable XX has probability density function f(x)=k(4−x)f(x)=k(4-x) for 0≤x≤40\le x\le 4 and zero otherwise. (a) Find kk. (b) Find P(X≤1)P(X\le 1). (c) Find E(X)E(X).
Show worked answer →

A full pdf question.

(a) Total area 11: ∫04k(4−x) dx=k[4x−x22]04=k(16−8)=8k=1\displaystyle\int_{0}^{4}k(4-x)\,dx=k\left[4x-\dfrac{x^{2}}{2}\right]_{0}^{4}=k(16-8)=8k=1, so k=18k=\dfrac{1}{8}.

(b) P(X≤1)=∫0118(4−x) dx=18[4x−x22]01=18(4−12)=716P(X\le 1)=\displaystyle\int_{0}^{1}\dfrac{1}{8}(4-x)\,dx=\dfrac{1}{8}\left[4x-\dfrac{x^{2}}{2}\right]_{0}^{1}=\dfrac{1}{8}\left(4-\dfrac{1}{2}\right)=\dfrac{7}{16}.

(c) E(X)=∫04x⋅18(4−x) dx=18∫04(4x−x2) dx=18[2x2−x33]04=18(32−643)=43E(X)=\displaystyle\int_{0}^{4}x\cdot\dfrac{1}{8}(4-x)\,dx=\dfrac{1}{8}\int_{0}^{4}(4x-x^{2})\,dx=\dfrac{1}{8}\left[2x^{2}-\dfrac{x^{3}}{3}\right]_{0}^{4}=\dfrac{1}{8}\left(32-\dfrac{64}{3}\right)=\dfrac{4}{3}.

Markers reward the area-equals-one equation, integrating over the correct interval, and the extra factor of xx for the mean.

WACE 2024-style5 marks
Calculator-free. A continuous random variable has f(x)=38x2f(x)=\dfrac{3}{8}x^{2} for 0≤x≤20\le x\le 2. (a) Verify that ff is a valid pdf. (b) Find P(X≥1)P(X\ge 1).
Show worked answer →

A verify-and-compute question.

(a) f(x)≥0f(x)\ge 0 on [0,2][0,2], and ∫0238x2 dx=38[x33]02=38⋅83=1\displaystyle\int_{0}^{2}\dfrac{3}{8}x^{2}\,dx=\dfrac{3}{8}\left[\dfrac{x^{3}}{3}\right]_{0}^{2}=\dfrac{3}{8}\cdot\dfrac{8}{3}=1. Both conditions hold, so ff is a valid pdf.

(b) P(X≥1)=∫1238x2 dx=38[x33]12=18(8−1)=78P(X\ge 1)=\displaystyle\int_{1}^{2}\dfrac{3}{8}x^{2}\,dx=\dfrac{3}{8}\left[\dfrac{x^{3}}{3}\right]_{1}^{2}=\dfrac{1}{8}(8-1)=\dfrac{7}{8}.

Markers reward checking both validity conditions and integrating over [1,2][1,2].

Practise this

Sources & how we know this

ExamExplained