% ESTIMATED SAMPLING DISTRIBUTION FOR THE MEAN OF A N(0,1) R.V. clc; n = 3; m = 500 z = zeros(m,1); for ii = (1:1:m) x = randn(n,1); xbar = mean(x); z(ii,1) = xbar; end hist(z,20); xlim([-2,2]); set(gca,'XTick',(-2:0.5:2)); title(['Estimated Sampling Distribution (n = ',num2str(n),') for the Mean of a N(0,1) R.V.']);