Computers and Technology

Recall the coupon collector problem discussed in class which has many applications in computer science. Consider a bag that contains N different types of coupons (say coupons numbered 1 . . . N). There are infinite number of each type of coupon. Each time a coupon is drawn from the bag, it is independent of the previous selection and equally likely to be any of the N types. Since there is an infinite number of each type, one can view this as sampling with replacement. Let T correspond to the random variable that denotes the number of total coupons that needed to be collected in order to obtain a complete set of at least one of each type of coupon. Write a R simulation code to estimate E(T) considering the following: • N denotes the total number of coupons. Run your numerical simulation to develop an estimate of E(T) and plot E(T) for N = 10, 20,30,40,50,60. (Use 1000 trials or more, i. e, Nsim > 1000).
• We showed in class that for large N, E(T) can be approximated by N log(N) +0.577N +0.5. In the same plot show the theoretical value and summarize your observation regarding the accuracy of the approximation.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 15:20, headshotplayzcod
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
image
Computers and Technology, 23.06.2019 18:00, MagicDragon4734
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
image
Computers and Technology, 23.06.2019 21:50, Trinhphuongtran
Description: write function lastfirst() that takes one argument—a list of strings of the format "lastname, firstname" —and returns a list consisting of two lists: (a) a list of all the last names (b) a list of all the first names
Answers: 2
image
Computers and Technology, 24.06.2019 00:00, Kaylaonfleek0956
Consider the series where in this problem you must attempt to use the ratio test to decide whether the series converges. compute enter the numerical value of the limit l if it converges, inf if it diverges to infinity, minf if it diverges to negative infinity, or div if it diverges but not to infinity or negative infinity.
Answers: 1
Do you know the correct answer?
Recall the coupon collector problem discussed in class which has many applications in computer scien...

Questions in other subjects:

Konu
Mathematics, 31.05.2020 03:04