IB Analysis and Approaches HL · Continuous random variables and the normal distribution · Section 1 of 4

Continuous random variable and probability density function

3 worked examples · By Álvaro López

Key idea

A continuous random variable can take any value in an interval (a time, a mass, a length). Its probabilities are not read from a table: they are areas under a curve, the probability density function. In HL you must calculate those areas with integrals, find constants that make the total area equal to 1, and obtain the mean, variance, median and mode.

From bars to a curve

A bar chart works for a discrete variable, where each value has its own probability. With a waiting time measured in minutes it is different: between 3 and 4 there are infinitely many possible values, and no particular value has an appreciable probability.

Imagine you measure the waiting time of many customers and group the data into intervals that get narrower and narrower. The histogram of relative frequencies gradually smooths out until it resembles a curve. That curve, , is the probability density function of the variable.

The reason is that a single point encloses no area. This is a difference from the discrete variable: here and give the same result.

If the density changes its expression from one piece to another, integrate piece by piece and add the results.

Mean, variance, median and mode

These parameters summarise the distribution. The sums of the discrete case become integrals.

To find the mode, look for the maximum of : set the derivative equal to zero if it is an interior point, or look at the ends of the interval if the density is increasing or decreasing. To find the median, set up an equation in the upper limit of the integral.

Worked examples

Example 1 Basic

A linear density

The continuous random variable has probability density function

a) Find the value of .

b) Find .

c) Find .

Solution

a) The total area must be 1:

b)

c) is continuous, so : a single point encloses no area.

Answer: a) ; b) ; c) .

Example 2 Medium

A parabola on [0, 4]

The time (in minutes) that a customer waits at a counter has probability density function

a) Show that .

b) Find the probability of waiting more than 3 minutes.

c) Find and .

Solution

a)

b)

c)

Answer: b) ; c) , .

Example 3 Hard

Piecewise density: mode, median and mean

The time (in hours) that a technician takes to fix a fault has probability density function

a) Check that is a probability density function and write down the mode of .

b) Find .

c) Find the median of .

d) Find .

Solution

a) The function is non-negative on . Total area, piece by piece: The first piece is worth . For the second, , and divided by 12 this gives . Total . It is a density.

The graph rises linearly up to (where it equals ) and then falls linearly to at . The maximum is at : mode .

b) falls in the second piece:

c) Up to the area is , so the median lies in the second piece: As , the solution is .

d)

Answer: a) mode ; b) ; c) ; d) .

In the exam: for a piecewise density, state which piece each limit of integration falls in. For the median, check which of the two roots of the quadratic lies within the interval; if you do not rule out the other one, you lose the final mark.

Common mistakes

Summary

  • A continuous variable takes values in an interval; its distribution is given by the probability density function , with and total area .
  • ; , so and are equivalent.
  • An unknown constant is found by imposing that the total area is 1.
  • and with .
  • Mode: maximum of . Median : .
  • If the density is piecewise, integrate piece by piece and check in which piece each value falls.
Maths classes in Aldaia and online

Want to work on it together?

Free first consultation: we look at your level and your exam, and build a plan. Álvaro replies on WhatsApp.

Message us on WhatsApp