In this guide
← Maths AA guides

Statistics & probability · AA HL

Continuous random variables and variance

Use a probability density as an area model, normalise it and calculate cumulative probabilities, moments and quantiles.

Course focus: AA HL: this guide develops additional higher-level content; it is not required for AA SL.

Before you start: Definite integration and discrete expectation.

Start with a small example

Build it from the beginning

HL content

A density assigns probability to intervals through area. Its height is not a probability by itself and can exceed one. Before calculating events, establish the interval on which the density exists and make the total area equal to one.

A first walkthrough

A constant density c is defined on [0,4]. Find c and P(X<1).

  1. The total rectangle area is \(4c\), which must equal 1.
  2. Therefore \(c=1/4\).
  3. The interval [0,1] has probability \(1(1/4)=1/4\).
Try the practice ladder after learning the methods ↓

The foundations behind the method

Understand what the symbols mean

A continuous random variable uses a density rather than a probability assigned to each value. The density must be nonnegative on its support and have total integral one. Support specifies where values can occur; the density is zero outside it unless another piece is supplied.

How the ideas connect

Integrating density over an interval gives probability. The cumulative distribution integrates from the lower end of support to x, with values zero below support and one above it. Differentiating the cumulative function recovers density wherever differentiable. Density can exceed one without violating probability rules.

01

Start with the idea

Build your understanding

A density distributes probability across an interval. Its total area is one, but its pointwise height may exceed one. Integration converts density into probabilities, cumulative probabilities and moments.

Support

The support identifies where the variable can occur. Integrals outside it add no probability when the density is zero there.

Density versus cumulative value

The density is a rate of probability accumulation. A cumulative distribution is the probability below an input and must rise from zero to one.

Compare the approaches

Choose by the information in the question, rather than the formula you recognise first.

Density integral

When it helpsUse to calculate interval probabilities and moments.

Check before using itDo not interpret a density value as the probability of that point.

Cumulative distribution

When it helpsUse to calculate percentiles or differences of accumulated areas.

Check before using itInclude the outside-support pieces.

Your method plan

  1. Check nonnegativity and total integral.
  2. Use the support bounds in probability or moment integrals.
  3. Interpret a median through cumulative probability one half.
02

Learn the methods

Learn step by step

1. Density conditions

A probability density f(x) must be nonnegative on its support and integrate to 1. The support is the set of inputs where outcomes are possible. A density can exceed 1; its area, not its height, is probability. \(P(X=x)=0\) at each individual point for a continuous variable.

2. Normalisation and probability

If f contains a constant k, integrate over the whole support and set the result to 1. Then probability over an interval is the integral over the part of that interval inside the support. A piecewise density requires separate integrals across its change points.

Normalisation and interval

Why this formula works

A density is designed so area represents probability. Total possible-outcome probability must equal 1, giving normalisation. An interval captures its own portion of the total area; a point has zero width and therefore zero probability.

The formula

\(\int_{-\infty}^{\infty}f(x)\,dx=1\) \(P(a<X<b)=\int_a^bf(x)\,dx\).

Quick example

For uniform density \(\frac{1}{4}\) on [\(0,4\)], total area is 1. \(P(1<X<3)\) is width 2 times height \(\frac{1}{4}\), giving \(\frac{1}{2}\).

Worked example: A triangular density

Let \(f(x)=kx\) for \(0\le x\le 2\) and zero otherwise. Find k and \(P(X>1)\).

  1. Normalise: \(\int_0^2kx\,dx=2k=1\), so \(k=\frac{1}{2}\).
  2. \(P(X>1)=\int_1^2x/2\,dx=[x^2/4]_1^2=3/4\).
  3. The density at \(x=2\) is 1, but the probability \(X=2\) is zero.

3. Cumulative distribution

\(F(x)=P(X\le x)\) is zero below the support, increases through the support and becomes 1 above it. Its derivative equals the density where differentiable. Find a median by solving \(F(m)=\frac{1}{2}\) for a continuous distribution; first identify the piece that contains the median.

Density accumulates into a cumulative probability

00.511.500.511.52xy
  • Density f(x) = 2x
  • Cumulative F(x) = x²
  • F(x) = 1 after support
For density f(x) = 2x on [0,1], the cumulative probability is F(x) = x² there. At x = ½, density height is 1 but accumulated probability is ¼. Both are zero below support; F stays 1 above it.

CDF

Why this formula works

The CDF accumulates all probability to the left of x. A small increase dx adds approximately f(x)dx, explaining \(F'=f\) where differentiable. Below and above the support the CDF remains 0 and 1 respectively.

The formula

\(F(x)=\int_{-\infty}^xf(t)\,dt\). For a nonzero linear scale, \(f_Y(y)=f_X((y-b)/a)/|a|\).

Quick example

For \(f(x)=\frac{x}{2}\) on [\(0,2\)], \(F(x)=\frac{x^{2}}{4}\) within the support. Solving \(F(m)=\frac{1}{2}\) gives median \(m=\sqrt{2}\).

Worked example: Piecewise cumulative probability

A density is \(\frac{1}{3}\) on [\(0,1\)] and \(\frac{2}{3}\) on (1,2], and zero elsewhere. Find its median.

  1. The total area is \(\frac{1}{3}+\frac{2}{3}=1\), so the density is normalised. At \(x=1\) the cumulative probability is \(\frac{1}{3}\), below \(\frac{1}{2}\).
  2. The median is in (1,2]. There the CDF is \(\frac{1}{3}+(\frac{2}{3})(x-1)\).
  3. Set this to \(\frac{1}{2}\): \((\frac{2}{3})(m-1)=\frac{1}{6}\), so \(m=\frac{5}{4}\). Integrating only from 1 would have missed the accumulated lower area.

4. Mean and variance

Integrate x f(x) for the mean and \(x^{2}\) f(x) for the second moment. Subtract the square of the mean for variance. A mean outside a bounded support is a warning that a limit, normalising constant or arithmetic step is wrong.

Moments

Why this formula works

Continuous expectation is the limit of a weighted sum over thin intervals, replacing a sum by an integral of x times density. The same process gives the second moment; subtracting the square of the mean produces variance.

The formula

\(E(X)=\int xf(x)\,dx\) \(\operatorname{Var}(X)=\int x^2f(x)\,dx-[E(X)]^2\), integrating over the support.

Quick example

For uniform X on [\(0,2\)], \(E(X)=\int _{0}^{2}\frac{x}{2}\) \(dx=1\) and \(E(X^{2})=\frac{4}{3}\), so \(\text{variance}=\frac{1}{3}\).

Worked example: Mean, variance and median

Find these quantities for the same density.

  1. \(E(X)=\int_0^2x^2/2\,dx=4/3\); \(E(X^2)=\int_0^2x^3/2\,dx=2\).
  2. Variance is \(2-\frac{16}{9}=\frac{2}{9}\).
  3. Within the support \(F(x)=\frac{x^{2}}{4}\). Set it to \(\frac{1}{2}\): the median is \(\sqrt{2}\), using the positive root in [\(0,2\)].

5. Transformations and interpretation

For \(Y=aX+b\), expectation and variance follow the usual linear transformation rules. A density transformation also needs an absolute scaling factor and transformed support. If moments use infinite limits, handle the improper integral through a limit rather than substituting infinity like a number.

Quick formula reference

For revision once you understand the methods above. Check the conditions before using a formula.

Normalisation and interval

\(\int_{-\infty}^{\infty}f(x)\,dx=1\); \(P(a<X<b)=\int_a^bf(x)\,dx\).

Return to the explanation →

Moments

\(E(X)=\int xf(x)\,dx\), \(\operatorname{Var}(X)=\int x^2f(x)\,dx-[E(X)]^2\), integrating over the support.

Return to the explanation →

CDF

\(F(x)=\int_{-\infty}^xf(t)\,dt\). For a nonzero linear scale, \(f_Y(y)=f_X((y-b)/a)/|a|\).

Return to the explanation →

Learn to diagnose an error

Spot the mistake

The statement below is incorrect. Identify the missing condition or reasoning before opening the explanation.

Incorrect reasoning

A density's height at x=0.5 is 2, so its probability there is 2.

Explain and repair the mistake

Height is not point probability. A uniform density 2 on [0,0.5] has total area one, and any single exact value still has probability zero.

03

Connect and apply

Put the ideas together

A more demanding application of this guide’s methods. This is a learning stage; any additional HL content is labelled separately.

Worked application

Normalise, then find a median

A density is \(f(x)=kx\) on \(0\le x\le2\), and zero otherwise. Find k and the median.

  1. Normalisation requires \(\int_0^2kx\,dx=2k=1\), so \(k=1/2\). The density is nonnegative on its support.
  2. Within the support, \(F(x)=\int_0^x t/2\,dt=x^2/4\). Outside it, F is zero below 0 and one above 2.
  3. The median m satisfies \(m^2/4=1/2\), giving \(m=\sqrt2\). The negative root is outside the support.
  4. The density at 2 is one, but the probability at exactly 2 is still zero. Probabilities require an area.
Pause and explain

What is the mean, and must it equal the median?

Check your reasoning

The mean is \(\int_0^2x^2/2\,dx=4/3\). It differs from \(\sqrt2\); equality is not a general property of distributions.

Common mistakes and how to avoid them

  • Density is not point probability.
  • Integrate separately across piecewise boundaries.
  • \(E(X^{2})\) requires \(x^{2}\) times the density, not the square of xf(x).
  • Do not substitute infinity directly into an antiderivative.
04

Practise independently

Build confidence, then apply it

Try each question before opening its hint or solution. If a method is new, return to the walkthrough, then try again. These learning stages describe the practice sequence; additional HL content is labelled separately.

  1. 1

    Build confidence

    HL extension

    For this density, find P(1<X<3).

    Need a starting point?

    Use interval width times density height.

    Show the worked solution
    1. The interval has width 2.
    2. Its probability is \(2(1/4)=1/2\).
  2. 2

    Apply and explain

    HL extension

    What is P(X=2), and why is it not 1/4?

    Need a starting point?

    A point has no interval width.

    Show the worked solution
    1. A single point has zero area under a continuous density.
    2. The probability is zero; 1/4 is a density height.
  3. 3

    Check your understanding

    If \(f(x)=2x\) on [0,1], find \(P(X\le0.5)\).

    Show the worked solution

    Integrate: \(\int_0^{0.5}2x\,dx=0.25\). The density height at the endpoint, 1, is a different quantity.

  4. 4

    Use the method

    For the triangular density above, find \(P(X<0)\) and \(P(X\le 3)\).

    Show the worked solution

    The support is [\(0,2\)], so the probabilities are 0 and 1 respectively.

Finished? Use the linked question bank below to practise selecting the method without a guide telling you which rule to use.

Using these methods in exam questions

AA Paper 1

No calculator

Practise the algebra and exact values by hand. Keep fractions, surds and multiples of π exact where required. Show the steps that justify the result.

AA Paper 2

GDC required

Use graphing, numerical solving or statistical tools when appropriate. Write the setup before giving the output, and keep extra precision until the final answer.

For this topic: Define the variable or events, write the probability statement or hypotheses, then calculate. Name the distribution and its parameters; interpret the result using the original population or context.

HL only · GDC required

Paper 3: build a connected argument

Both AA HL and AI HL Paper 3 contain two extended problem-solving questions. A question develops a theme, so keep useful earlier results, test small cases and explain any proposed general rule. A calculator pattern can suggest a result; your mathematical reasoning must support it.

  1. Identify what the first part establishes and record the conditions under which it holds.
  2. When a later part introduces a new definition or model, connect it to methods you already know rather than assuming a new formula must have been memorised.
  3. Check the conclusion against an earlier numerical case and explain its meaning or limitation.

For the first-assessment-2021 courses. IB assessment reference ↗

Find a specific method or formula

Now practise the method

If you opened this guide from a question, return to that tab and try the method without looking at the example. Your answer stays in the question tab.

Practise this subtopic →

Want a broader practice session? Explore IB Maths AA HL practice questions →Try free IB Maths exam-style questions and worked solutions →

Original Arc Practice teaching notes for Maths AA. Core and HL sections are distinguished above. These notes follow the first-assessment-2021 course and are not an official IB publication or a complete syllabus checklist. IB course reference. Report a correction.