M
hscscience Maths Adv · Y12
0/100daily goal
0
0
0 due
0
L1 · 0 XP
KJ
Your weak spots
Insights load after your first practice round.
MAV-12-07 · Continuous random variables ~45 min ⚡ +95 XP available

Probability Density Functions

Differentiate the cumulative distribution function and the shape of the distribution appears. Probability becomes area, the total area is 1, and integration replaces the summation you used in the discrete case. This is the central machinery of the continuous half of the course.

Today's hook, A density function can take the value $f(2) = 3$. Three what? It is not a probability — probabilities never exceed 1. Understanding what a density actually measures is the difference between using these formulas and understanding them.
0/5QUESTS
1

Orient to density

Commit to a prediction about what a density value means.

01
Recall, your gut answer first
+5 XP warm-up

A probability density function satisfies $f(2) = 3$. Without looking ahead answer both: does this break the rule that probabilities cannot exceed 1, and what quantity would you have to compute before you had a probability at all?

auto-saved
2

Define the density

Define the PDF as the derivative of the CDF and list its properties.

02
f(x) = F′(x)
core concept

We just saw that the CDF answers every interval question by one subtraction. That raises a question: the CDF tells you nothing directly about where values bunch up, so how do we recover the shape? This card answers it → differentiate. The rate at which $F$ climbs at $x$ is exactly how densely probability is packed near $x$.

$$f(x) = F'(x) = \frac{d}{dx}\,P(X \leq x)$$

A density is not a probability. It is probability per unit of $x$, exactly as a physical density is mass per unit volume. That is why $f(2) = 3$ is perfectly legal: three units of probability per unit of $x$, in a region so narrow that the total stays below 1.

Where $F$ rises steeply, $f$ is large and values are common. Where $F$ is nearly flat, $f$ is near zero and values are rare. The histogram from the previous lesson was a blocky picture of $f$ all along: bar heights were relative frequency per class, which is density.

The two properties. A function $f$ is a probability density function exactly when:

$$f(x) \geq 0 \ \text{ for all } x, \qquad \int_{a}^{b} f(x)\,dx = 1$$

where $[a, b]$ is the domain of $f$; if $X$ can take any real value the second condition reads $\displaystyle\int_{-\infty}^{\infty} f(x)\,dx = 1$. The first holds because $F$ is non-decreasing, so its derivative cannot be negative. The second holds because the total probability is 1.

$f(x) = F'(x)$, and $f$ is a density (probability per unit of $x$), NOT a probability, so $f(x) > 1$ is allowed.; Valid exactly when $f(x) \geq 0$ everywhere AND $\int f(x)\,dx = 1$ over the domain.

Pause, copy $f(x) = F'(x)$, the two validity conditions $f \geq 0$ and $\int f = 1$, and the warning that a density may exceed 1, into your book.

True or false: A probability density function can never take a value greater than 1.

3

Probability is area

Compute interval probabilities and find unknown constants.

03
Interval probability by integration
core concept

We just saw that $f$ measures probability per unit of $x$. That raises a question: if the height is not a probability, what is? This card answers it → the area. Integrating the density across an interval accumulates the probability in it.

$$P(c < X < d) = \int_{c}^{d} f(x)\,dx$$

Because point probabilities are zero, this same integral gives $P(c \leq X \leq d)$ and the two mixed forms. And setting $c$ and $d$ to the ends of the domain returns the total, which must be 1 — the second validity condition is just this rule applied to everything.

Finding an unknown constant. This is the most common opening part of an exam question. Suppose $f(x) = kx^2$ on $0 \leq x \leq 3$, and zero elsewhere. Impose $\int f = 1$:

$\displaystyle\int_{0}^{3} kx^2\,dx = k\left[\frac{x^3}{3}\right]_{0}^{3} = k\left(\frac{27}{3} - 0\right) = 9k$

Setting $9k = 1$ gives $k = \dfrac{1}{9}$.

Now any probability follows. For instance

$P(1 < X < 2) = \displaystyle\int_{1}^{2} \frac{x^2}{9}\,dx = \frac{1}{9}\left[\frac{x^3}{3}\right]_{1}^{2} = \frac{1}{27}\left(8 - 1\right) = \frac{7}{27}$

Check the sign, always. If your $k$ comes out negative, $f$ would be negative somewhere and cannot be a density. A negative constant is a signal that a limit of integration has been swapped, not a valid answer.

$P(c < X < d) = \int_c^d f(x)\,dx$: probability is AREA under the density.; To find an unknown constant, impose $\int f = 1$ over the whole domain and solve.

Pause, copy the rule that probability is the area $\int_c^d f(x)\,dx$, and the method of finding an unknown constant by imposing $\int f = 1$, into your book.

Fill the blanks: $f(x) = kx$ on $0 \leq x \leq 4$, and zero elsewhere. Give each answer as a decimal.
$k =$
$P(X < 2) =$
$P(X > 3) =$

4

Convert between f and F

Move between the density and the cumulative function in both directions.

04
From f to F, and from F back to f
core concept

We just saw probability computed as area under $f$. That raises a question: exam questions hand you sometimes the density and sometimes the cumulative function, so how do you get from either one to the other? This card answers it → they are an integral–derivative pair, so one differentiation or one definite integral moves you across.

$$F(x) = \int_{a}^{x} f(t)\,dt \qquad \Longleftrightarrow \qquad f(x) = F'(x)$$

The left-hand rule builds $F$ by accumulating density from the lower end $a$ of the domain up to $x$. Note the dummy variable $t$ inside: the upper limit is $x$, so $x$ cannot also be the variable of integration.

Density to cumulative. Take $f(x) = \dfrac{x}{8}$ on $0 \leq x \leq 4$. First confirm it is a density: $\displaystyle\int_0^4 \frac{x}{8}\,dx = \frac{1}{16}\left[x^2\right]_0^4 = \frac{16}{16} = 1$ ✓ and $f \geq 0$ on $[0,4]$ ✓. Then

$F(x) = \displaystyle\int_{0}^{x} \frac{t}{8}\,dt = \frac{1}{16}\left[t^2\right]_{0}^{x} = \frac{x^2}{16}$ for $0 \leq x \leq 4$.

Check the endpoints: $F(0) = 0$ ✓ and $F(4) = \dfrac{16}{16} = 1$ ✓. Outside the interval, $F = 0$ below 0 and $F = 1$ above 4.

Cumulative to density. Reverse it. Given $F(x) = \dfrac{x^2}{16}$ on $[0, 4]$, differentiate: $f(x) = F'(x) = \dfrac{2x}{16} = \dfrac{x}{8}$, recovering the original density.

Which piece do you differentiate? Only the non-constant one. On the flat pieces $F = 0$ and $F = 1$, the derivative is 0, which correctly says the density is zero outside the domain. Writing $f$ without stating "and 0 elsewhere" loses that half of the answer.

$F(x) = \int_a^x f(t)\,dt$ and $f(x) = F'(x)$, an integral–derivative pair.; Always state the density as 0 outside the domain, and check $F(a) = 0$, $F(b) = 1$.

Pause, copy the two conversion rules $F(x) = \int_a^x f(t)\,dt$ and $f(x) = F'(x)$, together with the endpoint checks $F(a) = 0$ and $F(b) = 1$, into your book.

Quick check: A continuous variable has $F(x) = \dfrac{x^3}{27}$ on $0 \leq x \leq 3$. What is its probability density function on that interval?

5

Uniform density and the mode

Meet the continuous uniform distribution and locate the mode.

05
The continuous uniform distribution
core concept

We just saw how to move between $f$ and $F$. That raises a question: what does the continuous version of "all outcomes equally likely" look like? This card answers it → a flat density across the interval, whose height is forced by the requirement that the area be 1.

If $X$ is equally likely to fall anywhere in $[a, b]$, then $f$ must be constant there, say $f(x) = c$. The area is a rectangle of width $b - a$ and height $c$, so $c(b - a) = 1$ and the height is fixed:

$$f(x) = \frac{1}{b - a} \ \text{ for } a \leq x \leq b, \qquad f(x) = 0 \ \text{ otherwise}$$

Integrating gives the cumulative function, which is a straight line:

$$F(x) = \int_{a}^{x} \frac{1}{b-a}\,dt = \frac{x - a}{b - a} \ \text{ for } a \leq x \leq b$$

Example. A bus arrives at a time $T$ uniformly distributed over the next 10 minutes. Then $f(t) = \dfrac{1}{10}$ on $[0, 10]$ and $F(t) = \dfrac{t}{10}$. So $P(T < 4) = 0.4$ and $P(3 < T < 7) = \dfrac{7 - 3}{10} = 0.4$ — for a uniform variable, probability is simply the fraction of the interval covered.

The exact parallel with the discrete case. Discrete uniform: $n$ values, each of probability $\tfrac{1}{n}$. Continuous uniform: an interval of length $b - a$, with density $\tfrac{1}{b-a}$. In both, the constant is forced by total probability 1, not chosen.

Continuous uniform on $[a,b]$: $f(x) = \dfrac{1}{b-a}$ and $F(x) = \dfrac{x-a}{b-a}$.; For a uniform variable, an interval's probability is just its length divided by $b - a$.

Pause, copy the continuous uniform density $f(x) = 1/(b-a)$ and its cumulative function $F(x) = (x-a)/(b-a)$, into your book.

06
Finding the mode from a density
core concept

The mode is the most likely region of the distribution, and on a density graph that is simply where the curve is highest. So finding the mode is an ordinary maximisation problem on $f$:

  1. Differentiate: solve $f'(x) = 0$ for stationary points inside the domain.
  2. Confirm it is a maximum, by the sign of $f'$ or by $f''$.
  3. Check the endpoints. If $f$ has no interior maximum, the greatest value sits at an end of the domain, and that endpoint is the mode.

Example with an interior mode. $f(x) = \dfrac{3}{4}\left(2x - x^2\right)$ on $0 \leq x \leq 2$. Then $f'(x) = \dfrac{3}{4}(2 - 2x)$, which is zero at $x = 1$. Since $f'' = -\dfrac{3}{2} < 0$, that is a maximum, so the mode is $x = 1$.

Example with the mode at an endpoint. $f(x) = \dfrac{x}{8}$ on $[0, 4]$ is increasing throughout, with $f' = \dfrac{1}{8} \neq 0$ anywhere. There is no interior stationary point, so the density is greatest at the right-hand end and the mode is $x = 4$.

A uniform density is the extreme case: it is flat, so every point is a maximum and the distribution has no unique mode.

Odd one out: Three of these are true of every probability density function. Which one is not?

6

Work the examples

Work three examples, then read the traps.

07
Worked examples
worked
PROBLEM 1 · FIND k, THEN A PROBABILITY

$f(x) = k(4 - x)$ for $0 \leq x \leq 4$, and zero elsewhere. Find $k$, then $P(X < 1)$.

1
$\displaystyle\int_{0}^{4} k(4 - x)\,dx = 1$
Impose the total-area condition. This is always the first move when a constant is unknown.
PROBLEM 2 · BUILD THE CDF

For that same density $f(x) = \dfrac{4 - x}{8}$ on $[0, 4]$, find $F(x)$ and use it to check the answer to $P(X < 1)$.

1
$F(x) = \displaystyle\int_{0}^{x} \frac{4 - t}{8}\,dt$
Accumulate from the lower end of the domain. Use a dummy variable $t$, because $x$ is the upper limit.
PROBLEM 3 · CDF TO PDF, AND THE MODE

A variable has $F(x) = \dfrac{x^2(3 - x)}{4}$ for $0 \leq x \leq 2$. Find its density and its mode.

1
$F(x) = \dfrac{3x^2 - x^3}{4}, \quad F(0) = 0, \quad F(2) = \dfrac{12 - 8}{4} = 1$
Expand first, and check the endpoints before differentiating. Both pass, so this is a legitimate CDF.
08
Where these marks are lost
exam technique
Trap 01
Reading a density as a probability
$f(2) = 3$ does not mean $P(X = 2) = 3$, and it does not make $f$ invalid. Only the area is a probability, and only the area is capped at 1.
Trap 02
Maximising F instead of f to find the mode
$F$ is non-decreasing, so its maximum is always the right-hand endpoint, whatever the distribution. The mode is where the density peaks, so differentiate $f$.
Trap 03
Dropping "and zero elsewhere"
A density is defined on all of $\mathbb{R}$. Giving only the formula on $[a,b]$ leaves the answer incomplete, and the same omission makes $F$ wrong outside the interval.
Trap 04
Reusing x as the variable of integration
In $F(x) = \int_a^x f(t)\,dt$ the upper limit is $x$, so the integration variable must be something else. Writing $\int_a^x f(x)\,dx$ is meaningless and is penalised in a "show that" question.

Match each expression to what it produces:

  • $F'(x)$
  • $\int_{a}^{x} f(t)\,dt$
  • $\int_{c}^{d} f(x)\,dx$
  • $\dfrac{1}{b-a}$ on $[a,b]$
  • the probability of landing between $c$ and $d$
  • the probability density function
  • the continuous uniform density
  • the cumulative distribution function
7

Practise and reflect

Work the quick-fire set, then revisit your prediction.

09
Quick-fire set
practice
1

$f(x) = kx^3$ on $0 \leq x \leq 2$. Find $k$.

2

$X$ is uniform on $[2, 10]$. Write down $f(x)$ and $F(x)$, then find $P(4 < X < 7)$.

3

$F(x) = \dfrac{x^2}{25}$ on $0 \leq x \leq 5$. Find $f(x)$, stating it fully.

4

$f(x) = \dfrac{3}{4}(2x - x^2)$ on $[0, 2]$. Find the mode, showing that it is a maximum.

5

Explain why the uniform density on $[0, 0.5]$ takes the value 2, and why that does not violate any rule.

10
Revisit your thinking

Earlier you were asked whether $f(2) = 3$ breaks the rule that probabilities cannot exceed 1. It does not, because $f(2)$ is not a probability. It is a density: probability per unit of $x$, in the same sense that a metal's density is mass per unit volume. To get a probability you must multiply by a width, which for a curve means integrating: $P(1.9 < X < 2.1) = \int_{1.9}^{2.1} f(x)\,dx \approx 3 \times 0.2 = 0.6$, comfortably below 1. The uniform density on $[0, 0.5]$ makes the point most sharply, sitting at height 2 across an interval so short that the total area is still exactly 1.

auto-saved
11
Where this goes next

You can now compute any probability for a continuous variable. What is still missing is the pair of summary numbers you built in the discrete case: the expected value and the variance. Both carry over with the sum replaced by an integral, and alongside them the median and quartiles, which come straight out of the cumulative function. That is the next lesson.

Complete the short-answer practice

Apply the lesson methods, then compare each response with its comprehensive answer.

01
Focus-area checkpoint
checkpoint

Use the visible short-answer practice below during this lesson. After completing the focus area, use Checkpoint 3 for the checkpoint question bank.

02
Short answer
ApplyBand 43 marks

Q1. A continuous random variable has density $f(x) = k(9 - x^2)$ for $0 \leq x \leq 3$, and $f(x) = 0$ elsewhere.

(a) Show that $k = \dfrac{1}{18}$. (b) Find $P(X < 1)$. (c) Find the mode of the distribution, justifying your answer. (3 marks)

auto-saved
ApplyBand 53 marks

Q2. The time $T$ minutes a train waits at a platform is uniformly distributed on $1 \leq t \leq 5$.

(a) Write down the density $f(t)$ and derive the cumulative function $F(t)$ by integration. (b) Find $P(T > 3.5)$ and $P(2 \leq T \leq 4)$. (c) Explain why this distribution has no unique mode, and state what its cumulative graph looks like. (3 marks)

auto-saved
EvaluateBand 63 marks

Q3. A student is asked for the mode of a distribution with $F(x) = \dfrac{x^3}{8}$ on $0 \leq x \leq 2$. They differentiate to get $f(x) = \dfrac{3x^2}{8}$, then differentiate again, set $f'(x) = \dfrac{3x}{4} = 0$, obtain $x = 0$, and answer "the mode is 0".

(a) Identify the error in the student's reasoning. (b) Determine the correct mode, with justification. (c) State the general principle this case illustrates about finding modes from a density, and give a second density for which the same principle applies. (3 marks)

auto-saved
Comprehensive answers (click to reveal)

Drill 1: $\int_0^2 kx^3\,dx = k\left[\tfrac{x^4}{4}\right]_0^2 = k\left(\tfrac{16}{4}\right) = 4k$. Setting $4k = 1$ gives $k = \tfrac{1}{4}$.

Drill 2: $f(x) = \tfrac{1}{10 - 2} = \tfrac{1}{8}$ on $[2, 10]$ and 0 elsewhere. $F(x) = \tfrac{x - 2}{8}$ on $[2, 10]$. $P(4 < X < 7) = F(7) - F(4) = \tfrac{5}{8} - \tfrac{2}{8} = \tfrac{3}{8}$, which is also just the interval length 3 divided by 8.

Drill 3: $f(x) = F'(x) = \tfrac{2x}{25}$ for $0 \leq x \leq 5$, and $f(x) = 0$ elsewhere. The "and zero elsewhere" is part of the answer, not an optional extra.

Drill 4: $f'(x) = \tfrac{3}{4}(2 - 2x)$, which is 0 at $x = 1$. Then $f''(x) = -\tfrac{3}{2} < 0$, confirming a maximum, so the mode is $x = 1$. (The density is symmetric about $x = 1$, which is a useful sanity check.)

Drill 5: The area under a uniform density on $[0, 0.5]$ is height $\times$ width $= c \times 0.5$, and this must equal 1, so $c = 2$. No rule is broken because $f$ is a density, not a probability: what is capped at 1 is the total area, and here that area is exactly $2 \times 0.5 = 1$.

Q1 (3 marks): (a) $\int_0^3 k(9 - x^2)\,dx = k\left[9x - \tfrac{x^3}{3}\right]_0^3 = k(27 - 9) = 18k$. Setting $18k = 1$ gives $k = \tfrac{1}{18}$ ✓ [1]. (b) $P(X < 1) = \int_0^1 \tfrac{9 - x^2}{18}\,dx = \tfrac{1}{18}\left[9x - \tfrac{x^3}{3}\right]_0^1 = \tfrac{1}{18}\left(9 - \tfrac{1}{3}\right) = \tfrac{1}{18} \cdot \tfrac{26}{3} = \tfrac{26}{54} = \tfrac{13}{27}$ [1]. (c) $f'(x) = -\tfrac{2x}{18} = -\tfrac{x}{9}$, which is negative for every $x > 0$, so $f$ is strictly decreasing on $(0, 3]$ and has no interior maximum. The greatest value of $f$ is therefore at the left endpoint, so the mode is $x = 0$, where $f(0) = \tfrac{1}{2}$ [1].

Q2 (3 marks): (a) $f(t) = \tfrac{1}{5 - 1} = \tfrac{1}{4}$ for $1 \leq t \leq 5$, and 0 elsewhere. Then $F(t) = \int_1^t \tfrac{1}{4}\,du = \tfrac{1}{4}\left[u\right]_1^t = \tfrac{t - 1}{4}$ for $1 \leq t \leq 5$, with $F = 0$ below 1 and $F = 1$ above 5. Check: $F(1) = 0$ ✓, $F(5) = 1$ ✓ [1]. (b) $P(T > 3.5) = 1 - F(3.5) = 1 - \tfrac{2.5}{4} = 0.375$. $P(2 \leq T \leq 4) = F(4) - F(2) = \tfrac{3}{4} - \tfrac{1}{4} = 0.5$ [1]. (c) The density is constant at $\tfrac{1}{4}$ across the whole interval, so no value of $t$ is more likely than any other and every point is simultaneously a maximum — the distribution has no unique mode. The cumulative graph is a straight line of gradient $\tfrac{1}{4}$ from $(1, 0)$ to $(5, 1)$, flat at 0 before and flat at 1 after [1].

Q3 (3 marks): (a) The student solved $f'(x) = 0$ and stopped. A stationary point of $f$ need not be a maximum, and here $x = 0$ is a minimum of the density: $f(0) = 0$, the smallest value $f$ takes. They also failed to check the endpoints of the domain [1]. (b) $f'(x) = \tfrac{3x}{4} > 0$ for every $x$ in $(0, 2]$, so $f$ is strictly increasing across the whole domain and its greatest value is at the right endpoint. The mode is $x = 2$, where $f(2) = \tfrac{12}{8} = 1.5$. (Note in passing that $f(2) > 1$, which is fine for a density.) [1]. (c) The principle: a mode is the global maximum of the density over its domain, so the endpoints must always be checked, and a density with no interior maximum has its mode at an endpoint. Solving $f'(x) = 0$ alone is not sufficient and can return a minimum. A second example is the density $f(x) = \tfrac{x}{8}$ on $[0, 4]$: $f'$ is the constant $\tfrac{1}{8}$, never zero, so there is no stationary point at all and the mode is the endpoint $x = 4$ [1].

Review and complete

Retrieve the central ideas, then mark the lesson complete or continue to the module quiz.

01
Retrieve the lesson before you leave
  1. State the two conditions a function must satisfy to be a probability density function, and explain why neither caps the height at 1.
  2. Write both conversion rules between $f$ and $F$ from memory, and say which variable goes where in the integral.
  3. Give the continuous uniform density and cumulative function on $[a, b]$, and say why the distribution has no unique mode.

Answer from memory first, then return to the matching Learn checkpoint to check and correct your response.

01
Take the full module quiz
quiz

A full module quiz covering every lesson in this module, not just this one. Set aside a decent block of time and treat it like a real assessment.

Start the module quiz →

Mark lesson as complete

Tick when you've finished the practice and review.