Maths4U
Menu

Maths4U Original · Learn, check, explain

Piecewise densities and cumulative probabilities — 9709 S2

Integrate on the correct branch and keep a cumulative distribution continuous.

Notes and key methods

Normalise a piecewise density by adding its separate integrals. The cumulative distribution \(F(x)=P(X\le x)\) must include all area to the left, including completed earlier pieces.

For an absolutely continuous variable, F is continuous, nondecreasing, zero below the support and one above it. At a point where f changes formula, match the two CDF expressions rather than resetting the accumulated probability.

Check the conditions

Three worked examples

Example 1 · Piecewise densities and cumulative functions

The density is \(f(x)=kx\ (0\le x\le 5),\quad f(x)=k(10-x)\ (5<x\le 10)\), and zero elsewhere.

Diagram for this worked example
Use the labelled scales alongside the numerical method.
  1. Find k.
  2. Find E(X).
  3. Find Var(X).
  4. Find \(\displaystyle P(X\le 1)\).
Show the reasoning

(a)

\(\displaystyle k(\frac{5^{2}}{2}+ \frac{5^{2}}{2})= 1\implies k= \frac{1}{25}\)

Answer: \(\displaystyle \frac{1}{25}\).

(b)

\(E(X)=5\) by symmetry about the centre of the support.

Answer: \(5\).

(c)

\(\displaystyle \int(x-E(X))^2f(x)\,dx=\frac{25}{6}\)

Answer: \(\displaystyle \frac{25}{6}\).

(d)

\(\displaystyle \int_{0}^{1} \frac{x}{25}\, dx= \frac{1}{50}\)

Answer: \(\displaystyle \frac{1}{50}\).

Example 2 · Piecewise densities and cumulative functions

The density is \(f(x)=kx\ (0\le x\le 6),\quad f(x)=k(12-x)\ (6<x\le 12)\), and zero elsewhere.

Diagram for this worked example
Use the labelled scales alongside the numerical method.
  1. Find k.
  2. Find E(X).
  3. Find Var(X).
  4. Find \(\displaystyle P(X\le 1)\).
Show the reasoning

(a)

\(\displaystyle k(\frac{6^{2}}{2}+ \frac{6^{2}}{2})= 1\implies k= \frac{1}{36}\)

Answer: \(\displaystyle \frac{1}{36}\).

(b)

\(E(X)=6\) by symmetry about the centre of the support.

Answer: \(6\).

(c)

\(\int(x-E(X))^2f(x)\,dx=6\)

Answer: \(6\).

(d)

\(\displaystyle \int_{0}^{1} \frac{x}{36}\, dx= \frac{1}{72}\)

Answer: \(\displaystyle \frac{1}{72}\).

Example 3 · Piecewise densities and cumulative functions

The density is \(f(x)=kx\ (0\le x\le 7),\quad f(x)=k(14-x)\ (7<x\le 14)\), and zero elsewhere.

Diagram for this worked example
Use the labelled scales alongside the numerical method.
  1. Find k.
  2. Find E(X).
  3. Find Var(X).
  4. Find \(\displaystyle P(X\le 1)\).
Show the reasoning

(a)

\(\displaystyle k(\frac{7^{2}}{2}+ \frac{7^{2}}{2})= 1\implies k= \frac{1}{49}\)

Answer: \(\displaystyle \frac{1}{49}\).

(b)

\(E(X)=7\) by symmetry about the centre of the support.

Answer: \(7\).

(c)

\(\displaystyle \int(x-E(X))^2f(x)\,dx=\frac{49}{6}\)

Answer: \(\displaystyle \frac{49}{6}\).

(d)

\(\displaystyle \int_{0}^{1} \frac{x}{49}\, dx= \frac{1}{98}\)

Answer: \(\displaystyle \frac{1}{98}\).

Common mistakes

Practise with answer checking

Original exam-style problems

Write complete solutions before opening the worked solution. The marking guidance rewards reasoning as well as answers.

Examination practice · 2020–2026

Apply the method to recent source-labelled questions from this chapter.

Browse recent examination questions · All topic resources and the full bank

Next skill: Sampling and unbiased estimation →