Statistics
Hossam M. Hassan
Assistant Professor
Data Scientist
Chapter 5
Discrete Probability Distributions
Objectives
In this chapter, you learn:
• The properties of a probability distribution.
• How to compute the expected value and variance of a
probability distribution.
• How to compute probabilities from binomial and Poisson
distributions.
• How to use the binomial and Poisson distributions to
solve business problems.
Definitions
• Discrete variables produce outcomes that come
from a counting process (e.g. number of classes
you are taking).
• Continuous variables produce outcomes that
come from a measurement (e.g. your annual
salary, or your weight).
Types Of Variables
Types Of
Variables
Ch. 5 Discrete Continuous Ch. 6
Variable Variable
Discrete Variables
• Can only assume a countable number of values.
Examples:
• Roll a die twice
Let X be the number of times 4 occurs
(then X could be 0, 1, or 2 times).
• Toss a coin 5 times.
Let X be the number of heads
(then X = 0, 1, 2, 3, 4, or 5).
Probability Distribution For A
Discrete Variable
• A probability distribution for a discrete variable is a
mutually exclusive list of all possible numerical outcomes for
that variable and a probability of occurrence associated with
each outcome.
Interruptions Per Day In Probability
Computer Network
0 0.35
1 0.25
2 0.20
3 0.10
4 0.05
5 0.05
Probability Distributions Are Often
Represented Graphically
P(X)
0.4
0.3
0.2
0.1
0 1 2 3 4 5 X
Expected Value Of Discrete Variables, Measuring
Center
• Expected Value (or mean) of a discrete
variable (Weighted Average): 𝑁
𝜇 = E(X) = 𝑥𝑖 𝑃(𝑋 = 𝑥𝑖 )
𝑖=1
Interruptions Per Day In Probability
Computer Network (𝒙𝒊) 𝑷(𝑿 = 𝒙𝒊) 𝒙𝒊𝑷(𝑿 = 𝒙𝒊)
0 0.35 (0)(0.35) = 0.00
1 0.25 (1)(0.25) = 0.25
2 0.20 (2)(0.20) = 0.40
3 0.10 (3)(0.10) = 0.30
4 0.05 (4)(0.05) = 0.20
5 0.05 (5)(0.05) = 0.25
1.00 μ = E(X) = 1.40
Discrete Variables:
Measuring Dispersion
• Variance of a discrete variable.
N
σ2 = [xi − E(X)]2 P(X = xi )
i=1
• Standard Deviation of a discrete variable.
σ= σ2 = [xi − E(X)]2 P(X = xi )
i=1
where:
E(X) = Expected value of the discrete variable X
xi = the ith outcome of X
P(X=xi) = Probability of the ith occurrence of X
Discrete Variables: Measuring Dispersion
(continued)
N
σ= [xi − E(X)]2 P(X = xi )
i=1
Interruptions Per
Day In Computer Probability
Network (xi) 𝑷(𝑿 = 𝒙𝒊) [𝒙𝒊 – 𝑬(𝑿)]𝟐 [𝒙𝒊 – 𝑬(𝑿)]𝟐𝑷(𝑿 = 𝒙𝒊)
0 0.35 (0 – 1.4)2 = 1.96 (1.96)(0.35) = 0.686
1 0.25 (1 – 1.4)2 = 0.16 (0.16)(0.25) = 0.040
2 0.20 (2 – 1.4)2 = 0.36 (0.36)(0.20) = 0.072
3 0.10 (3 – 1.4)2 = 2.56 (2.56)(0.10) = 0.256
4 0.05 (4 – 1.4)2 = 6.76 (6.76)(0.05) = 0.338
5 0.05 (5 – 1.4)2 = 12.96 (12.96)(0.05) = 0.648
σ2 = 2.04, σ = 1.4283
Probability Distributions
Probability
Distributions
Ch. 5 Discrete Continuous Ch. 6
Probability Probability
Distributions Distributions
Binomial Normal
Poisson Uniform
Binomial Probability Distribution
◼ A fixed number of observations, n.
◼ e.g., 15 tosses of a coin; ten light bulbs taken from a warehouse.
◼ Each observation is classified into one of two mutually
exclusive & collectively exhaustive categories.
◼ e.g., head or tail in each toss of a coin; defective or not defective light
bulb.
◼ The probability of being classified as the event of
interest, π, is constant from observation to observation.
◼ Probability of getting a tail is the same each time we toss the coin.
◼ Since the two categories are mutually exclusive and collectively
exhaustive, when the probability of the event of interest is π, the
probability of the event of interest not occurring is 1 – π.
◼ The value of any observation is independent of the value
of any other observation.
Possible Applications for the Binomial
Distribution
• A manufacturing plant labels items as either
defective or acceptable.
• A firm bidding for contracts will either get a contract
or not.
• A marketing research firm receives survey
responses of “yes I will buy” or “no I will not.”
• New job applicants either accept the offer or reject
it.
The Binomial Distribution
Counting Techniques
• Suppose the event of interest is obtaining heads on the
toss of a fair coin. You are to toss the coin three times. In
how many ways can you get two heads?
• Possible ways: HHT, HTH, THH, so there are three ways
you can getting two heads.
• This situation is fairly simple. We need to be able to count
the number of ways for more complicated situations.
Counting Techniques
Rule of Combinations
• The number of combinations of selecting x objects
out of n objects is:
n!
nCx =
x!(n − x)!
where:
n! =(n)(n - 1)(n - 2) . . . (2)(1)
x! = (X)(X - 1)(X - 2) . . . (2)(1)
0! = 1 (by definition)
Counting Techniques
Rule of Combinations
• How many possible 3 scoop combinations could you
create at an ice cream parlor if you have 31 flavors to
select from and no flavor can be used more than once in
the 3 scoops?
• The total choices is n = 31, and we select X = 3.
31! 31! 31• 30 • 29 • 28!
31 C 3 = = = = 31• 5 • 29 = 4,495
3!(31− 3)! 3!28! 3 • 2 • 1 • 28!
Binomial Distribution Formula
n! x n−x
P(X=x |n,π) = π (1-π)
x! (n − x )!
P(X=x|n,π) = probability that X = x events of
interest, given n and π Example: Flip a coin four
times, let x = # heads:
x = number of “events of interest” in sample,
(x = 0, 1, 2, ..., n) n=4
n = sample size (number of trials π = 0.5
or observations) 1 - π = (1 - 0.5) = 0.5
π = probability of “event of interest” X = 0, 1, 2, 3, 4
1 – π = probability of not having an
event of interest
Example:
Calculating a Binomial Probability
What is the probability of one success in five
observations if the probability of an event of
interest is 0.1?
x = 1, n = 5, and π = 0.1
n!
P (X = 1 | 5,0.1) = x (1 − ) n − x
x! (n − x)!
5!
= (0.1)1 (1 − 0.1)5−1
1!(5 − 1)!
= (5)(0.1)(0.9) 4
= 0.32805
The Binomial Distribution
Example
Suppose the probability of an invoice payment being
late is 0.10. What is the probability of 1 late invoice
payment in a group of 4 invoices?
x = 1, n = 4, and π = 0.10
n!
P (X = 1 | 4, 0.10) = x (1 − ) n − x
x! (n − x)!
4!
= (0.10)1 (1 − 0.10)4−1
1!(4 − 1)!
= (4)(0.10)(0.729)
= 0.2916
The Binomial Distribution
Shape
• The shape of the binomial
distribution depends on .6
P(X=x|5, 0.1)
the values of π and n. .4
.2
◼ Here, n = 5 and π = 0.1. 0
0 1 2 3 4 5 x
P(X=x|5, 0.5)
.6
.4
◼ Here, n = 5 and π = 0.5. .2
0
0 1 2 3 4 5 x
Binomial Distribution Characteristics
• Mean: μ = E(X) = n𝜋
◼ Variance and Standard Deviation:
σ2 = n𝜋(1−𝜋)
σ= n𝜋(1−𝜋)
Where n = sample size
π = probability of the event of interest for any trial
(1 – π) = probability of no event of interest for any trial
The Binomial Distribution
Characteristics
Examples
P(X=x|5, 0.1)
μ = nπ = (5)(.1) = 0.5 .6
.4
σ = nπ (1 - π ) = (5)(.1)(1 − .1) .2
0
= 0.6708 0 1 2 3 4 5 x
P(X=x|5, 0.5)
μ = nπ = (5)(.5) = 2.5 .6
.4
σ = nπ (1 - π ) = (5)(.5)(1 − .5) .2
0
= 1.118 0 1 2 3 4 5 x
The Poisson Distribution
Definitions
• You use the Poisson distribution when you are
interested in the number of times an event occurs
in a given area of opportunity.
• An area of opportunity is a continuous unit or
interval of time, volume, or such area in which
more than one occurrence of an event can occur.
• The number of scratches in a car’s paint.
• The number of mosquito bites on a person.
• The number of computer crashes in a day
The Poisson Distribution
• Apply the Poisson Distribution when:
• You are interested in counting the number of times a particular
event occurs in a given area of opportunity. An area of
opportunity is defined by time, length, surface area, and so
forth.
• The probability that an event occurs in a given area of
opportunity is the same for all the areas of opportunity.
• The number of events that occur in one area of opportunity is
independent of the number of events that occur in any other
area of opportunity.
• The probability that two or more events will occur in an area of
opportunity approaches zero as the area of opportunity
becomes smaller.
• The average number of events per unit is (lambda).
Poisson Distribution Formula
−
e x
P( X = x | ) =
x!
where:
x = number of events in an area of opportunity
= expected number of events
e = base of the natural logarithm system (2.71828...)
Poisson Distribution Characteristics
• Mean: μ=λ
◼ Variance and Standard Deviation:
σ2 = λ
σ= λ
where = expected number of events.
The Poisson Distribution Example
The mean number of customers who arrive per minute
at a bank during the noon-to-1pm hour is 3.0. What is
the probability that 2 customers arrive in a given
minute?
𝑥 = 2, 𝜆 = 3.0
e − x e −3.0 3.0 2
P(X = 2|3.0) = =
x! 2!
9
=
2.71828 3 ( 2 )
= 0.2240
Graph of Poisson Probabilities
Graphically:
= 0.50
=
X 0.50
0 0.6065
1 0.3033
2 0.0758
3 0.0126
4 0.0016
5 0.0002
6 0.0000
P(X = 2 | =0.50) = 0.0758
7 0.0000
Poisson Distribution Shape
• The shape of the Poisson Distribution depends
on the parameter :
= 0.50 = 3.00
Chapter Summary
In this chapter we covered:
• The properties of a probability distribution.
• Computing the expected value and variance of a
probability distribution.
• Computing probabilities from binomial and Poisson
distributions.
• Using the binomial and Poisson distributions to solve
business problems.