You are on page 1of 76

Chapter 5

Part I
Discrete Random
Variables
Learning Outcome
 Apply probabilistic distribution theory to
solve problems in industry.
Contents
5.1 Random Variables

 Random variable
 A random variable is a variable whose value is
determined by the outcome of a random
experiment. In general, it is denoted by the
capital letter, X.
 Discrete random variable
 Continuous random variable
5.1 Random Variables

 Discrete random variable


 A random variable that assumes countable
values is called a discrete random variable.
 Example
1. The number of cars sold at a dealership during a given
month.
2. The number of houses in a certain block.
3. The number of heads obtained in three tosses of a coin.
5.1 Random Variables
 Continuous random variable
 A random variable that can assume any value
contained in one or more intervals is called a
continuous random variable.
 Example
1. The height of a person.
2. The time taken to complete an examination.
3. The weight of a baby.
4. The price of a house.
5.2 Probability distribution of
a discrete random variable
 Probability distribution of a discrete
random variable lists all the possible values
that the random variable can assume and their
corresponding probabilities.
 The ordered pairs (x, P(x)) where P(x)=P(X=x)
is called the probability distribution of the
discrete random variable X.
 Two characteristics of a probability distribution:
1. 0  P(x)  1 for each value of x
2. P(x) = 1
5.2 Probability distribution of
a discrete random variable
 Example 5.1
 The following table lists the probability distribution of the
number of breakdowns per week for a machine based on
past data.

Breakdowns per week 0 1 2 3


Probability 0.15 0.20 0.35 0.30
a) Present this probability distribution graphically.
b) Find the probability that during a given week, the number of
breakdowns for this machine is
i) exactly 2 ii) 0 to 2
iii) more than 1 iv) at most 1
5.2 Probability distribution of
a discrete random variable
Solution:
Let x denote the number of breakdowns for this
machine during a given week.
(a)
0.35
0.3
0.25
0.2
0.15

0.1
0.05
0
0 1 2 3
5.2 Probability distribution of
a discrete random variable
Solution:
 (b)
5.2 Probability distribution of
a discrete random variable
 Example 5.2
According to a survey, 60% of all students at a
large university suffer from math anxiety. Two
students are randomly selected from this
university. Let x denote the number of students in
this sample who suffer from math anxiety.
Develop the probability distribution of x.
5.2 Probability distribution of
a discrete random variable
Solution:
 We define; N = the student selected does not suffer from
math anxiety.
M = the student selected suffers from math anxiety.

x Events P(X = x)
0 {NN}
1 {NM, MN}
2 {MM}

5.2 Probability distribution of
a discrete random variable
 Mean
 The mean of a discrete random variable X is also
called its expected value and is computed as
E ( X ) or    xP( x)
 Variance
 The variance of a discrete random variable X
measures the spread of its probability distribution
and is computed as

Var ( X ) or  2  E ( X 2 )  ( E ( X )) 2
  x 2 P ( x)   2
5.2 Probability distribution of
a discrete random variable
 The standard deviation of a discrete random
variable X is given by

  2
  x 2
P ( x )   2
5.2 Probability distribution of
a discrete random variable
 Example 5.3
Refer to Example 5.1
Find the mean and standard deviation of the number
of breakdowns per week for this machine.

Breakdowns per week 0 1 2 3


Probability 0.15 0.20 0.35 0.30
5.2 Probability distribution of
a discrete random variable
 Solution: x P(x) xP(x) x2P(x)
0 0.15 0 0
1 0.20 0.2 0.2
2 0.35 0.7 1.4
3 0.30 0.9 2.7
 1.0 1.8 4.3

E  x    xP ( X  x )  1.8
Var ( x)   x P  X  x    E  x    4.3  1.82  1.06
2 2

  1.06  1.0296
Example 5.4
 Loh Corporation is planning to market a new
makeup product. It will earn an annual profit of $4.5
million if this product has high sales and an annual
profit of $1.2 million if the sales are medium, and it
will lose $2.3 million a year if the sales are low. The
probabilities of these three scenarios are 0.32, 0.51
and 0.17 respectively.

(a) Let x be the profits (in millions of dollars) earned per


annum by the company from this product. Write the
probability distribution of x.
(b) Calculate the mean and standard deviation of x.
Solution for Example 5.4

x P(X=x) xP(X=x) x2 P(X=x)

4.5 0.32

1.2 0.51

-2.3 0.17

 1.0
Solution for Example 5.4
5.2 Probability distribution of
a discrete random variable
 Cumulative distribution function
 The cumulative distribution function (cdf) of a
random variable X is defined as

F ( x)  P ( X  x)
5.2 Probability distribution of
a discrete random variable
 Example
 Compute the cumulative  0 x0
distribution function for
0.15 x  0
the number of

breakdowns per week in
Example 5.1.
F  x   0.35 x  1
 0.7 x  2

Breakdowns 0 1 2 3  1.0 x  3
per week
Probability 0.15 0.20 0.35 0.30
Note:
5.3 The Binomial Probability
Distribution
5.3.1 Factorials and combinations
 Factorial
n! n(n  1)(n  2)(n  3)...3  2 1
where 0! = 1
 Combinations (order does not matter)
The number of combinations for selecting x from n
distinct elements is given by the formula
 n n!
n
C x    
 x  x!(n  x)!
5.3 The Binomial Probability
Distribution
5.3.2 The Binomial Experiment
 There are n identical trials.
 Each trial has two and only two outcomes.
These outcomes are usually called a success and
a failure. Each trial is called a Bernoulli trial.
 P(success) = p , P(failure) = q, and p+q=1. The
probabilities p and q remain constant for each
trial.
 The trials are independent.
5.3 The Binomial Probability Distribution
 Example 5.5
Consider the experiment consisting of 10 tosses
of a coin. Determine whether or not it is a
binomial experiment.
 Solution:
5.3 The Binomial Probability Distribution
 The Binomial Random Variable
 The random variable X that represents the number of
successes in n trials for a binomial experiment is called a
binomial random variable.

S S S

n independent trials with x


number of success
5.3 The Binomial Probability Distribution

 Binomial Probability Distribution


 The probability distribution of X in a binomial
experiment is called the binomial probability
distribution or the binomial distribution and
denoted by B(n, p).

X~ B(n, p).
5.3 The Binomial Probability Distribution

 Example 5.6
Are the following X a binomial random
variable?
(a) A fair coin is tossed for 10 times. Let X
represents the number of heads exist.

Solution:
(a) Yes, X~ B (n =10, p=0.5).
Example 5.6

 b) Five persons are randomly chosen from a


group of 3 males and seven females.
Let X be the number of males chosen.

Solution:
(b) No, since the probability are changing
throughout the trials. The probability are
dependent.
Example 5.6

 c) X represents the number of students who


pass the STPM examination in a class of 35
students.

Solution:
5.3 The Binomial Probability Distribution
 Binomial Formula
 For a binomial experiment, the probability

of exactly x successes in n trials is given


by the binomial formula p

p q
 n  x n x p
P( X  x)    p q p
q
 x q
where x  0,1, 2,..., n and q  1  p p

q p
q
To find the probability of x successes in n trials for a p
q
binomial experiment, the only parameters needed are
those of n and p.
q
5.3 The Binomial Probability Distribution
 Example 5.7
According to a poll of women aged 18 and older,
60% of the women said that they do not spend
enough time on themselves. Assume that this
result holds true for the current population of all
women aged 18 and older. Let X denote the
number in a random sample of three women aged
18 and older who hold this view. Write the
probability distribution of x and draw a line graph
for this probability distribution.
5.3 The Binomial Probability Distribution

 Solution:
Note that n - x is the number of women who either
say that they spend enough time on themselves
or have no opinion.
p = P(a woman holds the given view) = 0.6
q = P(a woman does not hold the given view) =0.4
The possible values of x are 0, 1, 2, 3
5.3 The Binomial Probability Distribution

 Solution (Cont'd):

x P(X = x)

0 0.064

1 0.288

2 0.432

3 0.216
5.3 The Binomial Probability Distribution
 Solution (Cont'd):

x P(X = x) The probability distribution of X

0 0.064 0.5
0.4
1 0.288
Probability

0.3
2 0.432 0.2
0.1
3 0.216
0
1 2 3 4
x
Using Excel
5.3 The Binomial Probability Distribution

 Mean and Variance of a binomial distribution


 Suppose X~ B(n, p).
 Mean of X, =np and
 Variance of X, 2=npq where q = 1- p

 Using the Table of Binomial Probabilities


 Suppose X~ B(n, p) and Y= n - X.
 Then Y~ B(n, 1-p).
5.3 The Binomial Probability Distribution

 Example 5.8
Suppose that X~ B (n =100, p=0.25). Find:
(i) P(X=24)
(ii) P(21X<30)
(iii) P(X<20)
(iv) E(X)
5.3 The Binomial Probability Distribution
 Solution:
(i) P(X=24) =

(ii) P(21X<30) =

(iii) P(X<20) =

(iv) E(X) = np =
Using Excel
Using Excel
Using Excel
5.3 The Binomial Probability Distribution

 Example 5.9
Suppose X~B (n=10, p=0.8) and Y~B (n=10, p=0.2)
Find P(X=7) and P(Y=3)

 Solution:
P(X = 7) =

P(Y = 3) =
5.3 The Binomial Probability Distribution

 Example 5.10
The probability that a patient recovers from a rate
blood disease is 0.6. If 20 people are known to
have contracted this disease, what is the
probability that
a) exactly 5 survive?
b) from 3 to 8 survive?
c) at least 10 survive?
5.3 The Binomial Probability Distribution
 Solution:
Let X be the number of patients out of 20 who
survive from this disease.
X~B (20, 0.6) and Y = 20 - X ~B (20, 0.4)

a) P(X = 5) =

b) P(3X8) =

c) P(X 10) =
Shape of Binomial Distribution

For any number of trials n:


 The binomial probability distribution is

symmetric if p = 0.50.
 The binomial probability distribution is

skewed to the right if p is less than 0.50.


 The binomial probability distribution is

skewed to the left if p is greater than 0.50.


Shape of Binomial Distribution

0.20
0.15
0.10
0.05
0.00

0 1 2 3 4 5 6 7 8 9 10

n=10, p = 0.50
Shape of Binomial Distribution

0.20
0.10
0.00

0 1 2 3 4 5 6 7 8 9

n=10, p = 0.30
Shape of Binomial Distribution

0.25
0.20
0.15
0.10
0.05
0.00

0 1 2 3 4 5 6 7 8 9 10

n=10, p = 0.70
Note:
5.4 The Poisson Probability Distribution

 Discrete probability distribution that applies to


occurrences of some events over a specified
interval.
 The random variable X is the number of
occurrences of the events in an interval.
 e.g. time, distance, volume or some similar unit.
X number of occurrences

Interval
5.4 The Poisson Probability Distribution
 Properties of Poisson Process
1. The number of outcomes occurring in an interval is
independent of the number that occurs in any other
interval.
2. The probability that a single outcome will occur during a
very short interval is proportional to the length of the
interval and does not depend on the number of
outcomes occurring outside this interval.
3. The probability that more than one outcome will occur in
such a short interval is negligible.
5.4 The Poisson Probability Distribution
 The following are examples of discrete
random variable for which the Poisson
probability distribution can be applied.
 The number of telemarketing phone calls received
by a household during a given day.
 The number of mistakes typed on a given page.
 The number of customers entering a grocery store
during a one-hour interval.
5.4 The Poisson Probability Distribution
 The probability of x occurrences in an interval
is x 
 e
P  X  x  x  0,1, 2,...
x!
where  is the mean number of occurrences in
that interval
 The Poisson distribution is denoted by
Poisson():
X~ Poisson()
 Mean and Variance of the Poisson probability
distribution:  =  = 2
5.4 The Poisson Probability Distribution
 Example 5.11
A washing machine in a laundry shop breaks
down an average of three times per month. Find
the probability that during the next month this
machine will have
a) exactly two breakdowns
b) at most one breakdown
c) at least one breakdown
5.4 The Poisson Probability Distribution
 Solution:
Let  be the mean number of breakdowns per month,
and let X be the actual number of breakdowns observed
during the next month for this machine.
X~Poisson(=3)
32 e 3
a) P  X  2    0.224
2!
30 e 3 31 e 3
b) P  X  1  P  X  0   P  X  1  
0! 1!
 0.0498  0.1494  0.1992
c) P  X  1  1  P  X  0   1  0.0498  0.9502
Using Excel
5.4 The Poisson Probability Distribution

 Example 5.12
 A company provides free examination of its
products for seven days. If not completely
satisfied, a customer can return the product within
that period and get a full refund.
 According to past records of the company, an
average of 2 of every 10 products sold by this
company are returned for a refund.
 Find the probability that exactly 6 of the 40
products sold by this company on a given day will
be returned for a refund.
5.4 The Poisson Probability Distribution
Solution:

Let x denote the number of products in 40 that will be returned for a refund.
The given mean is defined per 10 products, but x is defined for 40
products.
Because, on average, 2 out of 10 products are returned, the mean number
of products returned out of 40 will be 8.

Given Y ~ Poisson    2  ,
thus, X ~ Poisson    8 
86 e 8
P  X  6   0.1221
6!
5.4 The Poisson Probability Distribution

 Using the Table of Poisson Probabilities


 Example 5.13
On average, two new accounts are opened per
day at Bank ABC. Find the probability that on a
given day, the number of new accounts opened at
this bank will be
a)exactly 6 b) at most 3 c) at least 7
5.4 The Poisson Probability Distribution

 Solution:
Let X be the number of new account opened per
day. X~ Poisson ( = 2).
a) P(X = 6) =

b) P(X  3) =

c) P(X  7) =
5.4 The Poisson Probability Distribution

Example 5.14
 An auto salesperson sells an average of 0.9

car per day.


 Let x be the number of cars sold by this

salesperson on any given day.


 Using the Poisson probability distribution

table, write the probability distribution of x.


 Draw a graph of the probability distribution.
5.4 The Poisson Probability Distribution

 Solution:
0.4500
0.4000

x P ( X=x) 0.3500
0.3000

0 0.4066 0.2500

P(X)
0.2000

1 0.3659 0.1500
0.1000

2 0.1647 0.0500
0.0000
0 1 2 3 4 5 6
3 0.0494 X

4 0.0111
5 0.0020
6 0.0003
5.5 Poisson approximation to Binomial

 A Binomial distribution with large sample


sizes and small values of p, which then
generate rare events, are potential
candidates for use of the Poisson distribution.

If X ~ B(n, p), n  20 and np  7,


then X  Poisson    np 
5.5 Poisson approximation to Binomial

 Example 5.15
 Suppose the probability of a bank making
mistake in processing a deposit is 0.0003. If
10000 deposits are audited, what is the
probability that more than 6 mistakes were
made in processing deposits?
5.5 Poisson approximation to Binomial

 Solution:

Given X ~ B(n  10000, p  0.0003),


n  20 and np  3  7,
 X  Poisson    3
P  X  6   P  X  7   0.0335
Note:
5.6 Geometric Distribution
 Consider an experiment where the properties
are the same as those listed for a binomial
experiment, with the exception that the trials
will be repeated until a success occurs.
 Example: Tossing a coin until a head occurs

x
5.6 Geometric Distribution
 Let x be the no. of tossing to reach ‘Head’

X=0 Cannot happen


X=1 H p
X=2 TH qp
X=3 TTH q2p
5.6 Geometric Distribution
 If repeated independent trials can result in a
success with probability p and a failure with
probability q=1-p , then the probability
distribution of the random variable X, the number
of trial on which the first success occurs, is

x 1
g ( x; p )  pq ; x  1, 2,3,...
X ~ G  p
Example 5.16

 In a certain manufacturing process it is


known that, on the average, 1 in every 100
items is defective. What is the probability that
the fifth item inspected is the first defective
item found?

 Solution:
Let X be the number of item inspected is the first
defective item found.
Example 5.16
 Solution
 Let X be the number of item inspected until the
first defective item found.

X ~ g  p  0.01
P  X  5   q p  0.99  0.01  0.0096
4 4
5.6 Geometric Distribution

Mean and Variance

 Suppose X ~ g  x; p  , then the mean and


variance of X are

1 1 p
 and   2
2

p p
Example 5.16
 Find the mean and variance for Example
5.16.
 Solution
1
  100 and
0.01
1  p 1  0.01
  2 
2
2
 9900
p 0.01
Review
5.1 Random Variables.
5.2 Probability distribution of a discrete random variable.
5.3 The Binomial Probability Distribution.
5.3.1 Factorials and combinations.
5.3.2 The Binomial Experiment.
5.4 The Poisson Probability Distribution.
5.5 Poisson approximation to Binomial.
5.6 Geometric Distribution.
The End
Chapter 5
Part I

You might also like