You are on page 1of 5

Mathematics SM 025

Topic 9: Random Variables –Musiade Bin Mohd Sharif


________________________________________________________________________

LECTURE 1 OF 8

TOPIC : 9.0 RANDOM VARIABLES

SUBTOPIC : 9.1 Introduction to Random Variables

LEARNING
OUTCOMES : At the end of the lesson, students should be able to :

(a) Define random variables

(b) Identify discrete and continuous variables

CONTENTS

9.1 Random Variables

If we toss a fair coin twice, the number of heads obtained could be 0, 1 or 2. The
probabilities of these occurring are as follows:

P(no heads) = P(TT) = (0.5)(0.5) = 0.25


P(one head) = P(HT) + P(TH) = (0.5)(0.5) +(0.5)(0.5) = 0.5
P(two heads) = P(HH) = (0.5(0.5) = 0.25

We can show the results in a table, known as a probability distribution

Number of heads 0 1 2
Probability 0.25 0.5 0.25

The variable being considered is ‘the number of heads obtained in two tosses’ and it can
be denoted by X. It can only take exact values, 0, 1 or 2 and so is called a discrete
variable.

X ~ Random variables obtained the number of heads in two tosses.

The probabilities can be written

P( X  0)  0.25, P( X  1)  0.5, P( X  2)  0.25

Sometimes we write po = 0.25, p1 = 0.5, p2 = 0.25

Now if the sum of the probabilities is 1, the variable is said to be random.

1
Mathematics SM 025
Topic 9: Random Variables –Musiade Bin Mohd Sharif
________________________________________________________________________

In this example

P(X  0)  P(X  1)  P( x  2)
 0.25  0.5 0.25
1

so X is a discrete random variable.

The probability distribution is often written

X 0 1 2
P ( X  x) 0.25 0.5 0.25

And the statement ‘the sum of the probabilities is 1’ is written

 P( X  x)  1
all x

DISCRETE RANDOM VARIABLE

Let X have the following properties:


(a) it is a discrete variable and can take only values x1, x2,..........., xn ;
(b) the probabilities associated with these values are p1, p 2 ,.........., p n ;

where P( X  x 1 )  p 1
P( X  x2 )  p2

P( X  xn )  pn

Then X is a discrete random variable if p1  p 2 ............. p n  1

This can be written

 pi  1 , i  1,2,.......,n

or  P( X  x)  1
all x

2
Mathematics SM 025
Topic 9: Random Variables –Musiade Bin Mohd Sharif
________________________________________________________________________
NOTE:  P( X  x)  1
all x
The sum of all the probabilities is equal one

We usually denote a random variable (r.v.) by a capital letter (X, Y, R, etc.) and the
particular value it takes by a small letter (x, y, r, etc.).

CONTINUOUS RANDOM VARIABLE

A continuous random variable (r.v.) is a theoretical representation of a continuous


variable such as height, mass or time. For example, X could be continuous random
variable ‘the time taken, in minutes, to perform the given task’, Y could be continuous
random variable ‘the mass, in g, of a bag of sugar packaged by a particular machine’.
A continuous random variable is specified by its probability density function which is
written as f(x).

Identify discrete random variable and continuous random variable

Example

State whether each of the following random variables is discrete or continuous:


(a) the number of students who drive to college each day
(b) the length of time a student spends in the library each week
(c) the number of 6 obtained when three fair dice are thrown

Solution

(a) discrete
(b) continuous
(c) discrete

Example

3 fair coins are tossed. Let X be a discrete variable that is 'the number of head obtained
when the three fair coins are tossed ’. Show that X is a random variable.

Solution

Let H = Head, T = Tail

When three coins are tossed, the number of heads obtained is 0, 1, 2, 3

Therefore X can take the values 0, 1, 2 and 3 only

3
Mathematics SM 025
Topic 9: Random Variables –Musiade Bin Mohd Sharif
________________________________________________________________________
Then,
3
2 
P(X = 0) = P(TTT) = 1 = 1
8

P(X  1)  P(HTT)  P(THT)  P(TTH)

2  2  2 
3 3
= 1  1  1
3

8 
= 3
P(X  2)  P(HHT)  P(HTH)  P(THH)

3
2  2  2 
3
= 1  1  1
3

= 3 8 

P(X  3)  P(HHH)

2 
= 1
3

= 1 
8

Now  P(X  x )  18  83  83  18
all x
=1

Therefore X is a random variable

4
Mathematics SM 025
Topic 9: Random Variables –Musiade Bin Mohd Sharif
________________________________________________________________________

Example

Let X be the discrete variable ‘the number of fours obtained when two dice are thrown’.
Show that X is a random variable, i.e. that the sum of the probabilities is 1. Illustrate the
probability distribution on a diagram

Solution

When two fair dice are thrown , the number of fours obtained is 0, 1 or 2.
Therefore X can take the values 0, 1 and 2 only.

You might also like