Wa0001.
Wa0001.
THEORY
Test 1, Friday, 21st March 2024
• Venue: ETF 3
Important Discrete Distributions
• In this section we study the most common discrete random variables
and their probability distributions.
• These probability distributions are very important in the theory of
probability and statistics and are also of practical importance as many
real life phenomena can be modelled using one or more of these
probability distributions.
Common Discrete Probability Distributions
• Bernoulli Distribution
• Binomial Distribution
• The Negative Binomial
• The Geometric Distribution
• The Hyper Geometric
• The Poison Distribution
• Note: Each probability distribution above has a probability mass
function, the mean, the variance and the moment generating
function
Bernoulli Distribution
• Definition: A Bernoulli trial (experiment) is one that possesses the
following properties:
• (a) The trial results in one of the two mutually exclusive outcomes.
• (b) The probability of success on a single trial is 𝑝.
• (c) The r.v. of interest, X, is the success (occurrence) of the event 𝐴, or
failure (non-occurrence) of the event 𝐴, denoted by 𝐴,ҧ of an event.
Bernoulli Random Variable
• Let’s consider an experiment that can result in one of the two
possible outcomes, which we will refer to as success and failure.
• The probability of success is p, 0 < p <1, and the probability of failure
is 1 – p.
• Such an experiment is called a Bernoulli trial.
• The sample space for a Bernoulli trial is:
• S = {success, failure} or S = {s, f}
Example
• Toss a fair coin. Let “head” be a success and “tail” a failure. Then the
experiment is called a Bernoulli trial.
P( X = x) = p q x 1− x
I0,1
Where 𝑞 = 1 − 𝑝
Cont.
P( X = x) = P( X = x) = P( X = 0) + P( X = 1)
x =0 x =0
= p + (1 − p)
=1
Theorem
• Suppose 𝑋 is a Bernoulli r.v. with parameter 𝑝. Then
• 1) E[X] = p
• 2) V[X] = pq = p(1-p)
• 3) MX(t) = pet + q
E[X] = p
V[X] = pq = p(1-p)
MX(t) = pet + q
t
X
2
E ( X 2 ) = M X'' (t = 0) = M X (t)
t
• These are evaluated at 𝑡 = 0.
Exercise
• Let 𝑋 be a Bernoulli probability mass function with
M X (t ) = pe + q
t
=p
M X (t ) = ( pet )
d '' d
dt t =0 dt
= pet
t =0
=p
Now V ( X ) = E ( X 2 ) − [ E ( X )]2
= p − p2
= p (1 − p )
Binomial Experiment
• An experiment that consists of 𝑛 independent Bernoulli trials each
with probability of success p is called a binomial experiment or trial.
• The binomial trial has the following features:
• 1. There are 𝑛 independent Bernoulli trials,
• 2. 𝑛 is a fixed positive integer,
• 3. The probability of success on a single trial is p and remains the
same from trial to trial. The probability of failure is q = 1 – p
• 4. The trials are independent
Cont.
• Let the random variable X be the total number of successes in a
binomial experiment. Then X is called a binomial r.v. with parameters
𝑛 𝑎𝑛𝑑 𝑝, and we write 𝑋~𝐵𝑖𝑛𝑜𝑚(𝑛, 𝑝) in short.
k
• Where 𝑃𝑋 𝑘 = 𝑝𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑘 𝑠𝑢𝑐𝑐𝑒𝑠𝑠
• 𝑛 = 𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑖𝑧𝑒/𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑟𝑖𝑎𝑙𝑠
• 𝑝 = 𝑝𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑠𝑢𝑐𝑐𝑒𝑠𝑠
• 1 − 𝑝 = 𝑞 = 𝑝𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑓𝑎𝑖𝑙𝑢𝑟𝑒
• 𝑘 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑠𝑢𝑐𝑐𝑒𝑠𝑠𝑒𝑠
𝑛
• = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑤𝑎𝑦𝑠 𝑡𝑜 𝑜𝑏𝑡𝑎𝑖𝑛 𝑘 𝑠𝑢𝑐𝑐𝑒𝑠𝑠𝑒𝑠 𝑖𝑛 𝑛 𝑡𝑟𝑖𝑎𝑙𝑠
𝑘
Cont.
• The Binomial distribution is called so because the probabilities are the
terms in the binomial expansion of 𝑝 + 𝑞 𝑛
• Binomial Theorem:
n
n x n− x
( a + b) = p q
n
x =0 x
Cont.
• The binomial distribution is a legitimate probability distribution. That
is,
• (a) P (k ) 0
X
n
• (b) P ( k ) = 1,
k =0
X
• Try it!
Proof
n n
n x
P( X = x) = p (1 − q )
n− x
x =o x =0 x
= p + (1 − p ) by binomial theorem
n
= p + 1 − p = 1
n
Cont.
• Given the probability distribution of a binomial distribution, evaluate
the following probabilities when 𝑛 = 5 𝑎𝑛𝑑 𝑝 = 0.3.
• a)𝑃 𝑋 ≥ 4 ,
• 𝑏) 𝑃 0 ≤ 𝑋 < 3 ,
• 𝑐) 𝑃(𝑋 ≤ 4)
Cont.
• 𝑎) 0.0308
• 𝑏) 0.8369
• 𝑐) 0.9976
Example
• Let the r.v. X be the total number of heads when a fair coin is tossed 4
times.
• Is this a Bernoulli or binomial trial/experiment?
• Are the conditions of a Binomial trial satisfied?
• Find the probability mass function for X.
Solution
• 1. There are 𝑛 independent Bernoulli trials,
• 2. 𝑛 is a fixed positive integer,
• 3. The probability of success on a single trial is p and remains the
same from trial to trial. The probability of failure is q = 1 – p
• 4. The trials are independent
Example
• We can see that the 4 conditions for a binomial experiment are
satisfied. Here p = 0.5, n = 4. Now, the probability mass function of X
is
4 k ( 4− k )
P( X = k ) = 0.5 0.5 , k = 0,1,2,3,4
k
• The probability mass function of X can be represented as
PMF
k 0 1 2 3 4 Total
PX(k) 0.0625 0.25 0.375 0.25 0.0625 1
Graph
• The graph for PX(k) is
Cont.
• The pmf is symmetrical about x = 2.
Example
• 1. The probability that the patient recovers from a rare blood disease is 0.4.
If 10 people are known to have contracted the disease, what is the
probability that
• a) exactly 3 patients survive the disease?
• b) from 3 to 5 patients survive the disease?
• 2. Suppose that a student is given a test with 10 true-false questions. Let X
be the number of questions guessed correctly by the student.
• i) Write down the probability distribution (pmf) of X
• ii) What is the probability that the student guesses all questions correctly?
• Iii) What is the probability that the student guesses 7 or more questions
correctly?
Solution 1
• A Binomial experiment with n = 10 trials and p = 0.4
• Now,
10
p[ X = 3] = ( 0.4 ) ( 0.6 )
3 7
3
P[3 X 5] = P[ X = 3] + P[ X = 4] + P[ X = 5]
10 10 10
= ( 0.4 ) ( 0.6 ) + ( 0.4 ) ( 0.6 ) + ( 0.4 ) ( 0.6 )
3 7 4 6 5 5
3 4 5
Solution 2
• Suppose that the student guesses completely
1, for a correct guess
xi =
0, Otherwise
i = 0,1,2,3,4,5,6,7,8,9,10
X ~ Binim(np, npq)
• i) n x n− x
P X = x = p q I x
x {0,1,2,..., n }
Cont.
• Let X be a random variable with a binomial distribution. Then
E ( X ) = np
V ( X ) = npq
M X (t ) = ( pe + q )
t n
x =0 x
Example
𝐿𝑒𝑡 𝑎 = 2, 𝑏 = 3, 𝑛 = 4
Cont.
4
4 x 4− x
( 2 + 3) = 2 3
4
x =0 x
4 0 4 4 1 3 4 2 2 4 3 1 4 4 0
( 5) = 2 3 + 2 3 + 2 3 + 2 3 + 2 3
4
0 1 2 3 4
625 = 81 + 216 + 216 + 96 + 16
625 = 625
Derive the moment generating function
n x n− x
P X = x = p q I x
x {0,1,2,..., n }
E ( X ) = np n
n x n− x
(a + b) = a b
n
V ( X ) = npq x =0 x
M X (t ) = ( pe + q )
t n
Exercise
Nine percent of students in ST2504 have their bank balances greater
than M500. Suppose that 10 students are selected at random to be
interviewed about their bank balances
i) What is the probability that two students will have their bank
balances greater than M500?
ii) What is the probability that none will have a bank balance greater
than M500?
Solution
• Let n=10, p=0.09, q=0.91, P(X=2)=0.1714, P(X=0)=0.3894
Poison Distribution
• Several useful applications of probability theory deal with time
intervals and the number of events that occur within the given time
intervals.
• - number of phone calls received in an hour
• - number of insurance claims per year
• - occurrence of accidents in a factory in a week
• - arrival of patients to an emergency wards
• - bacterial growth in a certain time interval
• If we let X be the rv representing the number of occurrences in each
of the cases mentioned, then X is a discrete rv.
Cont.
• The time instant at which we begin observing the phenomenon is
labelled 0.
• Let t be a fixed time period of time of length t.
• [0,t] is the fixed time interval
• X is the number of events that occur in the interval [0,t].
Properties of a Poison Experiment
• 1. The probability of an occurrence is the same for any two intervals
of equal length.
• 2. The occurrence or non-occurrence in any interval is independent of
the occurrence or non-occurrence in any other interval.
• 3. Two or more simultaneous events are impossible
Definition
• Let X be a rv with a Poison distribution. The probability distribution
function of X is given by:
e− x
P[ X = x] = PX ( x) = ( x)
I0,1,...
x!
0
• 𝑃[𝑋 = 𝑥] = 𝑝𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑥 𝑜𝑐𝑐𝑢𝑟𝑟𝑒𝑛𝑐𝑒𝑠 𝑖𝑛 𝑎𝑛 𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙
• = 𝑒𝑥𝑝𝑒𝑐𝑡𝑒𝑑 𝑣𝑎𝑙𝑢𝑒/ 𝑚𝑒𝑎𝑛 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑐𝑢𝑟𝑟𝑒𝑛𝑐𝑒𝑠 𝑖𝑛 𝑎𝑛 𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙
Cont.
• It is clear that if λ>0, then P[X=x)>o for all x. To verify that P[X=x]
satisfies the second condition for a probability function, note that a
Taylor’s series expansion of a function f(x) about a point a is
f '(a )( x − a ) f "(a )( x − a ) 2 f "'(a )( x − 3)3
f ( x ) = f (a ) + + + + ...
1! 2! 3!
e− x
P[ X = x] = PX ( x) = ( x)
I0,1,...
x!
0
• Is a true pdf.
Cont.
• Therefore,
−
e x x
x =0
PX ( x) =
x =0 x!
= e =e e = 1
−
x =0 x!
−
Exercise
• Given a poison pmf, find the following:
•
E(X )
Var ( X )
M X (t )
Cont.
E X ( X − 1) = 2
E X − X =
2 2
E( X ) − E( X ) =
2 2
E( X ) = +
2 2
Cont.
Var ( X ) = E ( X ) − [ E ( X )]
2 2
= + −
2 2
=
Theorem
• Let X be a rv with a Poison distribution. Then
−
e x
1. P[ X = x] = ( x)
I0,1,...
x!
2. E ( X ) =
3. Var ( X ) =
( et −1)
4. M x (t ) = e
Home Work
• Proof the theorems using the indirect method
Cont.
• Remark
• The parameter of a rv with a poison distribution is λ.
• λ = (rate of occurrence) (duration)
Exercise
• Suppose that the occurrence of accidents in a large industrial plant
satisfies the three assumptions for the Poison process. Suppose also
that accidents occur at the rate of ½ per week. Let X be the number of
accidents that will occur in a period of the next six weeks.
• A) What is the parameter λ?
• B) Write down the pdf of X.
• C) Find E(X), Var(X) and mgf of X
• D) What is the probability that exactly 3 accidents will occur?
• E) What is the probability that no accidents will occur?
Solution
• A) Rate of accidents = ½ per week
• Duration = 6 weeks
• λ = (rate)(duration)= 0.5 * 6 = 3
− x
• B) P[ X = x] = e
I ( x)
0,1,...
x!
e −3 3x
=
x!
Example
• If the number of accidents occurring on a highway each day is a
Poison rv with parameter λ = 3, what is the probability that no
accidents occur today?
Poison Approximation to Binomial
Distribution
• The binomial distribution can be approximated by a Poison
distribution when the parameter n is large and p is small (typically
when n ≥ 20 and p ≤ 0.05). It can be proved that under those
conditions:
n x n− x e − np
( np ) x
x p (1 − p )
x!
e− x
= , for = np
x!
Cont.
• The advantage is that the Poison probabilities are much simpler to
compute.
Cont.
• Suppose that the probability that a corn seed from a certain batch
does not germinate equals 0.02. If we plant 200 of these seeds, what
is the probability that
• A) At most 5 seeds will not germinate?
• B) Exactly 3 will not germinate?
• C) At least 3 will not germinate?
Example 2
• If the probability that an individual suffers an adverse
reaction from a particular drug is known to be 0.001,
determine the probability that out of 2000 individuals, (a)
exactly three and (b) more than two individuals will suffer
an adverse reaction.
Geometric Distribution
• Suppose that a sequence of independent Bernoulli trials are
performed.
• Also assume that the probability of success 𝑝 remains the same
throughout.
• Let the rv X be the number of trials needed to get the first success.
• Then X is called a Geometric Random Variable.
Cont.
• Geometric distribution is the number of trials required to obtain the
first success in a sequence of independent Bernoulli trials in which
the probability of success at each trial is 𝑝.
Cont.
• The sample space S for the experiment contains the countably infinite
set of sample points S = s, fs, ffs, fffs,...
• Therefore, the range for X is Rx = {1,2,3,…}
• Now consider the event X = k, that is, the first success occurs on the
k-th trial. This means that the first k – 1 trials resulted in failure.
• Thus k −1
P( X = k ) = (1 − p) p
Cont.
• A discrete random variable 𝑋 is said to have a Geometric distribution
with parameter 𝑝 (0 ≤ 𝑝 ≤ 1) if it assumes nonnegative values and
its probability mass function is given as:
p (1 − p ) x −1 , x = 1, 2,3...
P[ X = x] = PX ( x) =
0, Otherwise
P( X i + k X i ) = P( X k )
• That is, the probability that more than k additional trials will be
required to observe the first success, given no success in the first i
trials, does not depend on i.
Cont.
• For instance, if X is a geometric rv, then P(X > 15/X > 10) is simply
P(X > 5).
• The generalization of the geometric probability model is the Negative
Binomial Probability Model.
• Suppose that a sequence of independent Bernoulli trials, each with
probability 𝑝 of success are performed until there are 𝑟 successes.
• Define the rv X as the number of trials needed to achieve this.
• Then X is called the negative binomial rv with parameters r and p,
and we write X ~ NegBin(r , p).
Cont.
• The geometric distribution is the distribution of the number of trials
needed to get the first success in repeated independent Bernoulli
trials.
• The binomial distribution is the distribution of the number of
successes (x) in a fixed number of independent Bernoulli trials (n).
x − 1 r x − r
P( X = x) = p q
r −1
• Where
0 p 1, q = 1 − p, r 0
t
rpe
M X (t ) =
1 − qe t
r N − r
x n − x
P[ X = x] = I ( x)
N 0,1,...,n
• Where n
• 𝑥 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑠𝑢𝑐𝑐𝑒𝑠𝑠𝑒𝑠
• 𝑛 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑟𝑖𝑎𝑙𝑠 𝑜𝑟 𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑖𝑧𝑒
• 𝑁 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑖𝑛 𝑡ℎ𝑒 𝑝𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛
• 𝑟 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑖𝑛 𝑡ℎ𝑒 𝑝𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑙𝑎𝑏𝑒𝑙𝑙𝑒𝑑 𝑠𝑢𝑐𝑐𝑒𝑠𝑠
Cont.
𝑁
• Note that represents the number of ways 𝑛 elements can be
𝑛
selected from a population of size 𝑁;
𝑟
• represents the number of ways that 𝑥 successes can be selected
𝑥
from a total of 𝑟 successes in the population;
𝑁−𝑟
represents the number of ways that 𝑛 − 𝑥 failures can be
𝑛−𝑥
selected from a total of 𝑁 − 𝑟 failures in the population.
Restrictions
• N is a positive integer
•x≤N
•n≤N
• x is a nonnegative integer
• n is a positive integer
Theorem
x 2 f ( x)dx − ( E ( X ) )
2
=
−
• And the moment generating function as M ( t ) = etx f ( x)dx
X X −
Example
• Let the pdf of a continuous random variable be given by
f X ( x, ) = e − x
I ( x)
0,
2. Show that
M X (t ) =
−t
Cont.
• Using, M X (t ) =
−t
• Derive E( X )
Var ( X )
Expectation and variance
1
E( X ) =
1
Var ( X ) =
2
Properties of f
• Let f be the density function of a random variable X
• Properties of f
t
a ) F (t ) =
−
f ( x)dx
b) f ( x)dx = 1
−
b
d) For real numbers, a b, P(a X b) = f (t )dt
a
b
e) P ( a X b ) = P ( a X b ) = P ( a X b ) = P ( a X b ) = f (t )dt
a
Important Continuous Distributions
• The following continuous distributions will be discussed:
• - Uniform Distribution
• - Exponential Distribution
• - Gamma Distribution
• - Beta Distribution
• - Normal Distribution
The Uniform Distribution
• The probability density function of a random variable X with
Continuous Uniform Distribution is given by:
1
fX ( x) = ( x)
Ia ,b
b−a
a x b, − a b
2.Var ( X ) =
12
ebt − e at
3.M x (t ) =
(b − a )t
Moment Generating Function
• Theorem:
• If X is a random variable having a Uniform Distribution over the
interval [a, b], then the moment generating function of X is:
𝑒 𝑏𝑡 −𝑒 𝑎𝑡
𝑀𝑥 𝑡 =
𝑏−𝑎 𝑡
− x 1
= e
−
0
= −1(0 − 1)
Probabilities Associated with an Exponential
Distribution
− x
i ) P( X x) = e
− x
ii ) P( X x) = 1 − e
− x1 − x2
iii ) P( x1 X x2 ) = e −e
Example
• Let 𝑋~𝐸𝑥𝑝(0.1) Let’s compute the following probabilities
• a ) P( X 5)
b) P(10 X 15)
c) P( X 0.5)
The cumulative distribution function of X
• The cumulative distribution function of X is
t t
FX (t) = f X (x)dx = e − x
dx
0 0
• =?
Example
• Let 𝑋 be an exponential r.v. with mean 6. Find
• (a) 𝑃 𝑋 > 4
• (b) 𝑃(𝑋 > 6|𝑋 > 2)
Memoryless Property
• We can show that
P( x s + t x s ) = P ( x t ) for all s, t 0
• Determine the mean and standard deviation of the time it takes for
the pizza shop to deliver pizza
Cont.
• The probability density function of a continuous distribution is given
as: 27
2
f ( x) = 490
( 3x − 2 x ) ,
2/3 x 3
0, elsewhere