Resources For Teachers For Tutors For Students & Parents Pricing
Year 12 Methods (Unit 3 & 4) Continuous random variables

Introduction to continuous random variables

20 practice questions 0 video lessons Theory + worked examples

In Year 12 Mathematical Methods (Queensland, QCAA), a continuous random variable \(X\) is described by a probability density function \(f(x)\). It must satisfy \(f(x)\ge 0\) everywhere and enclose total area \(1\). A probability is an area: \(P(a\le X\le b)=\int_a^b f(x)\,dx\). A single value has probability \(0\), and the simplest example is the continuous uniform distribution.

A continuous random variable \(X\) can take any value in an interval (a length, a time, a temperature), so we cannot list its outcomes. Instead its behaviour is captured by a probability density function \(f(x)\): a curve whose area gives probability.

For \(f(x)\) to be a valid density it must meet two conditions: \(f(x)\ge 0\) for all \(x\) (probabilities are never negative), and the total area under the graph is \(1\), i.e. \(\int_{-\infty}^{\infty} f(x)\,dx=1\). Often the density is given on a finite interval (the support) and is \(0\) elsewhere.

The probability that \(X\) lies between \(a\) and \(b\) is the area under \(f\) there, \(P(a\le X\le b)=\int_a^b f(x)\,dx\). Because a single point has zero width, \(P(X=c)=0\); so \(\le\) and \(<\) give the same probability. The continuous uniform distribution has a constant density \(f(x)=\dfrac{1}{b-a}\) on \([a,b]\).

Key idea. A density is a curve, not a probability. Probability is the area under it: the whole area is \(1\), and \(P(a\le X\le b)=\int_a^b f(x)\,dx\).
Probability as the shaded area under a densityA density curve with the region between x=a and x=b shaded; the shaded area equals the probability that X lies between a and b. x f(x) a b P(a≤X≤b)
\(P(a\le X\le b)=\int_a^b f(x)\,dx\) is the shaded area
Continuous uniform densityA rectangular density of constant height 1 over (b minus a) between x=a and x=b; the rectangle has total area 1. x f(x) a b height 1/(b−a)
Continuous uniform: \(f(x)=\dfrac{1}{b-a}\) on \([a,b]\), a rectangle of area \(1\)

Conditions for a probability density function:

\[f(x)\ge 0 \ \text{for all } x \qquad \int_{-\infty}^{\infty} f(x)\,dx = 1\]
f(x)dx=1

A probability is an area under the density:

\[P(a\le X\le b)=\int_a^b f(x)\,dx \qquad P(X=c)=0\]
P(aXb)=abf(x)dx

The complement (total area is \(1\)):

\[P(X>a)=1-P(X\le a)\]
P(X>a)=1-P(Xa)
Continuous uniform. \(f(x)=\dfrac{1}{b-a}\) on \([a,b]\); a sub-interval probability is width \(\times\) height, e.g. \(P(c\le X\le d)=\dfrac{d-c}{b-a}\).

How to work with a continuous random variable

  1. Check it is a density. Confirm \(f(x)\ge 0\) on its support and that the total area is \(1\) (integrate over the support).
  2. Find an unknown \(k\). Set the total area to \(1\): \(\int f(x)\,dx=1\) over the support, then solve for \(k\).
  3. Read a probability as an area. \(P(a\le X\le b)=\int_a^b f(x)\,dx\). For \(P(X\le b)\) integrate from the left end of the support; a single value contributes nothing, so \(\le\) and \(<\) agree.
  4. Use the complement. \(P(X>a)=1-P(X\le a)\), which is often quicker than integrating the far tail.
Uniform shortcut. For \(f(x)=\dfrac{1}{b-a}\) on \([a,b]\), no integration is needed: a probability is just the width of the interval divided by \(b-a\).
Example 1 — Find the constant \(k\)
\(f(x)=k\,x\) for \(0\le x\le 2\) (and \(0\) otherwise) is a density. Find \(k\).
Solution

Set the total area to \(1\).

\(\displaystyle\int_0^2 k\,x\,dx\)\(=\)\(k\Big[\dfrac{x^2}{2}\Big]_0^2=2k\)
\(2k\)\(=\)\(1\)
\(k\)\(=\)\(\dfrac{1}{2}\)

So \(f(x)=\dfrac{1}{2}x\) on \([0,2]\).

k=12
Example 2 — A uniform probability
\(X\) is uniform with \(f(x)=\dfrac{1}{5}\) on \([2,7]\). Find \(P(3\le X\le 5)\).
Solution

The probability is width \(\times\) constant height.

\(P(3\le X\le 5)\)\(=\)\((5-3)\times\dfrac{1}{5}\)
\(=\)\(\dfrac{2}{5}=0.4\)

No integration needed for a uniform density.

P=25
Example 3 — A probability as an area
\(f(x)=\dfrac{3}{8}x^2\) for \(0\le x\le 2\). Find \(P(X\le 1)\).
Solution

Integrate the density from \(0\) to \(1\).

\(P(X\le 1)\)\(=\)\(\displaystyle\int_0^1 \dfrac{3}{8}x^2\,dx\)
\(=\)\(\dfrac{3}{8}\Big[\dfrac{x^3}{3}\Big]_0^1=\dfrac{1}{8}\)

So \(P(X\le 1)=0.125\).

Graph of y=(3/8)x^2 with the region for P(X at most 1) shadedIncreasing quadratic density on 0 to 2 with the area from 0 to 1 shaded, equal to 0.125. x f(x) 1 P(X≤1)
P=18
Example 4 — A single value and the complement
Using \(f(x)=\dfrac{3}{8}x^2\) on \([0,2]\), find \(P(X=1)\) and \(P(X>1)\).
Solution

A single value has zero area; then use the complement.

\(P(X=1)\)\(=\)\(\displaystyle\int_1^1 f(x)\,dx=0\)
\(P(X>1)\)\(=\)\(1-P(X\le 1)\)
\(=\)\(1-0.125=0.875\)

So \(P(X=1)=0\) and \(P(X>1)=0.875\).

P(X>1)=0.875

Common pitfalls

\(f(c)\) is not a probability. The density height \(f(c)\) is not \(P(X=c)\); for a continuous variable \(P(X=c)=0\). A probability is an area, found by integrating over an interval.
\(\le\) versus \(<\) makes no difference. Because \(P(X=c)=0\), the endpoints do not change a probability: \(P(X\le b)=P(X
A density may exceed \(1\). \(f(x)\) can be greater than \(1\) at some points (e.g. a tall narrow density); it is the total area, not the height, that must equal \(1\). Only \(f(x)\ge 0\) is required.

Frequently asked questions

What conditions make f(x) a probability density function?

\(f(x)\ge 0\) for every \(x\), and the total area under \(y=f(x)\) is \(1\), i.e. \(\int_{-\infty}^{\infty} f(x)\,dx=1\).

How do you find an unknown constant k in a density?

Set the total area to \(1\): integrate \(f(x)\) over its support, put the result equal to \(1\), and solve for \(k\). E.g. \(f=kx\) on \([0,2]\) gives \(2k=1\), so \(k=\tfrac12\).

How do you find P(a ≤ X ≤ b)?

It is the area under the density between \(a\) and \(b\): \(P(a\le X\le b)=\int_a^b f(x)\,dx\).

Why is P(X = c) = 0?

A probability is an area; the interval from \(c\) to \(c\) has zero width, so \(\int_c^c f(x)\,dx=0\). Hence \(\le\) and \(<\) give the same probability.

How do you find P(X > a) quickly?

Use the complement: \(P(X>a)=1-P(X\le a)\), since the total area is \(1\).

What is the continuous uniform distribution?

A constant density \(f(x)=\dfrac{1}{b-a}\) on \([a,b]\). Its graph is a rectangle of area \(1\), so a probability is a width times the constant height.

Create a free accountTrack your progress and save your work as you go.
Create free account