EECS 70 Discrete Mathematics and Probability TheorySpring 2014 Anant Sahai Note 17Some Important DistributionsIn this note we will introduce three important probability distributions that are widely used to model real-world phenomena. The first of these which we already learned about in the last Lecture Note is the binomialdistribution Bin(n, p). This is the distribution of the number of Heads, Sn, in n tosses of a biased coin withprobability p to be Heads. As we saw, P[Sn= k] =nkpk(1 − p)n−k. E[Sn] = np, Var[Sn] = np(1 − p) andσ(Sn) =pnp(1 − p).Geometric DistributionQuestion: A biased coin with Heads probability p is tossed repeatedly until the first Head appears. What isthe distribution and the expected number of tosses?As always, our first step in answering the question must be to define the sample space Ω . A moment’sthought tells us thatΩ = {H,T H, T T H,T T T H,. ..},i.e., Ω consists of all sequences over the alphabet {H,T } that end with H and contain no other H’s. This isour first example of an infinite sample space (though it is still discrete).What is the probability of a sample point, say ω = T T H? Since successive coin tosses are independent (thisis implicit in the statement of the problem), we havePr[T T H] = (1 − p) × (1 − p) × p = (1 − p)2p.And generally, for any sequence ω ∈ Ω of length i, we have Pr[ω] = (1 − p)i−1p. To be sure everything isconsistent, we should check that the probabilities of all the sample points add up to 1. Since there is exactlyone sequence of each length i ≥ 1 in Ω , we have∑ω∈ΩPr[ω] =∞∑i=1(1 − p)i−1p = p∞∑i=0(1 − p)i= p ×11 − (1 − p)= 1,as expected. [In the second-last step here, we used the formula for summing a geometric series.]Now let the random variable X denote the number of tosses in our sequence (i.e., X (ω) is the length of ω).Its distribution has a special name: it is called the geometric distribution with parameter p (where p is theprobability that the coin comes up Heads on each toss).Definition 17.1 (geometric distribution): A random variable X for whichPr[X = i] = (1 − p)i−1p for i = 1,2,3,. . .is said to have the geometric distribution with parameter p. This is abbreviated as X ∼ Geom(p).If we plot the distribution of X (i.e., the values Pr[X = i] against i) we get a curve that decreases monotoni-cally by a factor of 1 − p at each step. See Figure 1.EECS 70, Spring 2014, Note 17 1Figure 1: The Geometric distribution.Our next goal is to compute E(X). Despite the fact that X counts something, there’s no obvious way to writeit as a sum of simple r.v.’s as we did in many examples in an earlier lecture note. (Try it!) In a later lecture,we will give a slick way to do this calculation. For now, let’s just dive in and try a direct computation ofE(X). Note that the distribution of X is quite simple:Pr[X = i] = (1 − p)i−1p for i = 1,2,3,. . .So from the definition of expectation we haveE(X) = (1 × p) + (2 × (1 − p)p) +(3 × (1 − p)2p) + · · · = p∞∑i=1i(1 − p)i−1.This series is a blend of an arithmetic series (the i part) and a geometric series (the (1 − p)i−1part). Thereare several ways to sum it. Here is one way, using an auxiliary trick (given in the following Theorem) thatis often very useful. [Ask your TA about other ways.]Theorem 17.1: Let X be a random variable that takes on only non-negative integer values. ThenE(X) =∞∑i=1Pr[X ≥ i].Proof: For notational convenience, let’s write pi= Pr[X = i], for i = 0,1, 2,. . .. From the definition ofexpectation, we haveE(X) = (0 × p0) + (1 × p1) + (2 × p2) + (3 × p3) + (4 × p4) + · · ·= p1+ (p2+ p2) + (p3+ p3+ p3) + (p4+ p4+ p4+ p4) + · · ·= (p1+ p2+ p3+ p4+ ···) +(p2+ p3+ p4+ ···) +(p3+ p4+ ···) +(p4+ ···) +· · ·= Pr[X ≥ 1]+ Pr[X ≥ 2] +Pr[X ≥ 3] + Pr[X ≥ 4] + ·· · .In the third line, we have regrouped the terms into convenient infinite sums. You should check that youunderstand how the fourth line follows from the third.Let us repeat the proof, this time using more compact mathematical notation:∞∑i=1Pr[X ≥ i] =∞∑i=1∑j≥iPr[X = j] =∞∑j=1∑i≤ jPr[X = j] =∞∑j=1j Pr[X = j] = E[X]EECS 70, Spring 2014, Note 17 22Using Theorem 15.1, it is easy to compute E(X). The key observation is that, for our coin-tossing r.v. X,Pr[X ≥ i] = (1 − p)i−1. (1)Why is this? Well, the event “X ≥ i” means that at least i tosses are required. This is exactly equivalent tosaying that the first i − 1 tosses are all Tails. And the probability of this event is precisely (1 − p)i−1. Now,plugging equation (1) into Theorem 15.1, we getE(X) =∞∑i=1Pr[X ≥ i] =∞∑i=1(1 − p)i−1=11 − (1 − p)=1p.So, the expected number of tosses of a biased coin until the first Head appears is1p. For a fair coin, the ex-pected number of tosses is 2.For posterity, let’s record two important facts we’ve learned about the geometric distribution:Theorem 17.2: For a random variable X having the geometric distribution with parameter p,1. E(X) =1p; and2. Pr[X ≥ i] = (1 − p)i−1for i = 1,2,.. ..The next section discusses a rather more involved application, which is important in its own right.The Coupon Collector’s ProblemQuestion: We are trying to collect a set of n different baseball cards. We get the cards by buying boxes ofcereal: each box contains exactly one card, and it is equally likely to be any of the n cards. How many boxesdo we need to buy until we have collected at least one copy of every card?The sample space here is similar in flavor to that for our previous coin-tossing example, though rather morecomplicated. It consists of all sequences ω over the alphabet {1,2, . .. , n}, such that1. ω contains each symbol 1,2, . . ., n at least once; and2. the final symbol in ω occurs only once.[Check that you understand this!] For any such ω, the probability is just Pr[ω] =1ni, where i is the lengthof ω (why?). However, it is very hard to figure out how many sample points ω are of length i (try it for thecase n = 3). So we will have a hard time figuring out the distribution of the random variable X, which is thelength of the sequence (i.e., the number of boxes bought).Fortunately, we can compute the expectation E(X) very easily, using (guess what?) linearity of expectation,plus the fact we have just learned about the expectation of the geometric distribution. As usual, we wouldlike to writeX = X1+ X2+ ... +Xn(2)for
View Full Document