Back to the on-screen lesson ·

Continuous variables and densities

Probability as an area under a curve, finding the constant that makes the area one, and why a single value carries no probability.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

You will check that a function is a density, find the constant that makes its total area one, integrate it to get the cumulative function, and read probabilities off as areas or as differences of that function. You will also say why a density may exceed one and why every single value has probability zero.

2. Where the mass function runs out

A mass function puts a lump on each value. A variable that can take any value in an interval has too many values for lumps: give each a positive probability and the total is infinite. Lesson five already solved this once, with length standing in for probability. A density is that idea, allowed to vary.

3. Words for this lesson

A variable is continuous when it can take any value in an interval. Its density $f$ is a function whose area over a set is that set's probability. Normalising means choosing the constant that makes the total area one. The support is the set where the density is positive; outside it the density is zero and nothing accumulates.

4. Probability is the area, not the height

A variable $X$ is continuous with density $f$ when

$$P(a \le X \le b) = \int_{a}^{b} f(x)\,dx$$ for every $a$ and $b$. The density must satisfy $f(x) \ge 0$ everywhere and $\int_{-\infty}^{\infty} f(x)\,dx = 1$; those two conditions are the axioms in their continuous form, and any $f$ meeting them is a density.

The cumulative function ties the two lessons together: $F(x) = \int_{-\infty}^{x} f(t)\,dt$, so $f = F'$ wherever $F$ is differentiable, and $P(a \le X \le b) = F(b) - F(a)$ exactly as before. What has changed is that $F$ is now continuous rather than a staircase, because there are no lumps to jump over.

Two consequences overturn the discrete intuition and are worth meeting head on. $P(X = x) = 0$ for every single value, since the area over a point is zero — and the variable still takes one of them. And $f(x)$ may exceed 1, because it is a rate of probability per unit of $x$ rather than a probability: a uniform density on an interval of width $\tfrac{1}{10}$ stands ten units tall. Only areas are probabilities, and only areas are capped at one.

It follows that $\le$ and $<$ make no difference for a continuous variable, which is the one simplification the change of setting hands you.

Another way: picture

A curve over the axis, with the region beneath it shaded. The total shaded area is one. The probability that $X$ lands between two points is the shaded area between them — a strip of zero width has no area, however tall the curve is where it stands.

Another way: steps

  1. Check $f \ge 0$ and that the total area is $1$; solve for any constant that makes it so.
  2. Integrate $f$ once to get $F$, and keep it.
  3. Any probability is then $F$ at one end minus $F$ at the other.
  4. Remember where $f$ is zero: outside that interval no probability accumulates.

5. The same variable, three ways

A variable with density $f(x) = x/50$ on $[0, 10]$.

ObjectFormulaAt $x = 6$
Density$f(x) = x/50$$0.12$
Cumulative function$F(x) = x^{2}/100$$0.36$
A probability$P(4 \le X \le 6) = F(6) - F(4)$$0.36 - 0.16 = 0.2$

The first row is not a probability of anything; the second and third are. The density rises across the interval, which says the variable is more likely to land near $10$ than near $0$ — a statement about comparative rates, which is all a density ever asserts.

6. Where this goes wrong

Reading $f(x)$ as $P(X = x)$. It is the commonest error of the lesson, and the density exceeding one is the clearest proof it cannot be right.

Thinking probability zero means impossible. Every single value has probability zero, and one of them happens. The right reading is carries no area.

Forgetting where the density is zero. The formula given usually holds only on an interval, and integrating it outside that interval invents probability that is not there.

Fussing over $\le$ against $<$. For a continuous variable they agree. Carrying the discrete habit of worrying about it wastes attention that the limits of integration deserve.

7. Finding the constant first

  1. $f(x) = c(1 - x)$ on $[0, 1]$, zero elsewhere. Find $c$.

    Nothing can be computed until the area is one.

  2. $\int_{0}^{1} c(1-x)\,dx = c/2 = 1$, so $c = 2$.

    Set the total to one and solve.

  3. Then $P(X \le 1/2) = \int_{0}^{1/2} 2(1-x)\,dx = 3/4$.

    The density is twice as tall at $0$ as at $1/2$.

8. The height is not the probability

  1. A variable uniform on $[0, 0.2]$ has density $5$ on that interval.

    Width $0.2$, area $1$.

  2. $P(X \le 0.1) = 0.1 \times 5 = 0.5$.

    Area, not height.

  3. $P(X = 0.1) = 0$, even though the density there is $5$.

    A point has no width.

9. Your turn: $f(x) = 3x^{2}$ on $[0, 1]$, zero elsewhere; find $P(X \le 0.5)$

  1. Check first: $\int_{0}^{1} 3x^{2}\,dx = 1$, so it is a density.

    Always worth one line.

  2. $F(x) = x^{3}$ on the interval.

    Integrate once and keep it.

  3. Your turn: work this step out. Its working is at the end of the packet.

    So $P(X \le 0.5) = 0.5^{3} = 0.125$.

10. Guided practice

A variable has density $f(x) = x/50$ on the interval from $0$ to $10$, and zero elsewhere. Give the three probabilities.

Probability
$P(X \le 3)$
$P(3 < X \le 6)$
$P(X > 6)$

11. Guided practice

The same density $f(x) = x/50$ on $[0, 10]$. What is $P(3 \le X \le 8)$?

Answer:

12. Practice

For the density $f(x) = x/50$ on $[0, 10]$, zero elsewhere, give the set of $x$ at which $f(x) \ge 7/50$, as an interval.

This task has no paper form; do it on a device.

13. Practice

A density has the form $f(x) = c\,x$ on the interval from $0$ to $8$, and is zero elsewhere. Give $c$, and then $P(X \le 8 / 2)$.

$c$ is p and $P(X \le 8/2)$ is q.

14. Somewhere new

A variable is uniform on the interval from $0$ to $\tfrac{1}{5}$, so its density is $5$ everywhere on that interval. Which statement is correct?

15. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

16. Test question

A variable is uniform on the interval from $2$ to $6$. Give the left endpoint of its density and the height of the rectangle.

A rectangle standing on the interval

Left endpoint:

Height of the rectangle:

17. What you can do now

You can normalise a density, integrate it to a cumulative function, and compute the probability of an interval. Say in your own words why the height of a density is not a probability, and what is.

Working for the steps left to you

9. Your turn: $f(x) = 3x^{2}$ on $[0, 1]$, zero elsewhere; find $P(X \le 0.5)$, step 3