Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 YStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started