You are on page 1of 72

Lecture 4 - Discrete and Continuous Probability

Distributions

Edwin Moyo (emoyo@mu.ac.zm)

November 25, 2022

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 1 / 62
Lecture 4-Learning outcomes

This lecture develops work on descriptive statistics. At the end of this


session, students will be able to;
Outcomes
1 The properties of a probability distribution
2 to compute the expected value and variance of a probability
distribution
3 To compute probabilities from the binomial and Poisson distributions.
4 To compute probabilities from the normal, exponential distributions.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 2 / 62
Discrete Random Variables
Introduction

A random variable (r.v.) X (ω ) is a real single-valued function that assigns


to each element ω ∈ Ω a real number called the value of X . X (ω ) is a
r.v. if
it is a finite real-valued function defined on the sample space Ω of a
random experiment for which the probability function is defined.
for every x ∈ R the set {ω |X (ω ) ≤ x } is an event.
Note: A r.v. X is said to be discrete if its range (i.e., the set of values it
can take) is finite or at most countably infinite.

A probability distribution for a discrete random variable is a mutually


exclusive list of all the possible numerical outcomes along with the
probability of occurrence of each outcome.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 3 / 62
The following table shows examples of r.v.s
Random experiment r.v.
Five successive coin tosses · # heads
· # tails
Two rolls of die ·Sum of the two rolls
· # 6’s in the two rolls
·second roll raised to
fifth power
Transmission of message ·Time needed to transmit
·delay in receiving message
Insurance company ·Claims received from
policyholders
Stock exchange ·Return on stock of plc
Study to find number of fish · # fish
fish in given part of river ·Depth of river

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 4 / 62
Properties of a discrete random variable
A discrete r.v. has the following properties:
It is a real-valued function of outcomes of an experiment that can
take a finite or countably infinite number of values.
It has an associated probability mass function (pmf), denoted pX ,
which gives the probability of each numerical value that the r.v. can
take. The probability mass of x is pX (x ) = P(X = x ) and satisfies
the following properties:
(a) 0 ≤ pX (x ) ≤ 1 ∀ x (non-negativity).
(b) ∑∀x pX (x ) = 1 (normalization).
(c) / Ω (equiv. to P(∅) = 0).
pX (x ) = 0 for any x ∈
If X is a r.v., then Y = f (X ) is also a r.v.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 5 / 62
Properties of a discrete random variable
A discrete r.v. has the following properties:
It is a real-valued function of outcomes of an experiment that can
take a finite or countably infinite number of values.
It has an associated probability mass function (pmf), denoted pX ,
which gives the probability of each numerical value that the r.v. can
take. The probability mass of x is pX (x ) = P(X = x ) and satisfies
the following properties:
(a) 0 ≤ pX (x ) ≤ 1 ∀ x (non-negativity).
(b) ∑∀x pX (x ) = 1 (normalization).
(c) / Ω (equiv. to P(∅) = 0).
pX (x ) = 0 for any x ∈
If X is a r.v., then Y = f (X ) is also a r.v.

The pmf of a discrete r.v. X is calculated, for each possible value x of X ,


as follows:
1 Collect all the possible outcomes that give rise to the event {X = x }.
2 Add the probabilities of these outcomes to obtain pX (x ).
Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions
November 25, 2022 5 / 62
Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions
November 25, 2022 6 / 62
Example
A discrete r.v. X has the following probability distribution:
x 1 2 3 4
1 1 1
pX (x ) 3 3 k 4

where k is a constant. Find the value of k and, hence, P(X ≤ 3).


Using the normalization property, we have
12 = 12 . Thus, P(X ≤ 3) =
∑∀x pX (x ) = 13 + 13 + k + 14 = 1 ⇒ k = 1 − 11 1

P(X = 1) + P(X = 2) + P(X = 3) = 13 + 31 + 12 1


= 34 = 0.75.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 7 / 62
Example
A discrete r.v. X has the following probability distribution:
x 1 2 3 4
1 1 1
pX (x ) 3 3 k 4

where k is a constant. Find the value of k and, hence, P(X ≤ 3).


Using the normalization property, we have
12 = 12 . Thus, P(X ≤ 3) =
∑∀x pX (x ) = 13 + 13 + k + 14 = 1 ⇒ k = 1 − 11 1

P(X = 1) + P(X = 2) + P(X = 3) = 13 + 31 + 12 1


= 34 = 0.75.

Task
A r.v. Y takes the integer value y with probability pY (y ), where

ky 3 if y = 1, 2, 3, 4, 5

pY (y ) =
0 otherwise

Determine the value of k and write down the distribution of Y .


Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions
November 25, 2022 7 / 62
Expectations and Variances

Expected Value
The mean, µ of a probability distribution is the expected value of its
random variable. The expected value is given by,
N
µ = E (X ) = ∑ xi P (X = xi )
i =1

where
xi = the i th outcome of the discrete random variable X
P (X = xi ) = probability of occurrence of the i th outcome of X

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 8 / 62
Variance
You compute the variance of a probability distribution by multiplying each
possible squared difference [xi − E (X )]2 by its corresponding probability,
P (X = xi ), and then summing the resulting products. The variance of a
discrete random variable is given by.
N
∑ [xi − E (X )]
2
σ2 = P (X = xi )
i =1

where
xi = the i th outcome of the discrete random variable X
P (X = xi ) = probability of occurrence of the i th outcome of X

Note:
We can also compute the variance as;

σ2 = E (X 2 ) − (E (X ))2

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 9 / 62
Example
The following table contains the probability distribution for the number of
traffic accidents daily in a small city:
Number of Accidents Daily (X ) P (X = xi )
0 0.10
1 0.20
2 0.45
3 0.15
4 0.05
5 0.05
(a) Compute the mean number of accidents per day.
(b) Compute the standard deviation.
Solution: To be done in class.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 10 / 62
Task
The manager of the commercial mortgage department of a large bank has
collected data during the past two years concerning the number of
commercial mortgages approved per week. The results from these two
years (104 weeks) indicated the following:
Number of Commercial Mortgages Approved Frequency
0 13
1 25
2 32
3 17
4 9
5 6
6 1
7 1
(a) Compute the expected number of mortgages approved per week.
(b) Compute the standard deviation.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 11 / 62
Task
A random variable X has the following probability distribution:
x 1 2 3 4 5
p (x ) .05 .10 .15 .45 .25
1 Verify that X has a valid probability distribution.
2 Find the probability that X is greater than 3, i.e. P (X > 3).
3 Find the probability that X is greater than or equal to 3, i.e.
P (X ≥ 3).
4 Find the probability that X is less than or equal to 2, i.e. P (X ≤ 2).
5 Find the probability that X is an odd number.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 12 / 62
Properties of Expectation

i) Let g and h be functions, and let a and b be constants. For any random
variable X (discrete or continuous),

E{ag (X ) + bh (X )} = aE{g (X )} + bE{h (X )}

In particular,
E(aX + b ) = aE(X ) + b
ii) Let X and Y be ANY random variables (discrete, continuous,
independent, or non-independent). Then

E(X + Y ) = E(X ) + E(Y )

More generally, for ANY random variables X1 , . . . , Xn ,

E (X1 + . . . + Xn ) = E (X1 ) + . . . + E (Xn )

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 13 / 62
Cont’

iii) Let X and Y be independent random variables, and g , h be functions.


Then
E(XY ) = E(X )E(Y )
E(g (X )h (Y )) = E(g (X ))E(h (Y ))
Notes:
1. E(XY ) = E(X )E(Y ) is ONLY generally true if X and Y are
INDEPENDENT.
2. If X and Y are independent, then E(XY ) = E(X )E(Y ). However, the
converse is not generally true: it is possible for E(XY ) = E(X )E(Y ) even
though X and Y are dependent.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 14 / 62
Properties of Variance

i) Let g be a function, and let a and b be constants. For any random


variable X (discrete or continuous),

Var{ag (X ) + b } = a2 Var{g (X )}.

In particular, Var(aX + b ) = a2 Var(X ). ii) Let X and Y be independent


random variables. Then

Var(X + Y ) = Var(X ) + Var(Y )

iii) If X and Y are NOT independent, then

Var(X + Y ) = Var(X ) + Var(Y ) + 2 cov(X , Y )

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 15 / 62
Covariance
The covariance, σXY , measures the strength of the relationship between
two numerical random variables, X and Y .

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 16 / 62
Covariance
The covariance, σXY , measures the strength of the relationship between
two numerical random variables, X and Y .

The covariance of X and Y is defined as:


N
Cov (X , Y ) = σXY = ∑ [xi − E (X )] [yi − E (Y )] P (xi yi )
i =1

where X = discrete random variable X


xi = i th outcome of X
Y = discrete random variable Y
yi = i th outcome of Y
P (xi yi ) = probability of occurrence of the i th outcome of X and the ith
outcome of Y i = 1, 2, . . . , N for X and Y

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 16 / 62
Example (Done in class)
You are trying to develop a strategy for investing in two different stocks.
The anticipated annual return for a $1, 000 investment in each stock under
four different economic conditions has the following probability
distribution:
Returns
Probability Economic Condition Stock X Stock Y
0.1 Recession −50 −100
0.3 Slow growth 20 50
0.4 Moderate growth 100 130
0.2 Fast growth 150 200
Compute the
(a) expected return for stock X and for stock Y .
(b) standard deviation for stock X and for stock Y .
(c) covariance of stock X and stock Y .
(d) Would you invest in stock X or stock Y ? Explain.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 17 / 62
Continuous Random Variables
Introduction

A r.v. X is said to be continuous if its probability law can be described in


terms of a non-negative function fX , called the probability density function
(pdf) of X , satisfying
Z
P(X ∈ B ) = fX (x )dx
B ∈R

for every subset B of R. In particular, the probability that a value of X


lies in the interval (a, b ) is
Z b
P(a ≤ X ≤ b ) = fX (x )dx.
a

This is interpreted as the area under the graph of the pdf of X .

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 18 / 62
The pdf fX of a r.v. X must satisfy the following properties:
fX (x ) ≥ 0 ∀ x (equiv. to P(A) ≥ 0 ∀ A ∈ Ω) (non-negativity).
R∞
−∞ fX (x )dx = P(− ∞ ≤ X ≤ ∞ ) = 1 (equiv. to P( Ω ) = 1)
(normalization).
For any subset B of the real line, P(X ∈ B ) = B fX (x )dx.
R

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 19 / 62
The pdf fX of a r.v. X must satisfy the following properties:
fX (x ) ≥ 0 ∀ x (equiv. to P(A) ≥ 0 ∀ A ∈ Ω) (non-negativity).
R∞
−∞ fX (x )dx = P(− ∞ ≤ X ≤ ∞ ) = 1 (equiv. to P( Ω ) = 1)
(normalization).
For any subset B of the real line, P(X ∈ B ) = B fX (x )dx.
R

Expectation and Variance


Let X be a continuous random variable with p.d.f. fX (x ). The expected
value of X is Z ∞
E(X ) = xfX (x )dx
−∞
and
Var (X ) = E(X 2 ) − (E(X ))2
where Z ∞
E(X 2 ) = x 2 fX (x )dx
−∞

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 19 / 62
Example
The continuous r.v. Y has pdf given by
 3 2
fY (y ) = 32 [4 − y ] if −2 ≤ y ≤ 2
0 otherwise

Find P(Y > 1) and P(Y < 0).


2 )dy = 3 4y − 1 y 3 2 =
R2 R2
P(Y > 1) = 1 fY (y )dy = 32 3
 
1
( 4 − y 32 3 1
3 1 3 1 5
 
4 − 4 − 8 − 32 = 32 = 0.156.
R0 R0 0
P(Y < 0) = −2 fY (y )dy = 32 3 3
(4 − y 2 )dy = 32 4y − 31 y 3 −2 =

− 2
3 8 3
× 16 1

32 0 − −8 + 3 = 32 3 = 2 = 0.5. Note that −2 ≤ Y ≤ 0 is half
the range of the r.v. Y , so the required probability must be half of 1,
which is 0.5 (since the area under the curve is 1).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 20 / 62
Example
The r.v. X has pdf fX (x ) = 3x k , where k ∈ Z+ , if 0 ≤ x ≤ 1 and 0
otherwise. Find the value of k and, hence, P(0.5 ≤ X ≤ 0.8).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 21 / 62
Probability Distributions of Discrete Random Variables
Bernoulli Distribution

A sequence of Bernoulli trials forms a Bernoulli process or distribution if it


satisfies the following properties:
1 Each trial results in one of two possible mutually exclusive outcomes.
One of these possible outcomes is arbitrarily considered as a success
and the other as a failure.
2 The probability of success, p, remains constant from trial to trial.
The probability of failure is 1 − p.
3 The trials are independent, i.e., the probabilities associated with any
particular trial are not affected by the outcome of any other trial.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 22 / 62
Probability Distributions of Discrete Random Variables
Bernoulli Distribution

Thus, the Bernoulli distribution describes success or failure in a single trial


of an experiment. The pmf of a Bernoulli r.v. is:

p if x = 1
pX ( x ) =
1 − p if x = 0
Alternatively, the pmf of a Bernoulli r.v. is written as:

pX (x ) = P(X = x ) = p x (1 − p )1−x , where 0 ≤ pX (x ) ≤ 1 (1)

The mean and variance of a Bernoulli r.v. are, respectively, µ = p and


σ 2 = p (1 − p ).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 23 / 62
Probability Distributions of Discrete Random Variables
Binomial Distribution

Binomial Distribution: Consider a coin toss which can turn up heads with
probability p or tails with probability 1 − p (independently of prior tosses).
Let X be the number of heads in a sequence of n tosses of the coin. Then
X is a binomial r.v. with parameters n and p. Alternatively, we say that X
is binomial(n, p) distributed. The pmf of a binomial(n, p) distributed r.v.
X is given by:
 
n x
pX (x ) = P(X = x ) = p (1 − p )n −x (2)
x
for x = 0, 1, 2, . . . , n and 0 ≤ pX (x ) ≤ 1. Alternatively the above pmf can
be written as
 n x
(x )p (1 − p )n−x if x = 0, 1, 2, . . . , n
pX (x ) =
0 elsewhere

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 24 / 62
It should be noted that the binomial distribution describes the number of
successes in n independent Bernoulli trials. Thus, as noted earlier, the
Bernoulli(p) is the same as the binomial(1, p) distribution.
A binomial situation always satisfies the following conditions:
(a) There is a fixed number of identical trials (n);
(b) The trials are independent;
(c) The trial have only two possible outcomes, ‘success’ or ‘failure’; and
(d) The probability of success (p) is constant for each trial (or
throughout the experiment).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 25 / 62
This means that the steps involved in computing probabilities using the
binomial distribution formula are as follows:
Determine the probability of success in each trial, p.
Determine the number of trials (or the sample size), n.
Decide on the number of successes (x) for which you want to
compute the probability
Substitute the values of n, p and x into the formula in (2).
Note: The mean of a binomial distribution is given by µ = np and its
variance is σ2 = np (1 − p ) (i.e., simply multiply the mean by the
probability of failure).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 26 / 62
Example (Done in Class)
(1) If X ∼ B 6, 13 find:


(a) P (X = 2)
(b) P (X < 2)
(c) P (X ≥ 1).
(2) If X ∼ B (10, 0.3) find:
(a) P (X = 9)
(b) P (X = 0)
(c) P (X ≤ 5).
(3) If the probability that I get a lift to work on any morning is 0.6 what
is the probability that in a working week of five days I will get a lift
only twice?
(4) A random variable X is binomially distributed with mean 6 and
variance 4.2. Find P (X ≤ 6).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 27 / 62
Example
Only 75% of sunflower seeds from a particular supplier produce flowers
when planted. If 10 randomly selected seeds are planted, determine the
probability of obtaining (i) exactly 8 flowers, (ii)at least 8 flowers and (iii)
at most 7 flowers.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 28 / 62
Example
Only 75% of sunflower seeds from a particular supplier produce flowers
when planted. If 10 randomly selected seeds are planted, determine the
probability of obtaining (i) exactly 8 flowers, (ii)at least 8 flowers and (iii)
at most 7 flowers.

Solution
n = 10, p = 0.75, 1 − p = 0.25. Thus, X ∼ Bin (10, 0.75)
We can also write this as X ∼ binomial(10, 0.75). Hence,
(a) P(exactly 8 flowers will be produced)
= P(X = 8) = (10 8 2
8 )(0.75) (0.25) = 0.282
(b) P(at least 8 flowers will be produced)
= P(X ≥ 8) = P(X = 8) + P(X = 9) + P(X = 10) =
(10 8 2 10 9 1 10 10 0
8 )(0.75) (0.25) + ( 9 )(0.75) (0.25) + (10)(0.75) (0.25) =
0.282 + 0.188 + 0.056 = 0.526
(c) P(at most 7 flowers will be produced)
= P(X ≤ 7) = 1 − P(X ≥ 8) = 1 − 0.526 = 0.474
Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions
November 25, 2022 28 / 62
Task
Q1. Suppose that 40% of the students in BEC 260 at KNU are in favor of
a ban on playing music in dormitories. Suppose that 5 students are
randomly sampled. Find the probability that
(a) 2 favor the ban.
(b) less than 4 favor the ban.
(c) at least 1 favor the ban.
Q2. In a multiple choice test there are 10 questions and for each question
there is a choice of 4 answers, only one of which is correct. If a
student guesses at each of the answers, find the probability that he or
she gets
(a) none correct.
(b) more than 7 correct.
(c) if he or she needs to obtain over half marks to pass, and the questions
carry equal weight, find the probability that he or she passes.
Q3. The random variable X has a binomial distribution B (11, p ). If
P (X = 8) = P (X = 7) find the value of p.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 29 / 62
Probability Distributions of Discrete Random Variables
Poisson Distibution

Poisson Distribution: A random variable X is said to be Poisson


distributed if it takes non-negative integer values and has a pmf given by:

( λ )x
pX (x ) = P(X = x ) = e−λ (3)
x!
for x = 0, 1, 2, . . . and 0 ≤ pX (x ) ≤ 1, where λ is the mean number of
occurrences of a random event in a unit interval of time or space. The
number of occurrences of the random event in the interval is indicated by
x. It so happens that the variance of a Poisson r.v. is also λ .

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 30 / 62
The Poisson distribution has many applications which include:
The demand for a product
Typographical errors in a book
The occurrence of accidents in a factory
The arrival pattern of store customers at a check-out counter
The occurrence of flaws in a length of fabric produced by a textile
The arrival of calls at a telephone switchboard

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 31 / 62
The Poisson distribution has many applications which include:
The demand for a product
Typographical errors in a book
The occurrence of accidents in a factory
The arrival pattern of store customers at a check-out counter
The occurrence of flaws in a length of fabric produced by a textile
The arrival of calls at a telephone switchboard

Random occurrences of some event that follow a Poisson distribution are


said to be brought about by the Poisson process which is generally
recognized by:
The existence of events that occur at random and are ‘rare’.
The specification of an interval of time or space within which events
occur.
The specification of the mean number of events occurring within the
given interval.
Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions
November 25, 2022 31 / 62
The Poisson process has the following characteristics or properties:
1 The number of successes that occur in any interval of time or space is
independent of the number of successes that occur in any other
interval;
2 Theoretically, it is possible for an infinite number of successes to
occur in the given interval;
3 The probability that success will occur in a given interval is the same
for all intervals of equal size and is proportional to the length or size
of the interval.
Note: A Poisson distribution is the continuous version of a Bernoulli
process. However, while in a Bernoulli process either no or one event
occurs in a unit time interval, in a Poisson process any non-negative whole
number of events can occur in unit time.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 32 / 62
Example
The number of accidents X per week at a factory is a r.v. with a Pois(2)
distribution. Find the probability that in any given week
(a) exactly 0, 1, 2, 3, 4 or 5 accidents occur.
(b) at least 5 accidents occur.
(c) at most 3 accidents occur. Write down the Poisson distribution of the
number of accidents occurring at the factory.
Since we have random and rare events (i.e., accidents) occurring in a given
interval of time (per week) on an average of 2, this is a Poisson situation
or process. Thus, using equation (3), λt = 2 × 1 = 2 and we have:

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 33 / 62
Solution
0
(a) P(exactly 0 accidents occur)= P(X = 0) = e−2 20! = e−2 = 0.135
1
P(exactly 1 accident occur)= P(X = 1) = e−2 21! = 2e−2 = 0.271
Similarly, for the rest we have
2
P(2)= P(X = 2) = e−2 22! = 2e−2 = 0.271
3
P(3)= P(X = 3) = e−2 23! = 68 e−2 = 0.18
4
P(4)= P(X = 4) = e−2 24! = 64 e−2 = 0.09
5
P(5)= P(X = 5) = e−2 25! = 120 32 −2
e = 0.036

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 34 / 62
Solution
0
(a) P(exactly 0 accidents occur)= P(X = 0) = e−2 20! = e−2 = 0.135
1
P(exactly 1 accident occur)= P(X = 1) = e−2 21! = 2e−2 = 0.271
Similarly, for the rest we have
2
P(2)= P(X = 2) = e−2 22! = 2e−2 = 0.271
3
P(3)= P(X = 3) = e−2 23! = 68 e−2 = 0.18
4
P(4)= P(X = 4) = e−2 24! = 64 e−2 = 0.09
5
P(5)= P(X = 5) = e−2 25! = 120 32 −2
e = 0.036
(b) P(at least 5 accidents occur)= P(X ≥ 5) = 1 − P(X ≤ 4)
= 1 − [P(0) + P(1) + P(2) + P(3) + P(4)]
= 1 − (0.135 + 0.271 + 0.271 + 0.18 + 0.09)
= 1 − 0.947 = 0.053

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 34 / 62
Solution
0
(a) P(exactly 0 accidents occur)= P(X = 0) = e−2 20! = e−2 = 0.135
1
P(exactly 1 accident occur)= P(X = 1) = e−2 21! = 2e−2 = 0.271
Similarly, for the rest we have
2
P(2)= P(X = 2) = e−2 22! = 2e−2 = 0.271
3
P(3)= P(X = 3) = e−2 23! = 68 e−2 = 0.18
4
P(4)= P(X = 4) = e−2 24! = 64 e−2 = 0.09
5
P(5)= P(X = 5) = e−2 25! = 120 32 −2
e = 0.036
(b) P(at least 5 accidents occur)= P(X ≥ 5) = 1 − P(X ≤ 4)
= 1 − [P(0) + P(1) + P(2) + P(3) + P(4)]
= 1 − (0.135 + 0.271 + 0.271 + 0.18 + 0.09)
= 1 − 0.947 = 0.053
(c) P(at most 3 accidents
occur)= P(X ≤ 3) = P(0) + P(1) + P(2) + P(3)
= 0.135 + 0.271 + 0.271 + 0.18 = 0.857

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 34 / 62
The Poisson distribution for this process is therefore:
x 0 1 2 3 4 5 or more
pX (x ) 0.135 0.271 0.271 0.018 0.09 0.053

Task
If, on average, calls arrive at a company according to a Poisson
distribution at a rate of one in every 30 seconds, calculate the probability
that the company receives
(a) only one call in 30 second interval.
(b) at least 3 calls in a 30 second interval.
(c) less than two calls in a 30 second interval.
(d) no calls in a 5 second internal.

Note
Poisson Approximation to the Binomial: In a binomial situation, if n is
very large (greater than 30) and p is very small (less than 0.1), then we
can approximate the binomial distribution using the Poisson with mean np.
The larger n is and the smaller p is, the better the approximation.
Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions
November 25, 2022 35 / 62
Task
1 The probability of a student failing to graduate after 5 years (for 4
year-degree programs) is 0.004. For a sample of 250 students,
determine the probability that less than 3 students will fail to
graduate after 5 years. What is the expected number of students
failing to graduate after 5 years?
2 The number of people entering a Commercial Bank during any
four-minute interval follows the Poisson distribution with mean µ = 4.
Find the probability of the following during a four-minute interval
(a) No one enters the bank.
(b) At least two people enter the bank.
3 The probability that a student admitted in URP programme will
graduate after five years is 0.90.
(a) Determine the probability of the following out of 10 students: (1) At
least nine will graduate. (2) Five will graduate.
(b) Find E(X ) and Var (X )

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 36 / 62
Probability Distributions of Continuous Random Variables
Continuous Uniform Distribution

Continuous Uniform Distribution: A continuous r.v. X is said to have a


uniform distribution over the interval (a, b ) if and only if it has the pdf
 1
fX ( x ) = b −a if a < x < b (4)
0 otherwise
Here, a and b are the parameters of the continuous uniform distribution,
and −∞ < a, b < ∞. This pdf is called the uniform(a, b) distribution
because it places equal weight at each point x ∈ (a, b ). The mean and
variance of a continuous uniform distribution are, respectively, µ = a+2 b
(b −a )2
and σ2 = 12 . Equation (4) is a legitimate pdf because it is
non-negative ∀ x ∈ R and fulfills the normalization property:
R∞ Rb 1 1
Rb 1 b b −a
−∞ fX (x )dx = a b −a dx = b −a a dx = b −a [x ]a = b −a = 1, since
b 6= a.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 37 / 62
Geometrically, a continuous uniform distribution is rectangular in shape:

Note that the area under the pdf is 1 (the normalization property).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 38 / 62
Example
The waiting time X at a bus station, measured in minutes, is uniformly
distributed over (0, 5). What is the probability that someone at that bus
station would wait longer than 3.8 minutes for the bus?

The pdf of the r.v. X is


1

5 if 0 < x < 5
fX (x ) =
0 elsewhere
Now, we want
Z 5 Z 5
1 1 5 1.2
P(X > 3.8) = fX (x )dx = dx = [x ]3.8 = = 0.24.
3.8 3.8 5 5 5

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 39 / 62
Alternatively, we can use a graph as shown below:

0.2 is simply the value of the pdf (i.e., fX (x ) = 15 ) whenever x is in the


interval (0, 5). The required probability is simply the area of the shaded
region, i.e., P(X > 3.8) = length × breadth = (5 − 3.8) × 0.2
= 1.2 × 0.2 = 0.24 (as before).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 40 / 62
Example
An airline quotes a flight time of 2 hours 10 minutes between two cities.
Historical records indicate that actual flight time X is uniformly distributed
between 2 hours and 2 hours 20 minutes. If time is measured in minutes,
(a) Write down the pdf of the random variable X .
(b) Find P(125 ≤ X ≤ 135).
(c) Find the probability that a randomly selected flight between the two
cities will be at least 5 minutes late.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 41 / 62
Solution
(a) X is uniformly distributed between 120 and 140 minutes, i.e., X ∼
uniform(120, 140), therefore its pdf is
 1
20 if 120 < x < 140
fX (x ) =
0 elsewhere
(b) P(125 ≤ X ≤ 135) =
Z 135 Z 135
1 1 10
fX (x )dx = dx = [x ]135
125 = 20 = 0.5. This should also be
125 125 20 20
obvious from the fact that the interval from 125 to 135 is half of the one
from 120 to 140 minutes. Hence the probability being 0.5.
(c) If a flight is delayed by at least 5 minutes, then it takes longer than 2 hours
15 minutes or 135 minutes. Thus, we are looking for
Z 140
1 1
P(X ≥ 135) = dx = = 0.25.
135 20 4
Again, it should be clear that 140 − 135 = 5 which is one-quarter of
140 − 120 = 20.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 42 / 62
Task
1 How long does it take you to download a game for your iPod?
According to Apple’s technical support site, downloading an iPod
game using a broadband connection should take 3 to 6 minutes.
Assume that the download times are uniformly distributed between 3
and 6 minutes. If you download a game, what is the probability that
the download time will be
(a) less than 3.3 minutes?
(b) less than 4 minutes?
(c) between 4 and 5 minutes?
(d) What are the mean and standard deviation of the download times?
2 Suppose you select one value from a uniform distribution with a = 0
and b = 10. What is the probability that the value will be
(a) between 5 and 7 ?
(b) between 2 and 3 ?
(c) What is the mean?
(d) What is the standard deviation?

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 43 / 62
Probability Distributions of Continuous Random Variables
Exponential Distribution

Exponential Distribution: When events occur uniformly at random over


time at a rate of λ events per unit time, then the time X to the first event
is an exponentially distributed r.v.. An exponential r.v. has a pdf of the
form
λe−λx if x ≥ 0

fX ( x ) =
0 otherwise
where λ is a positive parameter characterizing the pdf. This is a legitimate
pdf
R ∞ since it fulfills
R ∞the normalization property
− − ∞
−∞ fX (x )dx = 0 λe
λx dx = −e λx 0 = 1. The probability that X
exceeds a certain value decreases R ∞ exponentially. Indeed, for any value

a ≥ 0, we have P(X ≥ a) = a −e−λx a = e−λa . The mean and
variance of an exp(λ) distribution are, respectively, µ = λ1 and σ2 = λ12
(prove this). Note that exponential(λ)=gamma(λ, 1).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 44 / 62
Note
The exponential distribution is mostly used for modelling the amount of
time until a piece of equipment or a replacement part fails, until a light
bulb burns out or until an accident occurs.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 45 / 62
Note
The exponential distribution is mostly used for modelling the amount of
time until a piece of equipment or a replacement part fails, until a light
bulb burns out or until an accident occurs.

Example
The number of miles that a particular car can run before its battery wears
out is exponentially distributed with an average of 10,000 km. The owner
of the car needs to take a 5,000-km trip. What is the probability that he
will be able to complete the trip without having to replace the car battery?

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 45 / 62
Note
The exponential distribution is mostly used for modelling the amount of
time until a piece of equipment or a replacement part fails, until a light
bulb burns out or until an accident occurs.

Example
The number of miles that a particular car can run before its battery wears
out is exponentially distributed with an average of 10,000 km. The owner
of the car needs to take a 5,000-km trip. What is the probability that he
will be able to complete the trip without having to replace the car battery?

Solution
The rate of this exponential distribution is 1 battery per 10,000 km, i.e.,
5,000
− 10,000
10,000 so P(X > 5, 000) = F (5, 000) = e = e−0.5 ≈ 0.604. Note
1

that here F (x ) = e−λx is the tail distribution function for an exponentially


distributed r.v.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 45 / 62
Task
1 Customers arrive at the drive-up window of Test a fast-food
restaurant at a rate of 2 per minute during the lunch hour.
(a) What is the probability that the next customer will arrive within 1
minute?
(b) What is the probability that the next customer will arrive within 5
minutes?
(c) During the dinner time period, the arrival rate is 1 per minute. What
are your answers to (a) and (b) for this period?
2

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 46 / 62
Probability Distributions of Continuous Random Variables
Normal Distribution

Normal Distribution: A continuous random variable is said to be normal or


Gaussian with parameters µ and σ2 , denoted by N (µ, σ2 ), if and only if it
has a pdf of the form:

1 (x − µ )2
√ e− 2σ2 , for x ∈ R
fX (x ) = (5)
σ 2π
where −∞ < µ < ∞ and 0 ≤ σ < ∞ are the two parameters
characterizing the pdf. µ and σ2 are, respectively the mean and variance
of normally distributed random variable X . If µ = 0 and σ = 1, then (5)
1 2
becomes √12π e− 2 x . A normal r.v. Z with a mean of zero and a variance
of 1 is said to have a standard normal distribution (generally easier to deal
with as there is a table of probabilities for it).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 47 / 62
The key characteristics of the normal distribution are as follows:
Its pdf is symmetric around µ and, therefore, its mean must be µ.
The frequencies of the values of X thin out (symmetrically) either
side of the mean µ, giving the distribution a characteristically
‘bell-shaped’ curve (see accompanying diagram).
The area under the curve of the normal distribution is 1 (equivalent to
P(Ω) = 1). Because of the symmetry of the normal curve, the areas
on either side of the mean are each 0.5 (or 50% of the total area).
Probabilities for continuous random variables correspond to areas
under the normal curve.
The mean, median and mode are all equal.
The x-axis represents the possible values of the random variable X ,
which are infinite.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 48 / 62
The left and right tails of the distribution approach, but never touch, the
x-axis.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 49 / 62
It is possible to convert any normal distribution into a standard normal
one. This is done by ‘standardizing’ any given normal value using the
x −µ
Z -transformation formula z = σ . The areas under the standard
normal distribution curve are easily obtained from published tables.
In the standard normal distribution table, a value of the random
variable Z , to the first decimal place, is found in the left-most
column; the second decimal place in the value of the Z -score is
located across the top row.
The table gives the probability that a Z -value lies between −∞ and
the calculated z-value (corresponding to the given normal value), i.e.,
the given table is a cumulative standard normal table. Once you have
found the Z -score probability from the table, it may need to be
manipulated to find the required probability, e.g., P(Z < z ) and
P(Z < −z ) are given in the table; P(Z > z ) = 1 − P(Z < z ). This
is all that needs to be done.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 50 / 62
Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions
November 25, 2022 51 / 62
The normal distribution is completely determined by its parameters µ
and σ2 .
The normal distribution is really a family of distributions in which one
member is distinguished from another by the values of µ and σ2 . The
most important member of this normal family of distributions is the
standard normal distribution.
The Z -score (or Z -value) corresponding to the mean µ is 0. A
negative Z -score means that the given normal value is less that the
mean, while a positive one shows that the normal value is greater
than the mean.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 52 / 62
Example
Given that the variable X follows a normal distribution with mean 64 and
standard deviation 0.5, find:
(a) P(X < 63)
(b) P(X > 63.7)
(c) P(62.9 < X < 64.3)
(d) P(X >?) = 0.1026
(e) P(X >?) = 0.9772

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 53 / 62
Solution
(a) Here, the normal value is 63, the mean µ = 64 and the standard
deviation σ = 0.5. We standardize 63 using the Z -transformation formula
as follows:
x −µ 63−64
z= σ = 0.5 = −2, i.e., P(X < 63) = P(Z < −2)
In the cumulative standard normal distribution table, we look up −2.00 in
the left-most column. Then we go across the top row to the column
headed 0.00. We then look where the −2.00-row and the 0.00-column
meet and see a value of 0.0228. This is the required probability, i.e.,
P(X < 63) = P(Z < −2) = 0.0228 (see part (i) of the accompanying
figure).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 54 / 62
Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions
November 25, 2022 55 / 62
Solution
(b) Standardizing 63.7 gives z = 63.70.5−64 = −0.6, meaning that
P(X > 63.7) = P(Z > −0.6). From the table we obtain
P(Z < −0.6) = 0.2743. Therefore, P(X > 63.7) = P(Z > −0.6) =
1 − P(Z < −0.6) = 1 − 0.2743 = 0.7257 (as shown in part (ii) of the
diagram).

(c) We standardize both 62.9 and 64.3, obtaining


z (62.9) = 62.90.5−64 = −2.2 and z (64.3) = 64.30.5−64 = 0.6. Hence,
P(62.9 < X < 64.3) = P(−2.2 < Z < 0.6). From tables we obtain
P(Z < −2.2) = 0.0139 and P(Z < 0.6) = 0.7257, so the required
probability is the area under the curve between −2.2 and 0.6 and is simply
the difference between P(Z < 0.6) and P(Z < −2.2), i.e.,
P(−2.2 < Z < 0.6) = 0.7257 − 0.0139 = 0.7118 (see part (iii) of the
diagram).

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 56 / 62
(d) Here, we are given the Z -score probability and are looking for the
normal value. From the diagram (part (iv)), P(Z >?) = 0.1026 is
equivalent to P(Z <?) = 0.8974. Looking up 0.8974 (or a number closest
to it) in the main body of the cumulative standard normal distribution
table yields z = 1.27. We now use this to obtain the corresponding
x-value. Thus,
x −64
1.27 = 0.5 ⇒ 0.5 × 1.27 = x − 64 ⇒ 0.635 = x − 64 ⇒ x = 64.635.
(e) Similarly to what we did in (iv), we should easily see that
P(Z >?) = 0.9772 is equivalent to P(Z <?) = 0.0228. So we look up
0.0228 in the main body of the table to obtain −2.00. This is Z -score
corresponding to the required x-value. Thus,
x −64
−2 = 0.5 ⇒ 0.5 × (−2) = x − 64 ⇒ −1 = x − 64 ⇒ x = 63.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 57 / 62
Example
The production manager of Florida Gold Fruit Company estimates that the
sales of oranges are normally distributed with mean 4700 and standard
deviation 500. What is the probability that the company will sell
(a) more than 5500 oranges?
(b) more than 4500 oranges?
(c) less than 4900 oranges?
(d) less than 4300 oranges?
(e) between 4000 and 5600 oranges?

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 58 / 62
Solution
(a) Let X be the number of oranges sold by the company. Then
X ∼ N (4700, 250000). Hence, to find P(X > 5500) we standardize
−4700
x = 5500: z = 5500500 500 = 1.6, i.e., P(X > 5500) = P(Z > 1.6).
= 800
From the table, we obtain P(Z < 1.6) = 0.9452, so that
P(Z > 1.6) = 1 − P(Z < 1.6) = 1 − 0.9452 = 0.0548.
−4700
(b) For 4500, z = 4500500 = − 200
500 = −0.4, i.e.,
P(X > 4500) = P(Z > −0.4). From the table, P(Z < −0.4) = 0.3446,
hence P(Z > −0.4) = 0.6554.

(c)-(e) To be done in class

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 59 / 62
Task
1 Find the following probabilities for the standard normal distribution:
(a) P(z > 1.5)
(b) P(z < −0.68)
(c) P(0 < z < 1.5)
2 Mulubwa Plc wants to produce 1000 units of a particular replacement
part. The specification of the length of these parts is a minimum of
99 mm and a maximum of 104.4mm. The lengths of parts in a batch
produced by Mulubwa Plc is normally distributed with a mean of
102mm and a standard deviation of 2mm.
Parts cost K10 to make. Those that are too long are shortened at an
additional cost of K8, while those that are too short are scrapped.
(a) What proportion of parts are (i) undersized? (ii) oversized?
(b) Calculate the total cost of producing 1000 parts.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 60 / 62
Task
1 A set of final examination grades in an introductory statistics course
is normally distributed, with a mean of 73 and a standard deviation of
8.
(a) What is the probability that a student scored below 91 on this exam?
(b) What is the probability that a student scored between 65 and 89?
(c) The probability is 5% that a student taking the test scores higher than
what grade?
(d) If the professor grades on a curve (i.e., gives A’s to the top 10% of the
class, regardless of the score), are you better off with a grade of 81 on
this exam or a grade of 68 on a different exam, where the mean is 62
and the standard deviation is 3? Show your answer statistically and
explain.
2 Let Z be the standard normal distribution random variable. Find
(a) P(0.24 ≤ Z ≤ 1.48), P(Z ≤ 1.82), P(Z ≥ 1.48), P(Z ≤
−1.14), P(Z ≥ 6.00), P(Z ≤ 7.00).
(b) Find z such that : P (Z > z ) = 0.1611, P (Z > z ) =
0.0006637, P (Z < z ) = 0.9989, P (Z < z ) = 099966.

Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions


November 25, 2022 61 / 62
Edwin Moyo (emoyo@mu.ac.zm) Lecture 4 - Discrete and Continuous Probability Distributions
November 25, 2022 62 / 62

You might also like