Geometric and Negative Binomial Distributions · Pascal’s TrianglePractice ProblemsGeometric...
Embed Size (px)
Transcript of Geometric and Negative Binomial Distributions · Pascal’s TrianglePractice ProblemsGeometric...

Geometric and Negative Binomial Distributions

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Pascal’s Triangle
Arthur Berg Geometric and Negative Binomial Distributions 2/ 17
http://en.wikipedia.org/wiki/Pascal's_triangle

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Pascal’s Triangle
(nk
)=(
n− 1k − 1
)+(
n− 1k
)(k = 1, . . . , n− 1)
Arthur Berg Geometric and Negative Binomial Distributions 3/ 17
http://demonstrations.wolfram.com/PascalsTriangleAndTheBinomialTheorem/

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Chebyshev’s inequality example
Example (#4.33 p. 132)The number of equipment breakdowns in a manufacturing plant is closelymonitored by the supervisor of operations, because it is critical to the productionprocess. The number averages 5 per week, witha a standard deviation of 0.8 perweek.
1 Find an interval that includes at least 90% of the weekly figures for thenumber of breakdowns.
2 The supervisor promises that the number of breakdowns will rarely exceed8 in a oneweek period. Is the director safe in making this claim? Why?
Arthur Berg Geometric and Negative Binomial Distributions 4/ 17
http://en.wikipedia.org/wiki/Chebyshev's_inequality

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Binomial Example
Example (#4.3 p. 144)Every hospital has backup generators for critical systems should the electricitygo out. Independent but identical backup generators are installed so that theprobability that at least one system will operate correctly when called upon is noless than .99. Let n denote the number of backup generators in a hospital. Howlarge must n be to achieve the specified probability of at least one generatoroperating, if
1 p = .95?2 p = .8?
Arthur Berg Geometric and Negative Binomial Distributions 5/ 17

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Binomial Example
Example (#8 from an old test )A hospital has seven backup generators, and three are required to sustain theoperations of the hospital upon blackout. If the probability a given generatorworks is .8 and each of the backup generators are independent, what is theprobability that at least three backup generators will be working if a blackoutoccurs?
Arthur Berg Geometric and Negative Binomial Distributions 6/ 17
http://www.stat.ufl.edu/~berg/sta4321/files/test2.pdf

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Geometric Distribution – Number of Failures to FirstSuccess
When flipping a coin, we count the number of tails before the first headsappears.
When setting off fireworks, we count the number of successfully firedfireworks before the first dud appears.
When rolling two dice, we count the number of rolls before the dice sum toseven.
Number of Failures to First Success(or equivalently, number of success to first failure)
Arthur Berg Geometric and Negative Binomial Distributions 7/ 17

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Geometric Distribution built from Bernoulli rv’s
Let Y1, Y2, . . . be iid Bernoulli(p) random variables, i.e.
Yi =
{1, w.p. p0, w.p. 1− p.
Let X be the random variable that counts the number of failures of the Bernoullitrials before the first success.Therefore
if Y1 = 1 then X = 0if Y1 = 0 and Y2 = 1 then X = 1if Y1 = 0, Y2 = 0, and Y3 = 1 then X = 2...
...
Arthur Berg Geometric and Negative Binomial Distributions 8/ 17

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Probability Mass Function of the Geometric Distribution
P(X = k) = p(k)= P(Y1 = 0, Y2 = 0, . . . , Yk = 0, Yk+1 = 1)= P(Y1 = 0)P(Y2 = 0) · · ·P(Yk = 0)P(Yk+1 = 1)= (1− p)(1− p) · · · (1− p)p= (1− p)kp= qkp
The geometric decay of the pmf gives rise to the name geometric distribution.
Arthur Berg Geometric and Negative Binomial Distributions 9/ 17

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Summing the pmf
Let’s check that the pmf sums to one.∞∑
k=0
p(k) =∞∑
k=0
(1− p)kp
= p∞∑
k=0
(1− p)k
=p
1− (1− p)= 1
And the cdf is computed as
F(x) = P(X ≤ x) =x∑
k=0
qkp = px∑
k=0
qk
= p(
1− qx+1
1− q
)= p
(1− qx+1
p
)= 1− qx+1
Arthur Berg Geometric and Negative Binomial Distributions 10/ 17

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Mean and Variance of the Geometric Distribution
E(X) =∞∑
k=0
kpqk = p∞∑
k=0
kqk
= p(0 + q + 2q2 + 3q3 + · · ·
)= pq(1 + 2q + 3q2 + · · · )
From the usual geometric series,1
1− q= 1 + q + q2 + q3 + · · ·
take the derivative of both sides with respect to q to get1
(1− q)2= 1 + 2q + 3q2 + · · ·
Therefore E(X) is computed to be
E(X) = pq(
1(1− q)2
)=
pqp2
=1− p
pArthur Berg Geometric and Negative Binomial Distributions 11/ 17

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Memoryless Property of the Geometric Distribution
The geometric distribution is the only discrete distribution that has thememoryless property.(The exponential distribution is the only continuous distribution that has thememoryless property.)If we have observed j failures, then the probability of observing at lease k morefailures is independent of the event that j failures were just witnessed.
P(X ≥ j + kX ≥ j) = P(X ≥ k)
Arthur Berg Geometric and Negative Binomial Distributions 12/ 17
http://en.wikipedia.org/wiki/Memorylessness

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Other Parameterizations of the Geometric Distribution
Instead of number of failures until the first success, we may be interested in thetime to the first success. In other words,
if Y1 = 1 then X̃ = 1if Y1 = 0 and Y2 = 1 then X̃ = 2if Y1 = 0, Y2 = 0, and Y3 = 1 then X̃ = 3...
...
In this parametrization, pX̃(k) = pX(k − 1) = pqk−1 for k = 1, 2, . . ..The expected value of X̃ is
E(X̃) =∞∑
k=1
kpqk−1 =1q
∞∑k=1
kpqk =1q
E(X) =1p
And there are other parameterizations like in section 4.5.3 (p.158).
Arthur Berg Geometric and Negative Binomial Distributions 13/ 17

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Coupon Collector’s ProblemSuppose there are n distinct action figures in a set, and suppose a random actionfigure from this set is placed in every Wheaties cereal box. How many boxes ofWheaties are you expected to buy to have a full set of action figures? Let T bethe number of boxes opened when finally one has collected all of the actionfigures. Let Ti denote the number of boxes opened to collect the ith distinctaction figure after already having found i− 1 distinct action figures. Thus
T = T1 + T2 + · · ·+ Tnand so
E(T) = E(T1) + E(T2) + · · ·+ E(Tn)Notice that Ti follows the geometric distribution (as parameterized in theprevious slide) with p = n−(i−1)n . Therefore
E(T) = E(T1) + E(T2) + · · ·+ E(Tn)
=n∑
i=1
nn− i + 1
=nn
+n
n− 1+ · · ·+ n
1= n
(11
+12
+ · · ·+ 1n
)︸ ︷︷ ︸
Harmonic number
e.g. when n = 50, E(T) = 225Arthur Berg Geometric and Negative Binomial Distributions 14/ 17
http://en.wikipedia.org/wiki/Coupon_collector's_problem

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Negative Binomial Distribution
The negative binomial distribution generalizes the geometric distribution to givethe number of failures before the rth success occurs. The pmf is given as
P(X = k) = P( the first (k+r1) trials contain (r − 1) successes)× P((k + r)th trial is a success)
=(
k + r − 1r − 1
)pr−1(1− p)k × p
=(
k + r − 1r − 1
)pr(1− p)k
Arthur Berg Geometric and Negative Binomial Distributions 15/ 17

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
William Gosset, “Student” (18761937)
Arthur Berg Geometric and Negative Binomial Distributions 16/ 17

Pascal’s Triangle Practice Problems Geometric Distribution Negative Binomial Distribution
Happy Valentine’s Day!
Arthur Berg Geometric and Negative Binomial Distributions 17/ 17
Pascal's TrianglePractice ProblemsGeometric DistributionNegative Binomial Distribution