Discrete Distributions
Discrete Distributions
Discrete Distributions
10,11,12
Date: September 20, 21,22,25
MA 2302: Introduction to Probability and Statistics
Instructor
Prof. Gopal Krishna Panda
Department of Mathematics
NIT Rourkela
Discrete distributions
𝐸 𝑋2 = 𝑥2 𝑓 𝑥 = 𝑥 𝑥 − 1 + 𝑥 𝑓 𝑥
𝑥 𝑥=0
𝑛 𝑛 𝑛
= 𝑥 𝑥 − 1 𝑓 𝑥 + 𝑥 𝑓 𝑥 = 𝑥 𝑥 − 1 𝑓 𝑥 + 𝑛𝑝
𝑥=0 𝑥=0 𝑥=2
𝑛 𝑛 y=x-2
𝑛 𝑥 𝑛−𝑥 2
𝑛 − 2 𝑥−2 𝑛−𝑥
= 𝑥 𝑥−1 𝑝 𝑞 + 𝑛𝑝 = 𝑛 𝑛 − 1 𝑝 𝑝 𝑞 + 𝑛𝑝
𝑥 𝑥−2
𝑥=2 𝑥=2
Discrete distributions
𝑛−2
𝑛 − 2 𝑦 (𝑛−2)−𝑦
=𝑛 𝑛−1 𝑝2 𝑝 𝑞 + 𝑛𝑝
𝑦
𝑦=0
= 𝑛 𝑛 − 1 𝑝2 𝑞 + 𝑝 𝑛−2 + 𝑛𝑝 = 𝑛 𝑛 − 1 𝑝2 + 𝑛𝑝
Now,
𝜎 2 = 𝐸 𝑋 2 − 𝜇2 = 𝑛 𝑛 − 1 𝑝2 + 𝑛𝑝 − 𝑛𝑝 2
= 𝑛𝑝 − 𝑛𝑝2 = 𝑛𝑝 1 − 𝑝 = 𝑛𝑝𝑞
3
Assignment: Using similar method, and the formula 𝜇3 = 𝜇3′ − 3𝜇2′ 𝜇1′ + 2𝜇1′ , prove that 𝜇3 =
𝑛𝑝𝑞(𝑞 − 𝑝).
Moment generating function
𝑛
𝑛 𝑥 𝑛−𝑥
𝐺 𝑡 =𝐸 𝑒 𝑡𝑋 = 𝑒 𝑡𝑥 𝑓 𝑥 = 𝑒 𝑡𝑥 𝑝 𝑞
𝑥
𝑥 𝑥=0
𝑛
𝑛
= 𝑝𝑒 𝑡 𝑥 𝑞 𝑛−𝑥
= 𝑞 + 𝑝𝑒 𝑡 𝑛.
𝑥
𝑥=0
Discrete distributions
Hence,
𝜇2′ = 𝐸 𝑋 2 = 𝐺 ′′ 0 = 𝑛 𝑛 − 1 𝑝2 + 𝑛𝑝
Consider the following example we have discussed earlier with minor modification:
A bag contains 𝑁 LED bulbs of equal size and shape out of which 𝑀 are 17 W each and rest
are 23W each. 𝑛 bulbs are chosen at random. What is the probability that 𝑥 of 𝑛 bulbs
chosen are 17 W?
To address this problem, let 𝑋 denote the random variable which counts the number of 17 W
LED bulbs in the sample. We cannot conclude any thing about the distribution of 𝑋 unless we
know how the bulbs are chosen, with replacement (WR) or WOR. If bulbs are drawn WR, then
we can use the idea of Example 1 and answer as follows:
𝑛 𝑥 𝑛−𝑥
𝑓 𝑥 = Pr 𝑋 = 𝑥 = 𝑝 𝑞 , 𝑥 = 0,1,2, … , 𝑛
𝑥
𝑀 𝑁−𝑀
where 𝑝 = and 𝑞 = 1 − 𝑝 = . Here, clearly, the distribution of 𝑋 is binomial with
𝑁 𝑁
parameters 𝑛 and 𝑝.
If the bulbs are chosen WOR, then by basic combinatorial principle, the number of ways of
choosing 𝑛 bulbs such that 𝑥 are 17 W and rest are 23 W is given by 𝑀 𝑥
𝑁−𝑀
𝑛−𝑥
and the total
number of choosing 𝑛 bulbs out of 𝑁 is given by 𝑁𝑛
. Hence, by the basic definition of
probability
𝑀 𝑁−𝑀
𝑥 𝑛−𝑥
𝑓 𝑥 = Pr 𝑋 = 𝑥 = 𝑁 , 𝑥 = 0,1,2, … , 𝑛.
𝑛
However, our assumption here is that 𝑛 ≤ min 𝑀, 𝑁 − 𝑀 so that one can choose all 17 W or
all 23 W LED bulbs.
Or, equivalently
Discrete distributions
Or, equivalently
𝑛
𝑀 𝑁−𝑀 𝑁
= .
𝑥 𝑛−𝑥 𝑛
𝑥=0
The distribution of the total probability according to the rule of previous slide is known as a
hypergeometric distribution. We answer the question of Ex 1 subject to WOR.
Example 3. A bag contains 20 LED bulbs of equal size and shape out of which 8 are 17 W
each and 12 are 23W each. Five bulbs are chosen (with without replacement). Find the
probability that out of these 5 bulbs (a) there is at least two 17 W bulbs, (b) more 23W
bulbs than 17W bulbs.
Discrete distributions
Ans. Here 𝑁 = 20, 𝑀 = 8, 𝑛 = 5 and as usual 𝑋 is the number of 17 W LED bulbs in the
sample. Thus,
8 12
𝑥 5−𝑥
𝑓 𝑥 = Pr 𝑋 = 𝑥 = 20 , 𝑥 = 0, 1, 2, 3, 4, 5.
5
(a) Pr at least two 17 W bulbs in the sample = Pr 𝑋 ≥ 2 = 1 − Pr 𝑋 ≤ 1
12 12
5
8× 4
=1−𝑓 0 −𝑓 1 =1− 20 − 20 = 0.6935
5 5
12 8 12
5 8× 12
4 2 3
= 20 + 20 + 20 = 0.7038
5 5 5
Discrete distributions
Mean and variance of hypergeometric distribution:
𝑛 𝑛 𝑀 𝑁−𝑀
𝑥 𝑛−𝑥
𝜇 = 𝑥𝑓 𝑥 = 𝑥𝑓 𝑥 = 𝑥 ⋅ 𝑁
𝑥 𝑥=0 𝑥=1 𝑛
𝑛 𝑛−1
𝑀 𝑀−1 𝑁−𝑀 𝑀 𝑀−1 𝑁−𝑀
= 𝑁 = 𝑁
𝑥−1 𝑛−𝑥 𝑦 (𝑛 − 1) − 𝑦
𝑛 𝑥=1 𝑛 𝑦=0
𝑀 𝑁−1 𝑛𝑀
= 𝑁 ⋅ = .
𝑛−1 𝑁
𝑛
𝐸 𝑋2 = 𝑥2 𝑓 𝑥 = 𝑥 𝑥 − 1 + 𝑥 𝑓 𝑥
𝑥 𝑥=0
𝑛 𝑛 𝑛
𝑛𝑀
= 𝑥 𝑥 −1 𝑓 𝑥 +𝑥𝑓 𝑥 = 𝑥 𝑥−1 𝑓 𝑥 +
𝑁
𝑥=0 𝑥=0 𝑥=2
Discrete distributions
𝑛 𝑀 𝑁−𝑀
𝑥 𝑛−𝑥 𝑛𝑀
= 𝑥 𝑥−1 ⋅ 𝑁 +
𝑁
𝑥=2 𝑛
𝑛
𝑀(𝑀 − 1) 𝑀−2 𝑁−𝑀 𝑛𝑀
= 𝑁 +
𝑥−2 𝑛−𝑥 𝑁
𝑛 𝑥=2
𝑛−2
𝑀(𝑀 − 1) 𝑀−2 𝑁−𝑀 𝑛𝑀
= 𝑁 +
𝑦 𝑛−2 −𝑦 𝑁
𝑛 𝑦=0
𝑀(𝑀 − 1) 𝑁−2 𝑛𝑀
= 𝑁 ⋅ +
𝑛−2 𝑁
𝑛
Now
𝑁𝑀(𝑁 − 𝑀)(𝑁 − 𝑛)
𝜎2 =𝐸 𝑋2 − 𝜇2 = 2 .
𝑁 (𝑁 − 1)
Discrete distributions
Once again consider a sequence of Bernoulli trials with probability of success 𝑝 in each trial. Let
𝑋 be the number of trials till the first success is achieved. Consider the following example:
Example 4: Let 𝑝 be the probability of Amar’s passing a test of multiple choice type questions
in one attempt. If he only guesses with no knowledge of correct answers, what is the
probability that he will pass the test in 𝑘-th attempt?
Ans. Let 𝑋 be the number of attempts Amar needs for passing the test. He passes for the first
time in the 𝑘-th test means that he fails in the previous 𝑘 − 1 tests. Hence,
Pr 𝑋 = 𝑘 = 𝑃 𝐹𝐹𝐹𝐹 … … 𝐹𝐹𝑆 = 𝑞 𝑘−1 𝑝, 𝑘 = 1,2,3, …
Thus, in sequence of Bernoulli trials, the probability of first success in the 𝑥-th trial is equal to
𝑓 𝑥 = 𝑞 𝑥−1 𝑝, 𝑥 = 1,2,3, …
Notice that σ∞ 2
𝑥=1 𝑓 𝑥 = 𝑝 1 + 𝑞 + 𝑞 + ⋯ = 𝑝 1 − 𝑞
−1 = 1 and the distribution of the
total probability 1 according to the above rule is known as a geometric distribution. Successive
terms of this distribution forms a geometric progression, justifying the name.
Discrete distributions
𝐸 𝑋 2 = 𝑥 2 𝑓 𝑥 = 𝑥 𝑥 − 1 + 𝑥 𝑓 𝑥 = 𝑥 𝑥 − 1 𝑞 𝑥−1 𝑝 + 𝑥 𝑓 𝑥
𝑥 𝑥=1 𝑥=1 𝑥=1
∞ ∞ ∞
1 1 𝜕2 1 𝜕2
= 𝑝𝑞 𝑥 𝑥 − 1 𝑞 𝑥−2 + = 𝑝𝑞 2 𝑞 𝑥 + = 𝑝𝑞 2 𝑞 𝑥 +
𝑝 𝜕𝑞 𝑝 𝜕𝑞 𝑝
𝑥=1 𝑥=1 𝑥=1
𝜕2 1 1 2𝑝𝑞 1 2𝑞 1
= 𝑝𝑞 2 −1 + = 3
+ = 2+ .
𝜕𝑞 1 − 𝑞 𝑝 1−𝑞 𝑝 𝑝 𝑝
𝑒 −𝜆 𝜆𝑥
𝑓 𝑥 = , 𝑥 = 0,1,2, …
𝑥!
−𝜆 σ∞ 𝜆𝑥
Observe that σ∞
𝑥=0 𝑓 𝑥 =𝑒 𝑥=0 𝑥! = 𝑒 −𝜆 ⋅ 𝑒 𝜆 = 1 . Since the Poisson distribution is
obtained as a limiting case of binomial distribution under the assumption that 𝑛 → ∞ and 𝑝 →
0, it is clear that we can approximate the binomial distribution to Poisson distribution when the
event what is called success is a rare one.
Example 5: Suppose that 1.5% of steel rods made by a machine are defective, the defectives
occurring at random during production. If the rods are packaged 200 per box with the
guarantee that not more than 5 rods per box are defective, what percentage of boxes will fail to
meet the guarantee? What is the probability that a box will contain at least one defective rod?
Ans. Let 𝑋 be the number of defective rods in a box. Then, as per question 𝑋~𝐵(200, 0.015).
Since 𝑛 = 200 is large, 𝑝 = 0.015 is small and 𝑛𝑝 = 3 is not large, the distribution of 𝑋 can be
approximated by Poisson with 𝜆 = 3.
Discrete distributions
= Pr 𝑋 > 5 = 1 − Pr 𝑋 ≤ 5 = 1 − [𝑓 0 + 𝑓 1 + 𝑓 2 + 𝑓 3 + 𝑓 4 + 𝑓 5 ]
32 33 34 35
= 1 − 𝑒 −3 1+3+ + + + = 1 − 0.8041 = 0.1959.
2! 3! 4! 5!
= Pr 𝑋 ≥ 1 = 1 − Pr 𝑋 = 0 = 1 − 𝑓 0 = 1 − 𝑒 −3 = 0.9502.
Discrete distributions
𝐸 𝑋2 = 𝑥2 𝑓 𝑥 = 𝑥 𝑥 − 1 + 𝑥 𝑓 𝑥
𝑥 𝑥=0
∞ ∞
𝑒 −𝜆 𝜆𝑥
= 𝑥 𝑥−1 + 𝑥𝑓 𝑥
𝑥!
𝑥=2 𝑥=0
∞ ∞
𝜆𝑥−2 𝜆 𝑦
= 𝜆2 𝑒 −𝜆 + 𝜆 = 𝜆2 𝑒 −𝜆 +𝜆
(𝑥 − 2)! 𝑦!
𝑥=2 𝑦=0
= 𝜆2 𝑒 −𝜆 𝑒 𝜆 + 𝜆 = 𝜆2 + 𝜆.
Discrete distributions
Hence, in case of Poisson distribution, the mean and variance are same.
Hence,
𝜇32 1 𝜇4 1
𝛽1 = 3 = , 𝛽2 = 2 = 3 + ,
𝜇2 𝜆 𝜇2 𝜆
1 1
𝛾1 = 𝛽1 = , 𝛾2 = 𝛽2 − 3 = .
𝜆 𝜆
Example 8: Suppose that a certain type of magnetic tape contains, on the average, 2 defects
per 100 meters. What is the probability that a roll of tape 300 meters long will contain (a) no
defects, (b) not more than 3 defects? Use Poisson distribution. Discussion is class
Hints: Let 𝑋 be the number of defects in a 300 m long tap. Then 𝑋~𝑃 6 . Find Pr 𝑋 = 0 ,
Pr 𝑋 ≤ 3
Example 9: If a ticket office can serve at most 4 customers per minute and the average number
of customers is 120 per hour, what is the probability that during a given minute customers will
have to wait? (Use the Poisson distribution) Discussion is class
Hints: Let 𝑋 be the number of customers arriving per minute. Then 𝑋~𝑃 2 . Find Pr{𝑋 > 4}
Example 10: Suppose that in the production of 60-ohm radio resistors, non-defective items are
those that have a resistance between 58 and 62 ohms and the probability of a resistor’s being
defective is 0.02. The resistors are sold in lots of 200, with the guarantee that all resistors are
non-defective. What is the probability that a given lot will violate this guarantee? (Use the
Poisson distribution.) Discussion is class
Hints: Let 𝑋 be the no. of defective resistors in a box. Then 𝑋~𝐵(200,0.02) → Poisson with
mean 4.
Discrete distributions
Example 11: A process of manufacturing screws is checked every hour by inspecting 𝑛 screws
selected at random from that hour’s production. If one or more screws are defective, the
process is halted and carefully examined. How large should 𝑛 be if the manufacturer wants the
probability to be about 95% that the process will be halted when 10% of the screws being
produced are defective? (Assume independence of the quality of any screw from that of the
other screws.)
Ans. Out of 𝑛 screws examined every hour, let 𝑋 be the number of defective screws in
the sample. The manufacturer wants to halt the process when at least one out of 𝑛
screws are defective. When 𝑝 = 10% = 0.1 , 𝑋~𝐵 𝑛, 0.1 .
We want that
Pr{𝑋 ≥ 1} = 0.95 ⇒ 1 − 𝑓 0 = 0.95 ⇒ 𝑓 0 = 0.05
⇒ 0.9𝑛 = 0.05 ⇒ 𝑛 ≈ 28.
Discrete distributions
Multinomial distribution
Consider a random experiment (say throwing a die) leading to a sample space 𝑆 and
𝐴1 , 𝐴2 , … , 𝐴𝑘 be 𝑘 mutually exclusive events defined on 𝑆 such that 𝑆 = 𝐴1 ∪ 𝐴2 ∪ ⋯ ∪ 𝐴𝑘 ,
𝑃 𝐴𝑖 = 𝑝𝑖 > 0, 𝑖 = 1,2, … , 𝑘. Repeat this experiment 𝑛 times independently. Let 𝑋𝑖 be the
number times 𝐴𝑖 occurs, 𝑖 = 1,2, … , 𝑘. Then 𝑋1 + 𝑋2 + ⋯ + 𝑋𝑘 = 𝑛. The total number of
points in the revised sample space is equal to 𝑘 𝑛 . If an element of the sample space contains
𝑥 𝑥 𝑥
𝑥1 𝐴1 𝑠, 𝑥2 𝐴2 𝑠, … , 𝑥𝑘 𝐴𝑘 𝑠, then probability of that point is 𝑝1 1 𝑝2 2 ⋯ 𝑝𝑘 𝑘 and number of such
points are
𝑛 𝑛 − 𝑥1 𝑛 − 𝑥1 − 𝑥2 𝑛 − 𝑥1 − 𝑥2 − ⋯ 𝑥𝑛−1 𝑛!
⋯ =
𝑥1 𝑥2 𝑥3 𝑥𝑘 𝑥1 ! 𝑥2 ! ⋯ 𝑥𝑘 !
where 𝑥1 + 𝑥2 + ⋯ + 𝑥𝑘 = 𝑛. Hence
𝑛! 𝑥 𝑥 𝑥
Pr 𝑋1 = 𝑥1 , 𝑋2 = 𝑥2 , … , 𝑋𝑘 = 𝑥𝑘 = 𝑓 𝑥1 , 𝑥2 , … , 𝑥𝑘 = ⋅ 𝑝1 1 𝑝2 2 ⋯ 𝑝𝑘 𝑘 .
𝑥1 ! 𝑥2 ! ⋯ 𝑥𝑘 !
Discrete distributions
Example 12: What is the probability of drawing 4 white, 3 black and 2 red balls from a box
consisting of 10 white, 8 black and 7 red balls if 9 balls are drawn from it with replacement?
Ans. Let 𝑋1 , 𝑋2 and 𝑋3 be the number of white, black and red balls drawn. Observe that
2 8 7
𝑛 = 9, 𝑝1 = , 𝑝2 = ,𝑝 = .
5 25 3 25
4 3 2
9! 2 8 7
Pr 𝑋1 = 4, 𝑋2 = 3, 𝑋3 = 2 = ⋅ .
4! 3! 2! 5 25 25