Question: Please provide MATLAB code. Exercise 4 In this exercise, we are going to check numerically the Central Limit Theorem. If X1, X2, ..., Xn random

Please provide MATLAB code.

Please provide MATLAB code. Exercise 4 In this exercise, we are goingto check numerically the Central Limit Theorem. If X1, X2, ..., Xn

Exercise 4 In this exercise, we are going to check numerically the Central Limit Theorem. If X1, X2, ..., Xn random variables all X; have the same distribution (but can be any distribution) with mean , std.dev o X; are independent from one another Sn = (X1 + X2 + ... + Xn) then, A _Sn- = Normal(0,1) We are going to choose the exponential distribution for the X;. A property of the exponential distribution is that its mean and standard deviation are equal. The MATLAB function exprnd(m,n,1) generate an nx 1 array of samples from the exponential distribution. a) Write a for loop that iterates N times. The loop generates, at each iteration, n samples exponentially distributed with mean and std dev) m. These are our Xi. Inside this loop, calculate the mean of the n samples and store the result in a variable named s. Then, using s, calculate A (as defined in the equation above) and save its value for every iteration in an 1 x N array named a. b) Using N = 10', m = 10, and n = 40, check that the values of the array a are Normal(0,1) with a QQ-plot and a Kolmogorov-Smirnov test

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!