Cumulative distribution functions
In Year 12 Mathematical Methods (Queensland, QCAA), the cumulative distribution function of a continuous random variable is \(F(x)=P(X\le x)=\int_{\text{lower}}^{x} f(t)\,dt\). It is non-decreasing, equals \(0\) below the support and \(1\) above it. The density is recovered by \(f(x)=F'(x)\); a probability is \(P(a
The cumulative distribution function (cdf) of a continuous random variable \(X\) is \(F(x)=P(X\le x)\): the probability that \(X\) is at most \(x\). It is the running total of probability, so it equals the area under the density up to \(x\), \(F(x)=\int_{\text{lower}}^{x} f(t)\,dt\).
Every cdf has the same shape of behaviour: it is non-decreasing (probability only ever accumulates), continuous for a continuous variable, equals \(0\) below the support and rises to \(1\) above it, and always lies between \(0\) and \(1\). A valid cdf is therefore an increasing ramp from \(0\) up to \(1\).
Because integrating the density gives \(F\), differentiating the cdf recovers the density: \(f(x)=F'(x)\). Probabilities come straight from \(F\): \(P(a
Definition of the cumulative distribution function:
Properties (a valid cdf rises from \(0\) to \(1\)):
Recover the density, and read probabilities, from \(F\):
How to work with a cumulative distribution function
- Build \(F\) from the density. Integrate from the lower end of the support up to \(x\): \(F(x)=\int_{\text{lower}}^{x} f(t)\,dt\). Below the support \(F=0\); above it \(F=1\). Write \(F\) as a piecewise function of three pieces.
- Recover the density. Differentiate: \(f(x)=F'(x)\) on the support.
- Read a probability. \(P(X\le b)=F(b)\), \(P(a
a)=1-F(a)\). Endpoints do not matter, so \(\le\) and \(<\) agree. - Find the median or quartiles. Solve \(F(x)=0.5\) (median), \(F(x)=0.25\) (\(Q_1\)) or \(F(x)=0.75\) (\(Q_3\)), keeping the solution inside the support.
Integrate from \(0\) up to \(x\).
| \(F(x)\) | \(=\) | \(\displaystyle\int_0^x \dfrac{t}{8}\,dt=\Big[\dfrac{t^2}{16}\Big]_0^x=\dfrac{x^2}{16}\) |
| \(F(4)\) | \(=\) | \(\dfrac{16}{16}=1\ \checkmark\) |
So \(F(x)=\dfrac{x^2}{16}\) on \([0,4]\).
Differentiate the cumulative function.
| \(f(x)\) | \(=\) | \(F'(x)=\dfrac{d}{dx}\Big(\dfrac{x^3}{64}\Big)\) |
| \(=\) | \(\dfrac{3x^2}{64}\) |
So \(f(x)=\dfrac{3x^2}{64}\) on \([0,4]\).
Upper value minus lower value.
\(P(1| \(=\) | \(F(3)-F(1)\) | |
| \(=\) | \(\dfrac{9}{25}-\dfrac{1}{25}=\dfrac{8}{25}\) |
So \(P(1
Half the probability lies below the median.
| \(F(m)\) | \(=\) | \(\dfrac{m^2}{4}=\dfrac{1}{2}\) |
| \(m^2\) | \(=\) | \(2\) |
| \(m\) | \(=\) | \(\sqrt{2}\approx 1.41\) |
So the median is \(m=\sqrt{2}\approx 1.41\).
Common pitfalls
Frequently asked questions
What is the cumulative distribution function?
\(F(x)=P(X\le x)\), the probability that \(X\) is at most \(x\); for a continuous variable it equals \(\int_{\text{lower}}^{x} f(t)\,dt\).
What are the properties of a cdf?
\(F\) is non-decreasing and continuous, equals \(0\) below the support and \(1\) above it, and always lies between \(0\) and \(1\).
How do you build F from a density?
Integrate the density from the lower end of the support up to \(x\). Below the support \(F=0\) and above it \(F=1\), so \(F\) is a piecewise function.
How do you get the density back from F?
Differentiate: \(f(x)=F'(x)\) on the support.
How do you find P(a < X ≤ b) from F?
\(P(a
How do you find the median from F?
Solve \(F(m)=0.5\), keeping \(m\) inside the support; use \(0.25\) and \(0.75\) for the quartiles.