10B

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.

Probability density functions

For a continuous random variable, $P(X = a) = 0$ for any single value, so it makes no difference whether the inequalities are strict.

Probability is area

The PDF f(x) = 0.75x(2 − x) on 0 ≤ x ≤ 2. The shaded area is the probability that X is at most b.

Try this

Why is the area exactly $0.5$ when $b = 1$?

Example 1●●

$f(x) = kx^2$ for $0 \le x \le 3$, and $0$ elsewhere. Find $k$, then $P(X \le 1)$.

$\displaystyle\int_0^3 kx^2\,dx = 9k = 1$, so $k = \tfrac19$.
$P(X \le 1) = \displaystyle\int_0^1 \tfrac19 x^2\,dx = \tfrac{1}{27}$.

The cumulative distribution function

PDF and CDF
$$F(x) = P(X \le x) = \int_{-\infty}^{x} f(t)\,dt \qquad F'(x) = f(x)$$

$F$ rises from $0$ to $1$. Then $P(a \le X \le b) = F(b) - F(a)$, and the median $m$ solves $F(m) = \tfrac12$.

Example 2●●

For the PDF in Example 1, find the CDF and the median.

For $0 \le x \le 3$: $F(x) = \displaystyle\int_0^x \tfrac19 t^2\,dt = \dfrac{x^3}{27}$. Also $F(x) = 0$ for $x \lt 0$ and $F(x) = 1$ for $x \gt 3$.
$\dfrac{m^3}{27} = \dfrac12$, so $m = \dfrac{3}{\sqrt[3]{2}} \approx 2.38$.

Uniform distributions

A uniform distribution on $a \le x \le b$ has a constant PDF $f(x) = \dfrac{1}{b - a}$. Its graph is a rectangle of area $1$, and probabilities are just rectangle areas.

Example 3●

A bus arrives at a uniformly random time in a $20$-minute window. Find the probability of waiting more than $15$ minutes.

$f(x) = \tfrac{1}{20}$ on $0 \le x \le 20$, so $P(X \gt 15) = 5 \times \tfrac{1}{20} = \tfrac14$.

Piecewise and unbounded PDFs

A PDF can be defined in pieces: integrate each piece over its own interval and add. A PDF can also be defined on an unbounded domain such as $x \ge 0$. Then the total area is an improper integral, found with a limit.

Example 4: an unbounded domain●●●

Show that $f(x) = e^{-x}$ for $x \ge 0$ (and $0$ for $x \lt 0$) is a PDF.

$f(x) \gt 0$ for all $x \ge 0$.
$\displaystyle\int_0^N e^{-x}\,dx = 1 - e^{-N}$, and this tends to $1$ as $N \to \infty$. So the total area is $1$.
Flashcards
Two conditions for a PDF
$f(x) \ge 0$ everywhere, and the total area is $1$.
$P(a le X le b)$
$\displaystyle\int_a^b f(x)\,dx = F(b) - F(a)$
Median
Solve $F(m) = \tfrac12$.
Uniform PDF on $a le x le b$
$f(x) = \dfrac{1}{b - a}$
Practice
  1. $f(x) = kx^2$ for $0 \le x \le 3$ is a PDF. Find $k$.

  2. For that PDF, find $P(X \le 1)$.

  3. For that PDF, find $P(1 \le X \le 2)$.

  4. A bus arrives at a uniformly random time in a $20$-minute window. Find the probability of waiting more than $15$ minutes.

  5. $f(x) = 2x$ on $0 \le x \le 1$. Find the median, correct to $2$ decimal places.

  6. $X$ is continuous. Find $P(X = 1.5)$.

  7. $F(x)$ is the CDF of $X$. The PDF is:

  8. Which is a PDF on $0 \le x \le 2$ (and $0$ elsewhere)?

  9. To find the total area for a PDF on $x \ge 0$, you use:

More questions

New numbers every time. Keep going until you get five in a row.

Formula sheet