Question: Need help doing this in matlab (Simulation) This problem takes advantage of the fact that, if a large number of samples r1, 12, .... Im
Need help doing this in matlab

(Simulation) This problem takes advantage of the fact that, if a large number of samples r1, 12, .... Im of a random variable X are independently generated, then the sample mean is close to the expectation; i.e. mittim = EX]. m (a) Write a function to generate m independent samples of a Binomial(n, p) random variable. (b) Test your function by generating m = 1000 samples of a binomial with n = 50, p = 0.7. Calculate the mean value of the 1000 samples, and confirm that it is close to the true expectation of this random variable. (c) Let X be a Binomial(50, 0.7) random variable, and let Y = [X -px). Use your function to estimate E[Y]. Note: you do not need to calculate the PMF of Y
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
