Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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 testStep 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