%LMcs070401_4th.m
% p 483-484 in
% Larsen & Marx (2006) Introduction to Mathematical Statistics, 4th edition
% Written by Eugene.Gallagher@umb.edu 10/2010, revised 3/12/2011
X=[62 52 68 23 34 45 27 42 83 56 40];
fprintf('The mean reaction distance is %6.4f cm\n',mean(X));
alpha=0.05;
[H,P,CI,STATS]=ttest(X,0,alpha,'both');
fprintf('The 95%% confidence interval is (%6.4f cm %6.4f cm)\n',CI)
% or call normfit
[MUHAT,SIGMAHAT,MUCI,SIGMACI] = normfit(X,alpha)
fprintf('The 95%% confidence interval is (%6.4f cm %6.4f cm)\n',MUCI)
