• LOGIN
  • No products in the cart.

SUBMATH: RANDOM AND CONTINUOUS VARIABLES

This unit is about discrete random variables

Random VariablesContinuous

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”:

random variable 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:

  • Discrete Data can only take certain values (such as 1,2,3,4,5)
  • Continuous Data can take any value within a range (such as a person’s height)

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 distribution.

It has equal probability for all values of the Random variable between a and b:

uniform distribution p=1/(b-a)

The probability of any value between a and b is p

We also know that p = 1/(b-a), because the total of all probabilities must be 1, so

the area of the rectangle = 1
p × (b−a) = 1
p = 1/(b−a)

We can write:

P(X = x) = 1/(b−a) for a ≤ x ≤ b
P(X = x) = 0 otherwise

old faithful

Example: Old Faithful erupts every 91 minutes. You arrive there at random and wait for 20 minutes … what is 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 example

Area = (1/91) x (a+20 − a)
= (1/91) x 20
= 20/91
0.22 (to 2 decimals)

So there is a 0.22 probability 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

We can have the Uniform Distribution as a cumulative (adding up as it goes along) distribution:

uniform distribution cumulative
The probability starts at 0 and builds up to 1

This type of thing is called a “Cumulative distribution function”, often shortened to “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

Summary

  • A Random Variable is a variable whose possible values are numerical outcomes of a random experiment.
  • Random Variables can be discrete or continuous.
  • An important example of a continuous Random variable is the Standard Normal variable, Z.

VIDEO TUTORIAL

Discrete Random Variables

Discrete random variables can take on either a finite or at most a countably infinite set of discrete values (for example, the integers).

Their probability distribution is given by a probability mass function which directly maps each value of the random variable to a probability.

For example, the value of x1 takes on the probability p1, the value of x2 takes on the probability p2, and so on.

The probabilities pi must satisfy two requirements: every probability pi is a number between 0 and 1, and the sum of all the probabilities is 1. (p1+p2+⋯+pk=1)

image

Discrete Probability Disrtibution: This shows the probability mass function of a discrete probability distribution. The probabilities of the singletons {1}, {3}, and {7} are respectively 0.2, 0.5, 0.3. A set not containing any of these points has probability zero.

Examples of discrete random variables include the values obtained from rolling a die and the grades received on a test out of 100.

Continuous Random Variables

A continuous random variable is a random variable where the data can take infinitely many values. For example, a random variable measuring the time taken for something to be done is continuous since there are an infinite number of possible times that can be taken.

For any continuous random variable with probability density function f(x), we have that:

This is a useful fact.

Example

X is a continuous random variable with probability density function given by f(x) = cx for 0 ≤ x ≤ 1, where c is a constant. Find c.

If we integrate f(x) between 0 and 1 we get c/2. Hence c/2 = 1 (from the useful fact above!), giving c = 2.

Cumulative Distribution Function (c.d.f.)

If X is a continuous random variable with p.d.f. f(x) defined on a ≤ x ≤ b, then the cumulative distribution function (c.d.f.), written F(t) is given by:

So the c.d.f. is found by integrating the p.d.f. between the minimum value of X and t.

Similarly, the probability density function of a continuous random variable can be obtained by differentiating the cumulative distribution.

The c.d.f. can be used to find out the probability of a random variable being between two values:

P(s ≤ X ≤ t) = the probability that X is between s and t. But this is equal to the probability that X ≤ t minus the probability that X ≤ s.

[We want the probability that X is in the red area:]

Hence:

  • P(s ≤ X ≤ t) = P(X ≤ t) – P(X ≤ s) = F(t) – F(s)

Expectation and Variance

With discrete random variables, we had that the expectation was S x P(X = x) , where P(X = x) was the p.d.f.. It may come as no surprise that to find the expectation of a continuous random variable, we integrate rather than sum, i.e.:

As with discrete random variables, Var(X) = E(X2) – [E(X)]2

VIDEO TUTORIAL

Assignment

SUBMATH: Random and Continuous Variables Assignment

ASSIGNMENT : SUBMATH: Random and Continuous Variables Assignment MARKS : 30  DURATION : 1 week, 3 days

 

Courses

Featured Downloads