% LMcs010203_4th.m
% Pages 17-18 in
% Larsen & Marx (2006) Introduction to Mathematical Statistics, 4th edition
% written by Eugene.Gallagher@umb.edu 3/18/2011
% for UMASS/Boston's EEOS601
DATA=[6.4 5.0 5.8 
     7.1 13.0 9.2
     6.5 14.0 7.9
     8.6 12.0 7.7
     8.1 6.0 11.0
     10.4 9.0 12.9
     11.5 13.0 13.5
     13.8 16.0 13.1
     15.4 25.0 15.8
     15.7 13.0 13.3
     11.7 14.0 12.8
     15.8 20.0 14.5];
 % plot a histogram of the data
 bar(1:12,DATA,1,'grouped')
 axis([0.6 12.4 0 27])
set(gca,'ytick',0:5:25,'xticklabel',{'Aug';'Sept';'Oct';'Nov';'Dec';...
    'Jan';'Feb';'Mar';'Apr';'May';'Jun';'Jul'},'FontSize',20);
legend('Before Full Moon','During Full Moon','After Full Moon','Location','NorthWest')
xlabel('Month','FontSize',20)
ylabel('Admission rates (Patients/Day)','FontSize',20)
title('Case Study 1.2.3','FontSize',22);figure(gcf);pause