Question: An Uberraschungsei is a hollow chocolate egg with a hidden plastic toy inside. Assume there are r different types of toys and that each
An ‘Uberraschungsei’ is a hollow chocolate egg with a hidden plastic toy ¨
inside. Assume there are r different types of toys and that each is equally likely to be found in an egg. Further assume that the eggs come from a population so large that your individual purchases make no difference, so that sampling can be thought of as being ‘with replacement’. Write a program which simulates and shows a histogram of how many eggs need to be purchased to amass k different toys out of y, 1 ≤ k ≤ y. If k = y, also plot the discrepancy between the scaled simulated values and the true mass function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
