% % Written by: % -- % John L. Weatherwax 2008-02-20 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- % the sample sizes: theNs = [ 2, 15, 45 ]; % generate 500 ramdom samples (of the sizes above): N_SAMPS=500; for ni=1:length(theNs), n = theNs(ni); data = rand(N_SAMPS,n); theMeans = mean( data, 2 ); %figure; hist( theMeans ); figure; histfit( theMeans ); title( sprintf('distribution of the means of %d samples',n) ); end