You are on page 1of 24

CHAPTER 4

DISCRETE RANDOM VARIABLES


AND
PROBABILITY DISTRIBUTIONS
(Part 1)

sanizah@tmsk.uitm.edu.my
2
SUBTOPICS
Concept of a Random Variable
Definition
Types of Random Variable
Discrete Probability Distribution
Probability function (Probability mass function)
Distribution function (Cumulative distribution function)
Mathematical expectation
Expected value/mean
Variance
Special Discrete Probability Distribution
Uniform Distribution
Binomial Distribution
Poisson Distribution
Poisson Approximation to the Binomial Distribution
RANDOM VARIABLE
3

Definition :
A random variable (r.v.) is a function or rule that assigns real-valued
numbers to each possible outcome of a random experiment.
Basically, it is just a symbol that represents the outcome of an
experiment.
Notation:
The name of the r. v. will be denoted by uppercase letters,
such as X or Y.
The observed value of the r.v. will be denoted by lowercase letters,
such as x or y.
4 TYPES OF RANDOM VARIABLES

Discrete Continuous

A quantitative random A quantitative random


variable that can variable that can
assume a countable assume an uncountable
number of values number of values
e.g. toss a coin, throw a e.g. time, height,
die weight, price
5
Exercise 1
Classify the following random variable as discrete or continuous:
 X: the no. of automobile accidents per year in Selangor.
 Y: the height of a student.
 X: the amount of milk produced yearly by a particular
cow.
 Y: the no. of eggs laid each month by a hen.
 X: the time spent by a student in answering a question.
 Y: the no. of rooms in a house.
 X: the weight of grain produced per acre.
Examples of random variables
6
Experiment Random Variable Random Variable Type of
Name Values Random Variable
Flip a coin three Y = the total number {0, 1, 2, 3} Discrete
times of heads

Throw two dice Y = the sum of the {2, 3, 4, ..., Discrete


numbers facing up 12}
Measure the length Y = its length in Any positive real Continuous
of an object centimeters number
7 Probability Distributions

1 The probability distribution 2 The probability distribution


for a random variable is defined by a
describes how probabilities probability function which
are distributed over the provides the probability for
values of the random each value of the random
variable. variable.

09
DISCRETE PROBABILITY
DISTRIBUTION FOR
ONE RANDOM VARIABLE
9 Discrete random variable
Example 1 Example 2
Experiment: Two marbles are Experiment: Toss a coin three
drawn in succession without times
replacement from an urn Outcome: H, T
containing 3 red and 2 blue
marbles. S={HHH, HHT, HTH, HTT, THH,
THT, TTH, TTT}
Outcome: R, B
X: number of heads
Sample Space: S={RR, RB, BR, BB}
x = 0, 1, 2, 3
X: number of red marbles
x = 0, 1, 2
10 Definition: probability distribution of a
discrete random variable

A table, formula and histogram are used to list the probabilities of each
value of a r.v. X.
Recall Example 1
11
 Let X be the discrete variable ‘the number of red marbles obtained
when 2 marbles are selected at random’ from an urn containing 3 red
and 2 blue marbles. Show the probability distribution in a table.
X : number of red marbles
x = 0, 1, 2
Sample space x Probability

RR

RB

BR

BB
X : number of red marbles
12 x = 0, 1, 2
Sample space x Probability

RR 2 3/10
RB 1 3/10
BR 1 3/10
BB 0 1/10

Probability distribution for X


x 0 1 2
f(x)=P(X=x)
Tree diagram
13

The probability distribution of X is


x 0 1 2
f (x)=P(X=x) 1/10 6/10 3/10
Recall example 2
14
Experiment: Toss a coin three times
X: number of heads
Recall example 2
15 Experiment: Toss a coin three times
X: number of heads
Sample space x Probability
HHH
HHT
HTH
HTT
THH
THT
TTH
TTT
Probability distribution of X
x
P(X=x)
EXAMPLE 3: The experiment is throwing a fair die.
16 The probability function for discrete probability distribution
may be represented in the form of:

1. Table x 1 2 3 4 5 6

f (x)= P(X = x) 1/6 1/6 1/6 1/6 1/6 1/6

2. Formula
f ( x) = P( X = x ) =
1
for x = 1,2,...,6
6
3. Graph f(x)
EXERCISE 2
17 1) X is a random variable with a probability distribution function
0.1 , x = 2, 4, 6, 8

P( X = x) = 0.2 , x = 1, 3, 5
 0 , otherwise

a) Show that X is a discrete random variable.
b) Find
i) P(X = 4)
ii) P(X < 4)
iii) P(3 ≤ X < 6)
------------------------------------------------------------------------------
2) Find the value m if the probability distribution of a discrete
random variable Y is given by
P(Y = y) = m( y − 2) 2 , for y = 3, 5, 7
THE CUMULATIVE DISTRIBUTION
FUNCTION
FOR
DISCRETE RANDOM VARIABLE
Cumulative distribution function for a discrete
19 random variable
 The cumulative distribution function (cdf) is a function which
describes the probability that a r. v. does not exceed a value.

 Note: Observe the relationship between the cdf and the


probability function f(t).
EXAMPLE 3 revisited:
20 Recall the example on throwing a fair die
x 1 2 3 4 5 6

f(x)= P(X = x) 1/6 1/6 1/6 1/6 1/6 1/6

F (x ) = P( X  x ) =  f (t )
tx

F(1) = P(X  1) = 1/6 F(4) = P(X  4)

F(2) = P(X  2) = P(X=1) + P(X=2) = 1/6 + 1/6 + 1/6 + 1/6 = 4/6

= f(1) + f(2) = 1/6 + 1/6 = 2/6 F(5) = P(X  5) = 5/6

F(3) = P(X  3) = P(X=1) + P(X=2) + P(X=3) F(6) = P(X  6) = 6/6 = 1

= f(1) + f(2) + f(3)

= 1/6 + 1/6 +1/6 = 3/6


Example 3 revisited: Rolling a die (cont.)
21
 Probability function /  Cumulative distribution
probability distribution function
F (x ) = P( X  x ) =  f (t )
tx
P( X = x) = f ( x)  0 x 1
1 / 6 1 x  2

1 / 6 x =1 2 / 6 2 x3
1 / 6 x=2 
 F ( x ) = 3 / 6 3 x  4
1 / 6 x=3 4 / 6 4 x5
f ( x) =  
x=4 5 / 6 5 x6
1 / 6 
1 / 6 6 / 6 x6
x=5 1

1 / 6 x=6 5/6
4/6
3/6
2/6
1/6

1 2 3 4 5 6
4
Example 4  
22
f ( x) =  x
, for x = 0,1, 2, 3, 4
Given the probability function
16
(a) Find the cumulative distribution function of the r.v. X.
(b) Find f(2).
Solution:
(a) Using F (x ) = P ( X  x ) =  f (t )
tx
F(0) = f(0) = 1/16
F(1) = f(0) + f(1) = 1/16 + 4/16 = 5/16
F(2) = f(0) + f(1) + f(2) = 1/16 + 4/16 + 6/16 = 11/16 0, x0
F(3) = f(0) + f(1) + f(2) + f(3) = 15/16 1 , 0  x 1
F(4) = f(0) + f(1) + f(2) + f(3) + f(4) = 1  16
 165 , 1 x  2
F ( x) =  11
(b) f(2)= F(2) – F(1) =11/16 – 5/16  16 , 2 x3
=6/16  15 , 3 x  4
 16
= 3/8 1 x4
Graph for probability Graph for discrete cumulative
23 distribution distribution function
(Bar chart/Probability
histogram)
16/16=1
15/16

11/16

5/16

1/16

0, x0
1 , 0  x 1
 16
 165 , 1 x  2
F ( x) =  11
 16 , 2 x3
 15 , 3 x  4
 16
1 x4
24 EXERCISE 3
Let X be the discrete random variable with the following
probability distribution:
X=x 1 2 3 4 Total
P(X = x) 2/9 3/9 3/9 1/9 1

Find the distribution function of the random variable X and plot


its graph.

You might also like