Just Need hint how to approach this problem in MatLab Create

Just Need hint how to approach this problem in MatLab...

Create N random variables (X_1,..., X_n) each with L samples. These should be independent and identically distributed. Generate S_n, which will be the sum of these random variables. Find the mean and variance of X_1. i.e. mu and sigma^2. Since the RV\'s are iid\'s, mu will be the mean of all the other RV\'s in this set too. You can verify this by finding the mean of a few other variables. Create the random variable Z_n by adding N random variables as: Z_n = S_n - n mu / sigma Squareroot n Plot the pdf of Z_n Repeat steps 3 and 4 for N=10, N=50 and N=100. For each case, repeat for values of L = 100, 1000, 10,000 and 1000,000.

Solution

here i am giving you the syntax of how to create the script regarding the problem

uniform_RVs = [];
sample_averages = [];
random_draw = [];
for i = 1:500
for j = 1:100
random_draw = [random_draw 1+rand];
end
sample_averages = [sample_averages mean(random_draw)];
uniform_RVs = [uniform_RVs random_draw];
random_draw = [];
end
figure(1)
hist(uniform_RVs, 25)
xlabel(\'Observation\')
ylabel(\'Frequency\')
figure(2) hist(sample_averages, 25)
xlabel(\'Observation\')
ylabel(\'Frequency\')
sample_mean = mean(sample_averages)
sample_var = var(sample_averages)

Just Need hint how to approach this problem in MatLab... Create N random variables (X_1,..., X_n) each with L samples. These should be independent and identical

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site