Probability density functions
Continuous random variables, probability density functions and their two conditions, probabilities as integrals, the cumulative distribution function and its relationship with the PDF, uniform distributions, piecewise PDFs, the median, and PDFs over unbounded domains.
Heights, times and masses can take any value in a range. The chance of a height being exactly $172.000\ldots$ cm is zero, so we can't list probabilities value by value the way we did in chapter 9. Instead, as 10A suggested, probability becomes the area under a curve, and integration is how we find it.
Probability density functions
The two conditions match the two in chapter 9: no negative probability, and a total of $1$. Because a single point has no width, it has no area, so $P(X = a) = 0$. That means $P(X \lt b)$ and $P(X \le b)$ are the same for a continuous variable.
The PDF f(x) = 0.75x(2 − x) on 0 ≤ x ≤ 2. The shaded area is P(X ≤ b).
Set $b = 1$. Explain why the area must be exactly $0.5$ without integrating. Then find the value of b that makes the area $0.25$: that is the lower quartile.
$f(x) = k(4 - x^2)$ for $0 \le x \le 2$, and $0$ elsewhere. Find $k$, then $P(X \le 1)$.
The cumulative distribution function
The CDF is the area to the left of $x$. By the fundamental theorem of calculus, differentiating it gives back the PDF. Once you have $F$, every probability is a subtraction: $P(a \le X \le b) = F(b) - F(a)$.
$f(x) = \dfrac{x}{8}$ for $0 \le x \le 4$, and $0$ elsewhere. Find the CDF, the median, the quartiles and the mode.
$F(x) = \dfrac{x^3}{27}$ for $0 \le x \le 3$. Find the PDF.
Uniform distributions
A uniform distribution on $a \le x \le b$ has a constant PDF. The graph is a rectangle with base $b - a$, and its area must be $1$, so its height is $\dfrac{1}{b - a}$. Probabilities are rectangle areas.
A computer picks a random real number $X$ uniformly between $2$ and $10$. Find $P(X \gt 7)$.
Piecewise and unbounded PDFs
A PDF can be defined in pieces. Integrate each piece over its own interval, and add. Often a sketch shows the area is a triangle, which is quicker.
$f(x) = x$ for $0 \le x \le 1$, $f(x) = 2 - x$ for $1 \le x \le 2$, and $0$ elsewhere. Find $P(X \le 1.5)$.
A PDF can also live on an unbounded domain such as $x \ge 0$. Then the total area is an improper integral: integrate up to $N$ and let $N \to \infty$.
Show that $f(x) = 2e^{-2x}$ for $x \ge 0$ (and $0$ for $x \lt 0$) is a PDF, and find $P(X \gt 1)$.
Your turn
$f(x) = 3x^2$ for $0 \le x \le 1$. Find the median, correct to two decimal places.
Show the working
$F(x) = x^3$ on $0 \le x \le 1$. Solve $m^3 = 0.5$: $m = \sqrt[3]{0.5} \approx 0.79$.
Which could be a PDF on $0 \le x \le 1$ (and $0$ elsewhere)?
$\displaystyle\int_0^1 2x\,dx = 1$ and $2x \ge 0$ there. $x$ and $3x$ give areas $\tfrac12$ and $\tfrac32$, and $1 - 2x$ goes negative.
$f(x) = kx$ for $0 \le x \le 4$, and $0$ elsewhere. Find $k$.
$\displaystyle\int_0^4 kx\,dx = k\Big[\tfrac{x^2}{2}\Big]_0^4 = 8k = 1$, so $k = 0.125$.
$f(x) = 3x^2$ for $0 \le x \le 1$. Find $P(X \le 0.5)$.
$\Big[x^3\Big]_0^{0.5} = 0.125$.
$X$ is uniform on $0 \le x \le 20$. Find $P(5 \le X \le 9)$.
Height $\tfrac{1}{20}$, width $4$: probability $\tfrac{4}{20} = 0.2$.
$X$ is a continuous random variable. Find $P(X = 2)$.
A single point has no width, so no area: the probability is $0$.
$X$ has CDF $F(x) = \dfrac{x^2}{16}$ for $0 \le x \le 4$. Find $P(1 \le X \le 3)$.
$F(3) - F(1) = \tfrac{9}{16} - \tfrac{1}{16} = \tfrac{8}{16} = 0.5$.
$F(x) = \dfrac{x^3}{8}$ for $0 \le x \le 2$. The PDF is:
$f(x) = F'(x) = \dfrac{3x^2}{8}$. Check: $\displaystyle\int_0^2 \frac{3x^2}{8}\,dx = \frac{8}{8} = 1$.
$f(x) = \dfrac{x}{8}$ for $0 \le x \le 4$. Find the median, correct to two decimal places.
$F(x) = \dfrac{x^2}{16}$. Solve $\dfrac{m^2}{16} = 0.5$: $m^2 = 8$, so $m = 2\sqrt2 \approx 2.83$.
Exam style: $f(x) = ke^{-0.5x}$ for $x \ge 0$, and $0$ elsewhere, is a PDF. Find $k$, then find $P(X \gt 2)$ correct to two decimal places.
$\displaystyle\int_0^N ke^{-0.5x}\,dx = 2k\left(1 - e^{-0.5N}\right) \to 2k$, so $2k = 1$ and $k = 0.5$. Then $P(X \gt 2) = \displaystyle\lim_{N \to \infty}\Big[-e^{-0.5x}\Big]_2^N = e^{-1} \approx 0.37$.
Exam style: $f(x) = kx$ for $0 \le x \le 2$, $f(x) = k(4 - x)$ for $2 \le x \le 4$, and $0$ elsewhere. Find $k$, then $P(1 \le X \le 3)$.
The graph is a triangle with base $4$ and height $2k$, so $4k = 1$ and $k = 0.25$. The two tails are small triangles: $P(X \lt 1) = \tfrac12 \times 1 \times 0.25 = 0.125$, and $P(X \gt 3) = 0.125$ by symmetry. So $P(1 \le X \le 3) = 1 - 0.25 = 0.75$.
Coaching Centre