%Fall 1999, MAE325 Prelim 1 scores.
%Run this MATLAB file to get histograms and stats.
%  -A. Ruina  10/13/99
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
%Prelim 1 scores from all students
A = [80 54 53 77 42 65 58 80 73 72 54 52 44 73 54 54 52 48 73 55 ...
60 75 82 70 70 65 65 62 60 58 33 64 60 52 47 77 47 45 63 33 73 57 80 ...
35 41 75 68 45 60 55 39 68 44 67 57 72 26 32 48 85 44 70 13 50 57 85 ...
50 59 72 65 73 82 38 60 51 ];

A=A+12;    % 12 point bonus given to all students

%prelim 2 scores
B = [100];
%final exam scores
C = [100];


fprintf('\n\n****************************************************************\n')
fprintf('       EXAM STATISTICS, MAE 325, FALL 1999 \n')
fprintf('       ------------------------------------\n ')
fprintf(' (Your grade is that on your exam PLUS 12.) \n')

fprintf('                                        Prel I   Prel 2   Final \n')
fprintf('Number of students                 = %8i %8i %8i \n',...
          [length(A) length(B) length(C)])
fprintf('Number with scores 90 and above    = %8i %8i %8i \n',... 
          [sum(A>89)   sum(B>89) sum(C>89)])
fprintf('Number with scores of 80 and above = %8i %8i %8i \n',... 
          [sum(A>79) sum(B>79) sum(C>79)])
fprintf('Number with scores less than 30    = %8i %8i %8i \n',... 
          [sum(A<30) sum(B<30) sum(C<30)])
fprintf('Mean                               = %8.1f %8.1f %8.1f \n',... 
          [mean(A) mean(B) mean(C)])
fprintf('Median                             = %8i %8i %8i \n', ...
          [median(A) median(B) median(C)])
fprintf('Sandard dev                        = %8.1f %8.1f %8.1f \n',...
          [std(A) std(B) std(C)])
fprintf('****************************************************************\n')
fprintf('           (See Figure window histogram. )          \n')


clf reset
subplot(3,1,1)
hist(A, 2.5 + 5*[0:19])
xlabel('5 point bins');  ylabel('# students in a bin')
Title('Prelim 1 score distribution')

%subplot(3,1,2)
%hist(B, 2.5 + 5*[0:19])
%xlabel('5 point bins');  ylabel('# students in a bin')
%Title('Prelim 2 score distribution')

%subplot(3,1,3)
%hist(C, 2.5 + 5*[0:19])
%xlabel('5 point bins');  ylabel('# students in a bin')
%Title('Final score distribution')

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
