Continuous Random Variables (AA HL)

A continuous random variable \(X\) is described by a probability density function \(f(x)\) rather than a list of individual probabilities - you integrate to get any actual probability. This page covers finding an unknown constant in \(f(x)\), and using it to find \(E(X)\) and \(\text{Var}(X)\). It's part of the broader Probability Distributions topic.

24 questions on this sub-topic.

Practise continuous random variables → Try exam-style questions

The two key integrals

Covered under IB syllabus reference AHL4.14: continuous random variables and their probability density functions, and the variance formula \(\text{Var}(X)=E(X^2)-[E(X)]^2\) extended to the continuous case. Both integrals below are in the formula booklet, but you still need to set up the bounds and evaluate them yourself for each \(f(x)\).

Total probability

\(\displaystyle\int f(x)\,dx = 1\)

Integrate over the domain where \(f(x)\) is nonzero. This is the usual way to find an unknown constant \(k\).

Mean and variance

\(E(X)=\displaystyle\int x f(x)\,dx\),   \(\text{Var}(X)=E(X^2)-[E(X)]^2\)

Find \(E(X^2)=\int x^2 f(x)\,dx\) separately, then subtract \([E(X)]^2\).

Need the full syllabus wording and formula-booklet reference table? See Probability Distributions.

Worked examples

1
Easy
No calc
[3 marks]

A continuous random variable \(X\) has pdf \(f(x) = k(1-x)\) for \(0 \leq x \leq 1\), zero otherwise.

(a) Find \(k\).
(b) Find \(P\!\left(X < \tfrac{1}{2}\right)\).

Worked solution

(a)   \(\displaystyle\int_0^1 k(1-x)\,dx = k\Big[x - \tfrac{x^2}{2}\Big]_0^1 = k\cdot\tfrac{1}{2} = 1\) M1
\(k = 2\) A1

(b)   \(\displaystyle\int_0^{1/2} 2(1-x)\,dx = 2\Big[x-\tfrac{x^2}{2}\Big]_0^{1/2} = 2\cdot\tfrac{3}{8} = \tfrac{3}{4}\) A1

M1 Set integral to 1 A1 K=2 A1 Probability
2
Hard
No calc
[4 marks]

A continuous random variable \(X\) has pdf \(f(x) = \tfrac{x^2}{9}\) for \(0 \leq x \leq 3\), with \(E(X)=2.25\). Find \(\text{Var}(X)\).

Worked solution

\(E(X^2)=\displaystyle\int_0^3 x^2\cdot\tfrac{x^2}{9}\,dx=\Big[\tfrac{x^5}{45}\Big]_0^3\) M1
\(=5.4\) A1
\(\text{Var}(X)=5.4-2.25^2\) M1
\(=0.3375\) A1

M1 E(X²) integral A1 Correct answer of 5.4 M1 Var formula A1 Answer
3
Hard
Calculator
[6 marks]

A continuous random variable \(X\) has pdf \(f(x) = \dfrac{k}{x^2}\) for \(1 \leq x \leq 4\), zero otherwise.

(a)  Find \(k\).

(b)  Find \(E(X)\).

(c)  Find the median of \(X\).

Worked solution

(a)   \(\displaystyle\int_1^4 \dfrac{k}{x^2}\,dx = k\Big[-\tfrac{1}{x}\Big]_1^4 = k\left(-\tfrac{1}{4}+1\right) = \tfrac{3k}{4} = 1\) M1
\(k = \dfrac{4}{3}\) A1

(b)   \(E(X) = \displaystyle\int_1^4 x\cdot\dfrac{4}{3x^2}\,dx = \dfrac{4}{3}\int_1^4 \dfrac{1}{x}\,dx = \dfrac{4}{3}\Big[\ln x\Big]_1^4\) M1
\(= \dfrac{4\ln 4}{3}\) A1

(c)   \(\displaystyle\int_1^m \dfrac{4}{3x^2}\,dx = \tfrac{4}{3}\left(1-\tfrac{1}{m}\right) = \tfrac{1}{2}\) M1
\(1-\tfrac{1}{m} = \tfrac{3}{8} \Rightarrow m = \dfrac{8}{5} = 1.6\) A1

M1 Integral=1 A1 K=4/3 M1 E A1 4ln4/3 M1 Median equation A1 M=8/5

Common mistakes

Ready to practise properly?

24 continuous-random-variable questions, marked instantly like the real exam.

Quick answers

How do you find an unknown constant in a probability density function?

Set \(\int f(x)\,dx = 1\) over the domain where \(f(x)\) is nonzero, since total probability must equal 1, then solve for the constant.

How do you find the expected value of a continuous random variable?

\(E(X) = \int x f(x)\,dx\) over the domain of \(f(x)\). Variance then follows from \(\text{Var}(X) = E(X^2) - [E(X)]^2\). GDC guidance for evaluating these integrals is covered on the Probability Distributions page.

← Back to Analysis & Approaches HL topics