Random Variables - Continuous

A Random Variable is a set of possible values from a random experiment.

Example: Tossing a coin

We could get Heads or Tails.

Let's give them the values Heads=0 and Tails=1 and we have a Random Variable X:

Mapping of heads to 0 and tails to 1

In short:

X = {0, 1}

Note: We could choose Heads=100 and Tails=150 or other values if we want! It is our choice.

Continuous

Random Variables can be either Discrete or Continuous:

In our Introduction to Random Variables (please read that first!) we look at many examples of Discrete Random Variables.

But here we look at the more advanced topic of Continuous Random Variables.

The Uniform Distribution

The Uniform Distribution (also called the Rectangular Distribution) is the simplest continuous distribution.

Between a and b, all values of the random variable are equally likely.

Rectangular uniform distribution graph from a to b with height 1 over (b-a)
The probability density between a and b is a constant value p

Total probability must be 1, so the area of the rectangle must be 1:

area = height × width = 1
p × (b−a) = 1
p = 1/(b−a)

We can write:

f(x) = 1b−a for a ≤ x ≤ b
f(x) = 0 otherwise

For continuous variables, the probability of being exactly one value (like 1.50000...) is actually 0. We can only find the probability for a range of values (like between 1.4 and 1.6). This is why we use the area under the curve!

Old Faithful geyser erupting

Example: Old Faithful erupts every 91 minutes. You arrive there at random and wait for 20 minutes ... what's the probability you will see it erupt?

This is actually easy to calculate, 20 minutes out of 91 minutes is:

p = 20/91 = 0.22 (to 2 decimals)

But let's use the Uniform Distribution for practice.

To find the probability between a and a+20, find the blue area:

Uniform distribution from a to a+91 with a shaded region of 20 units

Area
= 191(a+20 − a)
= 191 × 20
= 2091
= 0.22 (to 2 decimals)

So there's about a 0.22 probability (20% chance) you will see Old Faithful erupt.

If you waited the full 91 minutes you would be sure (p=1) to have seen it erupt.

But remember this is a random thing! It might erupt the moment you arrive, or any time in the 91 minutes.

Cumulative Uniform Distribution

The Uniform Distribution can also be written as a cumulative (adding up as it goes along) distribution:

Graph showing the cumulative distribution function rising linearly from 0 to 1
The probability starts at 0 and builds up to 1

This is called the Cumulative Distribution Function, or CDF.

F(x) is the standard notation for CDF.

Example (continued):

Let's use the CDF of the previous Uniform Distribution to work out the probability:

uniform distribution cumulative

At a+20 the probability has accumulated to about 0.22

Other Distributions

Knowing how to use the Uniform Distribution helps when dealing with more complicated distributions like this one: A curved probability density function graph

The general name for any of these is probability density function or pdf

The Normal Distribution

The most important continuous distribution is the Standard Normal Distribution

It has mean 0 and standard deviation 1, and its random variable is given the special letter Z.

The graph for Z is a symmetrical bell-shaped curve:

Bell-shaped curve of the standard normal distribution

We usually want to find the probability that Z lies between two values.

Example: P(0 < Z < 0.45)

Standard normal curve with area shaded between 0 and 0.45

(What's the probability that Z is between 0 and 0.45)

This is found by using the Standard Normal Distribution Table

Go to row 0.4, then across to 0.05 (0.4+0.05=0.45) to find 0.1736:

P(0 < Z < 0.45) = 0.1736

Summary

8868, 8869, 8870, 8871, 8872, 8873, 8874, 8875, 8876, 8877