Question: Develop a version of getCoupon() that uses binomial() from the previous exercise to return coupon values according to the binomial distribution with p = 1/2.

Develop a version of getCoupon() that uses binomial() from the previous exercise to return coupon values according to the binomial distribution with p = 1/2. Generate a uniformly random number x between 0 and 1, then return the smallest value of k for which the sum of f (n, j, p) for all j < k exceeds x. Extra credit : Develop a hypothesis for describing the behavior of the coupon collector function under this assumption.

Step by Step Solution

3.56 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The question seems to be about the coupon collectors problem in probability theory which deals with ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction To Programming Questions!