Professional Documents
Culture Documents
DISTRIBUTION THEORY
Contents
Introduction
Session 1
Probability Distribution
Session 2
Discrete Random Variables
Session 3
Continuous probability distribution .
121
©2020, The Open University of Sri Lanka
Introduction
The basic theory of statistics is vast and includes the science of data
collection, date generation, data presentation, data analysis, and statistic, an
inference, prediction etc. Therefore this unit is limited to the distribution
theory.
The statistical distributions discussed here are in fact probability models.
Furthermore, the first session of this unit contains about probability
distribution, random variables, probability density function, and expectation
of a random variable. Moreover, next two sessions discuss about discrete
probability distributions and Continuous probability distributions separately.
In this unit the discrete distributions named Uniform, Binomial, Poisson and
Geometric are defined. Considering the above distributions, the expectation
and variance are calculated.
122
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
Session 8
Probability Distributions
Contents
Introduction, p 123
8.1 Random Variable, p 124
8.2 Discrete Random Variable, p 125
8.3 Continuous Random Variable, p 132
8.4 Expected value and other distribution parameters, p 137
Answer to the Activities, p 142
Summary, p 146
Learning outcomes, p 150
Introduction
The concept of a random variable allows us to pass from the experimental
outcomes themselves to a numerical function of the outcomes. There are
two fundamentally different types of random variables which are discrete
random variables and continuous random variables. In this session, we
examine the basic properties of random variables a, probability distribution
and other distribution parameters of discrete and continuous random
variables. Furthermore, this session discusses important examples of
discrete variables as well as continuous random variables.
X : S → ℝ.
Example 1
Sample point 𝐻𝐻 𝐻𝑇 𝑇𝐻 𝑇𝑇
𝑋 2 1 1 0
124
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
Thus, for example, in the case of ‘𝐻𝐻’(i.e. two heads), 𝑋 = 2 while for
‘𝐻𝑇’ (i.e. one heads), 𝑋 = 1. It follows that 𝑋 is a random variable.
You may notice that many other random variables could also be defined on
this same sample space {𝐻𝐻, 𝐻𝑇, 𝑇𝐻, 𝑇𝑇}.
For examples: the square of the number of heads or the number of heads
minus the number of tails.
X = {x1 , x 2 , , x n } Finite
or
Activity 1
f X ( x) = P( X = x) where x X ,
f X ( x) = 0 where x X .
01. f X ( x) 0
02. f
for all x
X ( x) = 1 .
126
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
Example 2
Let us consider the example 8.1, suppose that a fair coin is tossed twice
under identical experimental conditions. So that the sample space is given
as,
Let 𝑋 represent the number of heads that can come up. Then the all possible
outcomes of the random variable X (the range of the X) can be given as,
Answer
f : X → [0,1],
1 x=2
4
f X ( x) = 1 x =1
2
1 4 x=0
Activity 2
Let us consider an experiment in which a fair coin is tossed repeatedly under identical
experimental conditions, until a Head (𝐻) is obtained.
FX (x ) = P( X x ) = P( X = u ) = f X (u ) .
u x u x
You may notice that, here we have taken the sum of probability mass values
for all values u taken by X for which 𝑢 is less than or equal to 𝑥 (𝑢 ≤ 𝑥).
following properties.
04. For a b ,
P(a X b) = FX (b) − FX (a )
Example 3
Let us suppose that, the random variable 𝑋 takes on only a finite number of
values ( X = x1 , x 2 ,..., x n )
Then according to the definition, we can define CDF of the random variable
𝑋 as follows.
128
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
0 − x x1
f (x ) x1 x x 2
X 1
Fx (x ) = f X (x1 ) + f X (x 2 ) x 2 x x3
f X (x1 ) + f X (x 2 ) + ... + f X (x n ) xn x
Example 4
Consider the example 8.2, there we have found the probability mass
function for the random variable 𝑋: Number of heads appear when a fair
coin tosses twice.
f : X → [0,1],
1 x=2
4
f X (x) = 1 x =1
2
4
1 x=0
Now find the cumulative distribution function for the random variable 𝑋.
Answer
F : X → [0,1],
0 x0
1
4 x0
FX ( x ) = 1 + 1 x 1
4 2
4+
1 1 +1
2 4
x2
1 x2
Note:
Then we know that for any real value x, if x x1 , then FX (x ) = 0 and for
x x1 , FX (x ) = f X (xi )
x1 x
With this definition we can see that f X (xi ) = FX (xi ) − FX (xi −1 ) i = 2,3,...
The key idea is that the functions f X and /or FX can be used to describe the
probability distribution of the random variable 𝑋.
Example 5
Consider the example 8.2, there we have found the probability mass
function for the random variable 𝑋: Number of heads appear when a fair
coin tosses twice as follows.
f : X → [0,1],
1 x=2
4
f X ( x) = 1 x =1
2
1 4 x=0
In example 4 we have found the CDF for the random variable 𝑋 as,
130
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
F : X → [0,1],
0 x0
1
4 x0
FX ( x) = 1 + 1 x 1
4 2
14 + 1 +1
2 4
x2
1 x0
Now we can draw the graph of the PMF and CDF for random variable as
Figure 8.1.
Figure 8.1 Graphical representation of PMF and CDF for the random variable X
discussed in Example 8.1
Activity 3
Draw the graphs of PMF and CDF for the random variable discussed in Activity 2.
x
FX ( x ) = P ( X x ) = f X (u)du where (− x ) .
−
1. f X ( x) 0
2. f X ( x)dx = 1
−
Here f X (x) is not provided the 𝑃(𝑋 = 𝑥) as in discrete case. The density
By analogy with the discrete case, let the range of the random variable 𝑋 is
given as X = {x : f X ( x) 0} .
differentiable,
d
f X ( x) = {FX (t )}
dt t=x
132
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
4. For a b ,
P(a X b) = P(a X b) = P(a X b) = P(a X b) = FX (b) − FX (a )
𝑏 𝑎
= ∫ 𝑓𝑋 (𝑥)𝑑𝑥 − ∫ 𝑓𝑋 (𝑥)𝑑𝑥
−∞ −∞
𝑏
= ∫ 𝑓𝑋 (𝑥)𝑑𝑥
𝑎
Example 6
The lifetime of a machine part (𝑋 in months) has a continuous distribution
on the interval (0, 40) with PDF,
1
0 x 40
f X ( x) = (10 + x) 2
0
otherwise
Find the probability that the lifetime of a machine part will lie between 10 to
20 months.
Answer
20
P(10 x 20) = f X ( x)dx
10
1
Since f X ( x) = w hen 0 x 40 ,
(10 + x) 2
20
1
P(10 x 20) = (10 + x) 2 dx
10
−1 20
(10 + x) (10 + 20) −1 (10 + 10) −1
= = −
−2 10
−2 −2
−1
(20) (30) −1 1 1 1
= − = −
2 2 2 20 30
1
=
120
Since f X ( x) 0 the curve cannot fall below the x axis. The entire area
bounded by curve and the x axis must be equal to one, because,
134
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
Here we can see that shaded area represents the P( X x0 ) and here we
Example 7
Suppose the PDF of the magnitude of a dynamic load on a bride 𝑋 (in
newtons) is given by,
1
x
2
0 x2
f X ( x) = 4
0 otherwise
Answer
1
= f X ( x)dx
−
0 1
1 2
= 0dx + 4 x dx
− 0
1
So it is equal to, 1 x3
= 0+
4 3 0
1 13
= −0
4 3
1
=
12
- =
Here (a) of the Figure 8.5 represent 𝐹𝑋 (𝑏) and 𝐹𝑋 (𝑎) represent at the part
(b). Then we know that,
136
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
Thus, in the part (c) of the Figure 8.5, represent the area bounded curve of
he 𝐹𝑋 (𝑥) and 𝑥 = 𝑧, 𝑎𝑛𝑑 𝑥 = 𝑏 and the 𝑥 axis.
8.4.1 Expectation
The expected value (or expectation or mathematical expectation) of a
random variable represent its average value.
E( X ) = xf X ( x) = xf X ( x)
x =− xX
E ( X ) = x1 P( X = x1 ) + x2 P( X = x2 ) + ... + xn P( X = xn )
n n
= x j P( X = x j ) = x j f X ( x j )
j =1 j =1
Activity 4
Six lots of components are ready to be shipped by a certain supplier. The number of
depictive components in each lot is recorded as follows:
Lot 1 2 3 4 5 6
No of defectives 4 2 2 2 2 0
One of these lots is to be randomly selected for shipment to a customer. Let 𝑌 be the
number of defectives in selected lot. Find the expected number of defectives 𝐸(𝑌) that
can be in selected lot.
E ( X ) = xf X ( x)dx = xf X ( x)dx
−
X
Activity 5
The warranty on a machine specifies that it will be replaced at failure of it. The random
variable 𝑋 denote the lifetime of the machine in years. The probability density function
of the random variable 𝑋 is given as,
1
0 x5
f X ( x) = 5
0 Otherwise
138
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
Example 9
The probability density function of a random variable 𝑋 is given as,
1
0 x 10
f X ( x) = 10
0 Otherwise
Answer
0 10 1 ∞
= ∫−∞ 𝑥0𝑑𝑥+∫0 𝑥 10 𝑑𝑥 + ∫0 𝑥0𝑑𝑥
10
10 1 𝑥2
=∫0 𝑥 10 𝑑𝑥 = 10×2|
0
102
= −0
20
=5
Then,
𝐸(𝐺) = 3𝐸(𝑥) + 5
=3×5+5
= 20.
Mean Mean
(a) (b)
Figure 8.5 (a) The larger the variance: the further the individual cases
are distributed from the mean (b). The smaller the variance: the closer
the individual scores are to the mean.
V ( X ) = E[( X − ) 2 ]
V ( X ) = E[( X − ) 2 ]
= E ( X 2 − 2 X + 2 )
= E ( X 2 ) − 2E ( X ) + 2
= E ( X 2 ) − 2 2 + 2 = E ( X 2 ) − 2
140
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
So, we can see that for the variance we have a shorted formula:
V ( X ) = E( X 2 ) − [ E( X )]2
V (G) = a 2V ( X )
Note that if a random variable 𝑋 has a certain dimension, then the variance
of it, has squire of the dimension of 𝑋. But standard deviation of a random
variable 𝑋 has the same dimension as the random variable 𝑋. Therefore
when we discuss about a random variable instead of variance of it, we will
talk about the standard deviation of it to discuss about the dispersion of the
random variable.
Example 10
Find the variance and standard deviation of the random variable discussed
in Activity 8.4.
Answer
In Activity 4, the random variable Y, has the probability mass function as,
follows,
𝑌 0 2 4
In Activity 4, we have found that the 𝐸(𝑌) = 2. Now we want to find 𝑉(𝑌)
and by definition V (Y ) = E(Y 2 ) − [ E(Y )]2 .
2 1 32 + 16
= 0 + 4 × + 16 × =
3 6 6
48
= =8
6
Then,
= 8 − 22 = 4
Activity 6
Find the variance and standard deviation of the random variable discussed in Activity 5.
Activity 1
142
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
3. Since the all possible outcomes for the random variable 𝑋 are countably
infinite, 𝑋 is a discrete random variable.
Activity 2
Here a fair coin is tossed repeatedly under identical experimental conditions, until a
head (H) appear.
H (𝑋 = 1)
0.5
H (𝑋 = 2)
0.5 0.5
T
H (𝑋 = 3)
0.5
0.5
st
T H (𝑋 = 4)
1 Trail 0.5
0.5
T
nd
2 Trail 0.5
T…
rd
3 Trail
4th Trail …
Figure 8.6: Tree diagram to compute probability mass function
According to the tree diagram we can see that,
𝑃(𝑋 = 1) = The probability of obtain first head at the 1st trail. = 0.5
𝑃(𝑋 = 2) = The probability of obtain first head at the 2nd trail.= 𝑃(𝑇𝐻) = 𝑃(𝑇)𝑃(𝐻) =
0.5 × 0.5 = 0.52
𝑃(𝑋 = 3) = The probability of obtain first head at the 3rd trail.= 𝑃(𝑇𝑇𝐻) = 𝑃(𝑇)𝑃(𝐻) =
0.5 × 0.5 × 0.5 = 0.53
𝑃(𝑋 = 𝑛) = The probability of obtain first head at the nth trail.= 𝑃(𝑇𝑇𝑇 … 𝑇𝐻) =
𝑃(𝑇)𝑃(𝑇)𝑃(𝑇) … 𝑃(𝑇) 𝑃(𝐻) = 0.5 × 0.5 … 0.5 × 0.5 = 0.5𝑛
⏟
𝑛−1 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑃(𝑇)
Then we can say the probability mass function of the random variable 𝑋 as,
Activity 3
Here the random variable 𝑋 have the values {1,2.3,4, … } with the probability mass
function 𝑓𝑋 (𝑥) = (0.5)𝑥 𝑓𝑜𝑟 𝑥 ∈ 𝑋.
Activity 4
Lot 1 2 3 4 5 6
No of 0 2 2 2 2 4
defectives
Then all the possible values for the random variable Y is define as,
1
𝑃(𝑌 = 0 ) =
6
144
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
4 2
𝑃(𝑌 = 2 ) = =
6 3
1
𝑃(𝑌 = 1 ) =
6
Therefore, we have, the probability mass function for random variable 𝑌 as,
𝑌 0 2 4
𝑓𝑌 (𝑦) 1 2 1
6 3 6
Table 8.5 The probability mass function for the random variable 𝑌
Now we are asking about the expectation of the random variable 𝑌. That is
2 1
=0+2∗ +4×
3 6
4 4 12
= + = =2
3 6 6
Therefore. The expected number of defective components in the selected lot =2.
Activity 5
Here the random variable 𝑋= Life time of the machine (in years)
1
0 x5
f X ( x) = 5
0 Otherwise
Now we are asking about the expected time of the replacement of the machine. That is
the lifetime of the machine. That is,
∞ 0 5 1 ∞
𝐸(𝑋) = 𝜇 = ∫−∞ 𝑥𝑓𝑋 (𝑥)𝑑𝑥 = ∫−∞ 𝑥 × 0𝑑𝑥 + ∫0 𝑥 𝑑𝑥 + ∫5 𝑥 × 0𝑑𝑥
5
5 5
1 𝑥2 25 − 0 5
= ∫ 𝑥 𝑑𝑥 = | = = = 2.5
0 5 10 0 10 2
Therefore, the expected time of the replacement of the machine is 2.5 years.
Activity 6
In Activity 8.5, we have found that the 𝐸(𝑋) = 𝜇 = 2.5. Now we want to find 𝑉(𝑋) and
by definition V ( X ) = E ( X 2 ) − [ ]2 .
∞ 0 5 ∞
1
𝐸(𝑋 2 ) = 𝜇 = ∫ 𝑥 2 𝑓𝑋 (𝑥)𝑑𝑥 = ∫ 𝑥 2 × 0𝑑𝑥 + ∫ 𝑥 2 𝑑𝑥 + ∫ 𝑥 2 × 0𝑑𝑥
−∞ −∞ 0 5 5
5 5
1 𝑥3 125 − 0 25
= ∫ 𝑥 2 𝑑𝑥 = | = =
0 5 15 0 15 3
Then,
25 5 2 25 25 25
= −( ) = − = .
3 2 3 4 12
25
Then standard deviation of the random variable 𝑋 = √𝑉(𝑌) = √ .
12
Summary
X : S → ℝ.
146
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
f X ( x) = P( X = x) where x X ,
f X ( x) = 0 where x X .
03. f X ( x) 0
04. f
for all x
X ( x) = 1 .
FX (x ) = P( X x ) = P( X = u ) = f X (u )
u x u x
.
You may notice that, here we have taken the sum of probability mass
values for all values u taken by X for which 𝑢 is less than or equal
to 𝑥 (𝑢 ≤ 𝑥).
08. For a b ,
P(a X b) = FX (b) − FX (a )
x
FX ( x ) = P ( X x ) = f X (u)du where (− x ) .
−
3. f X ( x) 0
4. f X ( x)dx = 1
−
Here f X (x) is not provided the 𝑃(𝑋 = 𝑥) as in discrete case. The density
148
©2020, The Open University of Sri Lanka
Session 1: Probability Distributions
differentiable,
d
f X ( x) = {FX (t )}
dt t=x
8. For a b ,
P(a X b) = P(a X b) = P(a X b) = P(a X b) = FX (b) − FX (a )
𝑏 𝑎
= ∫ 𝑓𝑋 (𝑥)𝑑𝑥 − ∫ 𝑓𝑋 (𝑥)𝑑𝑥
−∞ −∞
𝑏
= ∫ 𝑓𝑋 (𝑥)𝑑𝑥
𝑎
Learning Outcomes
At the end of this session the student should be able to
150
©2020, The Open University of Sri Lanka
Session 2: Discrete Random Variables
Session 9
Discrete Random Variables
Contents
Introduction, p 151
9.1 Discrete Uniform Distribution, p 152
9.2 Bernoulli Distribution , p 153
9.3 Binomial Distribution, p 155
9.4 Geometric Distribution, p 159
9.5 Hyper Geometric Distribution, p 161
9.6 Negative Binomial Distribution, p 164
9.7 Poisson Distribution, p 166
Answer to the Activities, p 168
Summary, p 170
Learning Outcomes, p 171
Introduction
In session 08 we have already discussed about the random variables and the
definitions of probability mass function/ probability distribution function,
cumulative distribution function, expectation and the variance.
1
𝑓𝑋 (𝑥) = {𝑛 𝑥 ∈ 𝑋 = {1,2,3, … 𝑛}
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Example 1
Roll a die let 𝑋 denote the number appear. We wish to find the probability
of getting 6.
Answer
We have 𝑋 = {1, 2, 3, 4, 5, 6}
And 𝑋~𝑈𝑛𝑖𝑓𝑜𝑟𝑚(6)
So, the probability mass function associate with the random variable 𝑋 is
given as,
1
𝑓𝑋 (𝑥) = {6 𝑥 ∈ 𝑋 = {1,2,3,4,5,6}
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
1
Now we want to find 𝑃(𝑋 = 6) and it is equal to, 𝑓𝑋 (6) = 6.
152
©2020, The Open University of Sri Lanka
Session 2: Discrete Random Variables
𝑛 𝑛 𝑛
2) 2
1 1 2
1 𝑛(𝑛 + 1)(2𝑛 + 1)
𝐸(𝑋 = ∑ 𝑥 𝑝(𝑋 = 𝑥) = ∑ 𝑥 = ∑ 𝑥2 =
𝑛 𝑛 𝑛 6
𝑥=1 𝑥=1 𝑥=1
(𝑛 + 1)(2𝑛 + 1)
𝐸(𝑋 2 ) =
6
(𝑛 + 1)(2𝑛 + 1) 𝑛+1 2
𝑉(𝑋) = −( )
6 2
𝑛2 −1
By simplifying above equation, we can show that the 𝑉(𝑋) = .
12
𝑝 𝑥=1
𝑓𝑋 (𝑥) = {
1−𝑝 =𝑞 𝑥=0
Example 2
𝜇 = 1𝑝 + 0𝑞 = 𝑝
Thus, to find variance of the Bernoulli random variable, first we must find
𝐸(𝑋 2 ),
𝑉(𝑋) = 𝑝 − 𝑝2 = 𝑝(1 − 𝑝) = 𝑝𝑞
Activity 1
This Bernoulli random variable is important, since it is used to discuss some other
discrete random variables.
154
©2020, The Open University of Sri Lanka
Session 2: Discrete Random Variables
𝑡𝑟𝑎𝑖𝑙𝑠
Example 3
Suppose that we have, 𝑛 = 3 independent and identical trails with
successive probability of 𝑝. Then there are eight possible outcomes for the
experiment: (As in Table 9.1)
𝑋 3 2 2 2 1 1 1 0
Let us assign the probabilities for each out comes given in Table 9.1.
= (1 − 𝑝). 𝑝. 𝑝 = 𝑞𝑝2
𝑋 3 2 2 2 1 1 1 0
Probabilities 𝑝3 𝑝2 𝑞 𝑝2 𝑞 𝑝2 𝑞 𝑝𝑞 2 𝑝𝑞 2 𝑝𝑞 2 𝑞3
As noted in Table 9.1 and Table 9.2, the possible values for the random
variable 𝑋 are 0, 1, 2, 𝑜𝑟 3. So, now we interest about the probability mass
function of the random variable 𝑋.
0 (𝐹𝐹𝐹) 1 𝑞3
3 (𝑆𝑆𝑆) 1 𝑝3
Here we can see that each probability associated with 𝑋 𝑣alues has the form,
𝑁𝑜 𝑜𝑓 𝑤𝑎𝑦𝑠 𝑝𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓
𝑓𝑋 (𝑥) = 𝑃(𝑋 = 𝑥) = [ 𝑡𝑜 𝑐ℎ𝑜𝑜𝑠𝑒 𝑥 ] × [ 𝑎𝑛𝑦 𝑝𝑎𝑟𝑡𝑖𝑐𝑢𝑙𝑎𝑟 ]
𝑜𝑓 𝑡ℎ𝑒 𝑛 𝑡𝑟𝑎𝑖𝑙 𝑜𝑢𝑡𝑐𝑜𝑚𝑒 𝑤𝑖𝑡ℎ 𝑋 = 𝑥.
With the following theorem we can define the probability mass function in
more precise way.
156
©2020, The Open University of Sri Lanka
Session 2: Discrete Random Variables
Theorem:
Example 4
We often, write: 𝑋~𝐵𝑖𝑛(𝑛, 𝑝) to indicate that 𝑋 follows binomial
distribution based on 𝑛 number of independent and identical trails with
successive probability 𝑝.
(3) The probability of success, denoted by 𝑝, does not change from trial to
trial.
Example 5
Flip a fair coin 4 times. What is the probability that I get two tails?
As the first step we must identify the random variable which is associated
with this problem. To see is it a binomial experiment we check the
properties of Binomial experiment.
So that is ,
4!
= 0.52 (1 − 0.5)4−2
2! (4 − 2)!
4×3×2×1
= 0.54
2 × 1 × (2 × 1)
= 2 × 3 × 0.54 = 0.375
Activity 2
60% of people who purchase sports cars are men. If 10 sports car owners are
randomly selected, find the probability that exactly 7 are men.
158
©2020, The Open University of Sri Lanka
Session 2: Discrete Random Variables
𝐸(𝑌) = 𝜇𝑌 = 𝑝
So, the expected number of success on any single trail is 𝑝. Since the
Binomial random variable consists with 𝑛 number of trails, intuition suggest
that, for 𝑋~𝐵𝑖𝑛(𝑛, 𝑝), the expected value 𝐸(𝑋) = 𝜇𝑋 = 𝑛𝑝 where it is equal
to the number of trails into expectation of success to any single trail.
Activity 3
80% of people who purchase pet insurance are women. If 9 pet insurance owners are
randomly selected, find the probability that exactly 6 are women.
So, the possible outcomes of the random variable 𝑋 are {1,2,3, … }. If the
probability of success of any Bernoulli trail is 𝑝, we can define the
probability mass function of random variable 𝑋 as follows.
Example 6
Products produced by a machine have a 3% defective rate. What is the
probability that the first defective occurs in the fifth item inspected?
Answer
𝑓𝑋 (𝑥) = (1 − 𝑝)𝑥−1 𝑝
𝑓𝑋 (5) = 0.0266
𝐸(𝑋) = 𝜇 = 1𝑝 + 2𝑞𝑝 + 3𝑞 2 𝑝 + 4𝑞 3 𝑝 + ⋯
1
By simplifying above equation, we can show that the 𝐸(𝑋) = 𝜇 = 𝑝.
160
©2020, The Open University of Sri Lanka
Session 2: Discrete Random Variables
Example 7
Four roads start from a junction. Only one of them leads to a mall. The
remaining roads ultimately lead back to the starting point. A person not
familiar with these roads wants to try the different roads one by one to reach
the mall. What is the probability that his second attempt will be correct?
Answer
𝑓𝑋 (𝑥) = (1 − 𝑝)𝑥−1 𝑝
𝑓𝑋 (2) = 0.1875
Activity 4
A fair coin is tossed a number of times till it tosses on a head. What is the probability
the coin tossing head on the 3rd toss?
We can list the assumptions leading to the Hyper geometric distribution are as
follows.
Why couldn’t I just use the binomial distribution? The trials are not
independent, and the probability of success is not the same trial to trial.
Because the sampling is done without replacement the probability of selecting a
blue ball chances conditional on the color of the balls already selected.
Here in the urn we have 8 balls so population size(𝑁) is 8. The sample size
(𝑛) is 3 and the number of successes(no of blue balls) (𝑀) in the population
is 4and failures 𝑁 − 𝑀 = 4. Now we are asking about 𝑥 = 2.
Because all the outcomes are equally likely,
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 ℎ𝑎𝑣𝑖𝑛𝑔 𝑋 = 2
𝑃(𝑋 = 2) =
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠
No of possible outcomes in the experiment is number of ways of selecting 3
8
balls out of 8 balls. That is 𝐶3 . To count the number of outcomes having
4 4
X=2, note that there are 𝐶2 ways of selecting two blue balls and 𝐶1
ways of selecting a red ball to fill out the sample.
4 𝐶 ×4 𝐶 20
2 1
𝑃(𝑋 = 2) = 8𝐶 .
= 56 = 0.351.
3
With the following theorem we can discuss the probability mass function of
a random variable X which follows hyper geometric distribution more
precisely.
162
©2020, The Open University of Sri Lanka
Session 2: Discrete Random Variables
Theorem
Activity 5
A box of 20 marbles contains 15 blue and 5 red. You need to draw a lot of 10 marbles
at random. Find the probability of drawing 6 blue marbles in the lot drawn.
𝑀
𝐸(𝑋) = 𝑛 ×
𝑁
𝑁−𝑛 𝑀 𝑀
𝑉(𝑋) = ( ) × 𝑛 × × (1 − )
𝑁−1 𝑁 𝑁
𝐸(𝑋) = 𝑛𝑝
𝑁−𝑛
𝑉(𝑋) = ( ) × 𝑛𝑝(1 − 𝑝)
𝑁−1
The above expression shows that the means of the binomial and hyper
geometric random variables are equal, whereas the variance of the two
𝑁−𝑛
random variables differ by ( 𝑁−1 ) factor, often called the finite population
correction factor.
Theorem
𝑥+𝑟−1 𝑟
𝑓𝑋 (𝑥) = 𝑃(𝑋 = 𝑥) = ( ) 𝑝 (1 − 𝑝)𝑥
𝑟−1
Example 9
164
©2020, The Open University of Sri Lanka
Session 2: Discrete Random Variables
𝑟 = 5, 𝑝 = 0.2 and 𝑥 = 10
𝑥+𝑟−1 𝑟
𝑓𝑋 (𝑥) = 𝑃(𝑋 = 𝑥) = ( ) 𝑝 (1 − 𝑝)𝑥
𝑟−1
10 + 5 − 1
𝑓𝑋 (𝑥) = 𝑃(𝑋 = 10) = ( ) 0.25 (1 − 0.2)10
5−1
𝑓𝑋 (𝑥) = 𝑃(𝑋 = 10) = 0.034
𝑟(1−𝑝)
By simplifying above equation, we can show that the 𝐸(𝑋) = 𝜇 = 𝑝
𝑟(1 − 𝑝)
𝑉(𝑋) =
𝑝2
Activity 6
Bob is a high school basketball player. He is a 70% free throw shooter. That means his
probability of making a free throw is 0.70. During the season, what is the probability that
Bob makes his third free throw on his fifth shot?
Theorem
𝑒 −𝜆 𝜆𝑥
𝑝(𝑋 = 𝑥; 𝜆) = 𝑥 = 0,1,2, ..
𝑥!
The value of 𝜆 is frequently a rate per unit time or per unit area.
Example 10
Births in a hospital occur randomly at an average rate of 1.8 births per hour.
What is the probability of observing 4 births in a given hour at the hospital?
λ = 1.8
𝑒 −1.8 1.84
𝑝(𝑋 = 4; 𝜆 = 1.8) =
4!
Example 11
Let X denote the number of creatures of a particular type captured in a trap
during a given time period. Suppose that X has a Poisson distribution with
𝜆 = 4.5,
So on average traps will contain 4.5 creatures. What is the probability that a
trap contains exactly five creatures?
λ = 4.5
166
©2020, The Open University of Sri Lanka
Session 2: Discrete Random Variables
𝑒 −4.5 4.55
𝑝(𝑋 = 5; 𝜆 = 4.5) =
5!
∞
𝑒 −𝜆 𝜆𝑥
𝐸(𝑋) = ∑
(𝑥 − 1)!
𝑥=1
∞
𝑒 −𝜆 𝜆𝑙+1
𝐸(𝑋) = ∑
𝑙!
𝑙=0
∞
𝑒 −𝜆 𝜆𝑙
𝐸(𝑋) = 𝜆 ∑
𝑙!
𝑙=0
𝐸(𝑋) = 𝜆 ∗ 1
𝐸(𝑋) = 𝜆
𝑉(𝑋) = 𝜆
Activity 7
A man was able to complete 3 files a day on an average. Find the probability that he
can complete 5 files the next day.
Activity 1
1
𝑃(𝑌 = 1) =
6
Activity 2
Then 𝑌 is a binomial random variable associated with 10 trials and 0.6 of successive
probability.
𝑌~𝐵𝑖𝑛(10,0.6)
10!
= 0.67 (1 − 0.6)10−7
7! (10 − 7)!
= 0.215
168
©2020, The Open University of Sri Lanka
Session 2: Discrete Random Variables
Activity 3
Then 𝑌 is a binomial random variable associated with 9 trials and 0.8 of successive
probability.
𝑌~𝐵𝑖𝑛(9,0.8)
𝑃(𝑌 = 6) =9 𝐶6 𝑝6 (1 − 𝑝)9−6
9!
= 0.86 (1 − 0.8)9−6
6! (9 − 6)!
= 0.176
Activity 4
1
Here the probability of getting head is .
2
𝑓𝑋 (𝑥) = (1 − 𝑝)𝑥−1 𝑝
𝑓𝑋 (3) = 0.125
Activity 5
𝑀
𝐶𝑥 ×𝑁−𝑀 𝐶𝑛−𝑥
𝑓𝑋 (𝑥) = 𝑃(𝑋 = 𝑥) = 𝑁𝐶 .
𝑛
15
𝐶6 ×20−15 𝐶10−6
𝑓𝑋 (6) = 𝑃(𝑋 = 6) = 20 𝐶
10
Activity 6
To solve this problem, we enter these values into the negative binomial formula.
𝑓𝑋 (𝑥) = 𝑃(𝑋 = 𝑥) = (𝑥 + 𝑟 − 1) 𝑝𝑟 (1 − 𝑝)
𝑥
𝑟−1
Thus, the probability that Bob will make his third successful free throw on his fifth shot
is 0.18522.
Activity 7
λ=3
𝑒 −3 35
𝑝(𝑋 = 5; 𝜆 = 3) =
5!
𝑝(𝑋 = 5; 𝜆 = 3) = 0.1008
Summary
• If a random variable 𝑋 follows discreate uniform distribution then
the probability mass function is given as.
1
𝑓𝑋 (𝑥) = {𝑛 𝑥 ∈ 𝑋 = {1,2,3, … 𝑛}
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
170
©2020, The Open University of Sri Lanka
Session 2: Discrete Random Variables
Learning Outcomes
At the end of this session, you should be able to
Review Questions
172
©2020, The Open University of Sri Lanka
Session 3: Continuous Random Variable
Session 10
Continuous Random Variables
Contents
Introduction, p 173
10.1 The Continuous uniform distribution, p 174
10.2 Normal distribution, p 177
10.3 Standard normal distribution, p 179
10.4 Exponential distribution, p 184
10.5 Gamma distribution, p 185
Answer to the Activities, p 186
Summary, p 189
Learning Outcomes, p 190
Introduction
As discussed in Section 8 "Random Variables" in session 9 "Discrete
Random Variables", a random variable is called continuous if its set of
possible values contains a whole interval of decimal numbers. In this session
we investigate such random variables.
1
𝑓𝑋 (𝑥) = {𝑏 − 𝑎 𝑤ℎ𝑒𝑛 𝑎 ≤ 𝑥 ≤ 𝑏
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Due to the particularly simple form of this PDF we can also write down
explicitly a formula for the cumulative distribution function (CDF):
0 𝑓𝑜𝑟 𝑥 < 𝑎
𝑥−𝑎
𝐹𝑋 (𝑥) = { 𝑓𝑜𝑟 𝑎 ≤ 𝑥 ≤ 𝑏
𝑏−𝑎
1 𝑥>𝑏
Example 1
A random variable 𝑋 has the uniform distribution on the interval [0,1] : the
174
©2020, The Open University of Sri Lanka
Session 3: Continuous Random Variable
Density function is
1 1
𝑓𝑋 (𝑥) = 𝑏−𝑎 = 1−0 = 1 for 0 ≤ 𝑥 ≤ 1
1. 𝑃(𝑋 > 0.75) is the area of the rectangle of height 1 and base length
1 − 0.75 = 0.25 ,
Hence is base × height = (0.25) · (1) = 0.25. See Figure 10.3 (a)
2. 𝑃(𝑋 ≤ 0.2) is the area of the rectangle of height 1 and base length
0.2 − 0 = 0.2 , hence is base × height = (0.2) · (1) = 0.2. See
Figure 10.3 (b).
3. 𝑃(0.4 < 𝑋 < 0.7) is the area of the rectangle of height 1 and length
0.7 − 0.4 = 0.3 , hence is base × height = (0.3) · (1) = 0.3. See
Figure 10.3 (c).
If a random variable has a uniform distribution over the interval, [𝑎, 𝑏], then
we use the notation 𝑋~𝑈𝑛𝑖𝑓(𝑎, 𝑏) to represent it.
Activity 1
A man arrives at a bus stop at a random time (that is, with no regard for the scheduled
service) to catch the next bus. Buses run every 30 minutes without fail, hence the next
bus will come any time during the next 30 minutes with evenly distributed probability (a
uniform distribution). Find the probability that a bus will come within the next 10
minutes.
Now we are going to know about the expectation and other distributional
parameters for a random variable X which is uniformly distributed
over [𝑎, 𝑏].
∞ 𝑏 𝑏
1 𝑥2
𝐸(𝑋) = ∫ 𝑥𝑓𝑋 (𝑥)𝑑𝑥 = ∫ 𝑥 𝑑𝑥 = |
−∞ 𝑎 (𝑏 − 𝑎) 2(𝑏 − 𝑎) 𝑎
176
©2020, The Open University of Sri Lanka
Session 3: Continuous Random Variable
(𝑏 2 − 𝑎2 ) (𝑏 + 𝑎)
= =
2(𝑏 − 𝑎) 2
(𝑏+𝑎)
Thus, the mean 𝜇 or expectation of random variable 𝑋 is .
2
(𝑏−𝑎)2
The variance of the random variable 𝑋 is equal to .
12
(𝑥−𝜇)2
1
𝑓𝑋 (𝑥) = 𝑒 2𝜎2 for−∞ ≤ 𝑥 ≤ ∞
√2𝜋𝜎
Here 𝑒 denote the natural logarithm system and has approximate value
2.71828 and 𝜋 has approximate value 3.14159.
Example 2
The height 𝑋 of a randomly selected 25-year-old man is a normal random
variable with mean 𝜇 = 69.75 and standard deviation 𝜎 = 2.59. Sketch a
qualitatively accurate graph of the density function for 𝑋. Find the
probability that a randomly selected 25-year-old man is more than 69.75
Inches tall.
Answer
The distribution of heights looks like the bell curve in Figure 10.5. The
important point is that it is centered at its mean, 69.75, and is symmetric
about the mean.
178
©2020, The Open University of Sri Lanka
Session 3: Continuous Random Variable
Since the total area under the curve is 1, by symmetry the area to the right of
69.75 is half the total, or 0.5. But this area is precisely the probability
𝑃(𝑋 > 69.75), the probability that a randomly selected 25-year-old man is
more than 69.75 inches tall.
𝑧2
1
𝑓𝑍 (𝑧) = 𝑒 2 for−∞ ≤ 𝑧 ≤ ∞
√2𝜋𝜎
To compute probabilities for 𝑍 we will not work with its density function
directly but instead read probabilities out of Cumulative Normal Probability
table in Appendix 1. The tables are tables of cumulative probabilities; their
entries are probabilities of the form Φ(𝑎) = 𝑃 (𝑍 ≤ 𝑎) . Figure 10.7,
Illustrates the types of cumulative area (probability) tabulated in
Appendix1Table1.
The use of the tables will be explained by the following series of examples.
Example 3
Find the probabilities indicated, whereas always 𝑍 denotes a standard
Normal random variable.
Answer
Figure 10.8 shows how this probability is read directly from the table
without any computation required. The digits in the ones and tenths places
of 1.48, namely 1.4, are used to select the appropriate row of the table; the
hundredths part of 1.48, namely 0.08, is used to select the appropriate
column of the table. The four-decimal place number in the interior of the
180
©2020, The Open University of Sri Lanka
Session 3: Continuous Random Variable
table that lies in the intersection of the row and column selected, 0.9306, is
the probability sought: 𝑃 (𝑍 < 1.48) = 0.9306.
b. Because the events 𝑍 > 1.60 and 𝑍 ≤ 1.60 are complements, the
Probability Rule for Complements implies that
P (Z ≤ 1.60) = P (Z < 1.60), which we know how to find from the table. The
number in the row with heading 1.6 and in the column with heading 0.00 is
0.9452. Thus 𝑃 (𝑍 < 1.60) = 0.9452 so,
Figure 10.9, illustrates the ideas geometrically. Since the total area under the
Curve is 1 and the area of the region to the left of 1.60 is (from the table)
0.9452, the area of the region to the right of 1.60 must be 1 − 0.9452 =
0.0548.
Activity 2
𝜇 shifts the maen from 𝜇 to zero, and then dividing by 𝜎 scales the variable
so that the standard deviation is 1 rather than 𝜎.
Proposition
(𝑋 − 𝜇)
𝑍=
𝜎
Thus If we want to find 𝑃(𝑎 < 𝑋 < 𝑏) for a normally distributed random
variable 𝑋 with mean 𝜇 and variance 𝜎, we may use standardizing as,
182
©2020, The Open University of Sri Lanka
Session 3: Continuous Random Variable
Example 4
Let 𝑋 be a normal random variable with mean 𝜇 = 10 and standard
deviation 𝜎 = 2.5. Compute the following probabilities.
a)
𝑃 (𝑋 < 14)
14 − 𝜇
= 𝑃 (𝑍 < )
𝜎
14 − 10
= 𝑃 (𝑍 < )
2.5
= 𝑃 (𝑍 < 1.60)
Figure 10.10: Z-value Calculation
=0.9452
8– 𝜇 14 – 𝜇
=𝑃 ( <𝑍 < )
𝜎 𝜎
8 – 10 14 – 10
=𝑃 ( <𝑍 < )
2.5 2.5
=0.7333
Activity 3
The lifetimes of the tread of a certain automobile tire are normally distributed with mean
37,500 miles and standard deviation 4,500 miles. Find the probability that the tread life
of a randomly selected tire will be between 30,000 and 40,000 miles.
Example 5
Suppose the response time 𝑋 at a certain on-line computer terminal, has an
exponential distribution with expected response time equal to 5sec. Find the
probability that the response time is at most 10 sec.
184
©2020, The Open University of Sri Lanka
Session 3: Continuous Random Variable
Answer
Since the 𝑋~𝐸𝑥𝑝(𝜆), we know that 𝐸(𝑋) = 1⁄𝜆 and we have given that
the expected response time = 5,
𝜆 = 0.2
𝐸(𝑋) = 𝜇 = 𝛼𝛽 𝑉(𝑋) = 𝜎 2 = 𝛼𝛽 2
Example 6
Suppose that the reaction time 𝑋 of a randomly selected individual to a
certain stimulus has a standard gamma distribution with 𝛼 = 2. Find
𝑃(3 ≤ 𝑋 ≤ 5).
Answer
5
𝑦 2−1 𝑒 −𝑦
𝑃(3 ≤ 𝑋 ≤ 5) = ∫ 𝑑𝑦 𝑤ℎ𝑒𝑟𝑒 Γ(2) = 1
3 Γ(2)
5
𝑦 2−1 𝑒 −𝑦
=∫ 𝑑𝑦 = −𝑦𝑒 −𝑦 |53 − 𝑒 −𝑦 |53
3 1
= 4𝑒 −3 − 6𝑒 −5 = 0.1587
Answers to Activities
186
©2020, The Open University of Sri Lanka
Session 3: Continuous Random Variable
Activity 1
The graph of the density function is a horizontal line above the interval from 0 to 30 and
is the 𝑥-axis everywhere else. Since the total area under the curve must be 1, the
height of the horizontal line is 1/30. See Figure 10.2222. The probability sought is (0 ≤
𝑋 ≤ 10) . By definition, this probability is the area of the rectangular region bounded
above by the horizontal line
𝑓 𝑋 (𝑥) = 1 ∕ 30, bounded below by the 𝑥-axis, bounded on the left by the vertical line
at 0 (the 𝑦-axis), and bounded on the right by the vertical line at
Activity 2
Figure 10.223 "Computing a Probability for an Interval of Finite Length" illustrates the
ideas involved for intervals of this type. First look up the areas in the table that
correspond to the numbers 0.5 (which we think of as 0.50 to use the table) and 1.57.
We obtain 0.6915 and 0.9418, respectively. From the figure it is apparent that we must
take the difference of these two numbers to obtain the probability desired. In symbols,
Figure 10.12
a. The procedure for finding the probability that 𝑍 takes a value in a finite interval whose
endpoints have opposite signs is exactly the same procedure used in part (a), and is
illustrated in Figure
𝑃 (0.5 < 𝑍 < 1.57) = 𝑃 (𝑍 < 1.57) − 𝑃 (𝑍 < 0.50) = 0.9418 − 0.6915 = 0.2503
Activity 3
To make the numbers easier to work with we will choose thousands of miles as the
units. Thus 𝜇 = 37.5, 𝜎 = 4.5, and the problem is to compute 𝑃 (30 < 𝑋 < 40) .
Figure 10.13, illustrates the following computation:
30 − 𝜇 40 − 𝜇
𝑃 (30 < 𝑋 < 40) = 𝑃 ( <𝑍< )
𝜎 𝜎
30 − 37.5 40 − 37.5
= 𝑃( <𝑍< )
4.5 4.5
188
©2020, The Open University of Sri Lanka
Session 3: Continuous Random Variable
Summary
• A random variable 𝑋 with the continuous uniform distribution on the
interval [𝑎, 𝑏] has the probability density function (PDF),
1
𝑓𝑋 (𝑥) = {𝑏 − 𝑎 𝑤ℎ𝑒𝑛 𝑎 ≤ 𝑥 ≤ 𝑏
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
• A continuous random variable 𝑋 is said to have a normal distribution
with parameters 𝜇 and 𝜎 > 0 (or 𝜇 and 𝜎 2 ), if the pdf of 𝑋 is
(𝑥−𝜇)2
1
𝑓𝑋 (𝑥) = 𝑒 2𝜎2 for−∞ ≤ 𝑥 ≤ ∞
√2𝜋𝜎
Here 𝑒 denote the natural logarithm system and has approximate value
2.71828 and 𝜋 has approximate value 3.14159.
𝐸(𝑋) = 𝜇 = 𝛼𝛽 𝑉(𝑋) = 𝜎 2 = 𝛼𝛽 2
Learning Outcomes
At the end of this session, you should be able to
190
©2020, The Open University of Sri Lanka