9709. S2. Continuous Random Variables

We will start to look at continuous random variables beyond those that are modelled by a Normal distribution.

We remember that probability density = (frequency density) / (total frequency)

A graph of a continuous variable will be a curve, and as the area below the graph represents probability, it will equal 1. We can use definite integration to find the area under the curve.

To summarise, a graph, f(x), representing a continuous random variable is the probability density function (PDF). The PDF has the following properties:

  • It cannot go below the x-axis since you cannot have a negative probability; f(x) \geq 0
  • Total probability of all outcomes = 1, hence \int_{ - \infty }^{ \infty } f(x) dx = 1

In many situations, the data are defined across a specific interval or across specified intervals, outside of which f(x) = 0.

Specific individual values each have a zero probability of occurring, i.e. for a continuous random variable iwth PDF f(x), P(X=a) = 0.

Because we cannot find the probability of an exact value, when finding the probability in a given interval, it does not matter whether you use < or \leq . P(a < x < b) = P(a < x \leq b) = P(a \leq x \leq b). This does not mean that X cannot take the value a, it just means that the probability of the exact value a is zero.

Worked Example 1

The height reached by water erupting from a broken water pipe, X metres, is modelled by the following PDF:

  1. Show that k = 333;
  2. Sketch the graph of f(x);
  3. Find the probability that the water reaches a height of at least 6m.

Worked Example 2

A brand of laptop battery has a lifetime of X years. It is suggested that the variable X can be modelled by the following PDF:

  1. Sketch the graph of f(x);
  2. Show that f(x) has the properties required of a probability density function;
  3. Find the probability that the battery lasts for more than 3 years;
  4. Work out the value m such that P(X<m) = 1/2

Exercise 1

Exercise 1 – Answers

Exercise 1 – Worked Solutions

Finding median and other percentiles of a continuous random variable

The median is the value m such that P(X<m) = 1/2 (or, equivalently, P(X>m) = 1/2). This can be calculated using: P(X<m) = \int_{ - \infty }^{ m } f(x) dx = \frac{1}{2} . The same principle applies with other percentiles, e.g. to find the value representing the 30th percentile, we would replace 1/2 with 0.3.

Worked Example 3

For any given time I arrive at a bus stop, the arrival time of a bus can be modelled by the continuous random variable X, whose PDF, f(x), is given by:

Find the median and the interquartile range of the arrival time of the bus.

Worked Example 4

A continuous random variable, X, has PDF f(x) given by:

  1. Show that the median value, m, is given by 2m2 – 24m + 43 = 0
  2. Find the value of m, correct to 2 decimal places.

Worked Example 5

A continuous random variable, X, has PDF f(x) given by:

  1. Find the median.
  2. Find the lower quartile.

Exercise 2

Exercise 2 – Answers

Exercise 2. Worked Solutions

Expectation and Variance

The formula for the mean of x, E(X) = \Sigma xP(x) becomes E(X) = \int_{ - \infty }^{ \infty } xf(x) dx

Similarly with variance, E(X^2) = \int_{ - \infty }^{ \infty } x^2 f(x) dx and so Var(X) = E(X^2) - {E(X)}^2 = \int_{ - \infty }^{ \infty } x^2 f(x) dx - [\int_{ - \infty }^{ \infty } x^2 f(x) dx]^2

Worked Example 6

The time, in minutes, taken by students to answer a question in a multiple-choice test has a PDF f(t) as follows:

Work out the mean and variance of the time taken.

Worked Example 7

The arrival time, x, of a taxi is a continuous random variable X, whose PDF f(x) is given by:

The taxi firm states that, on average, a taxi will arrive within 5 minutes. Is this statement true or false?

Exercise 3

Exercise 3 – Answers

Exercise 3 – Worked Solutions

Miscellaneous Exercise

Miscellaneous Exercise – Answers

Miscellaneous Exercise – Worked Solutions