%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
% Monday:
% 82 76 97 77 64.5 38 76.5 70.5 49 79 79 75.5 74.5 78 88 74.5 86.5 80.5 79 ...
% 84 64 70.5 71.5 40 92 92 91 61.5 73 74.5
% Tuesday: 
% 51 71 54 82.5 86 66 46 21.5 49 71.5 54 102 42 73 53.5 100 71 78 82 ...
% 52 100 81 65 59 79
% Friday:
% 97 46.5 60.5 67.5 45.5 75 62 71 72.5 88 59 73 80.5 68.5 ...
% 61 70.5 54 82
B = [  ...
82 76 97 77 64.5 38 76.5 70.5 49 79 79 75.5 74.5 78 88 74.5 86.5 80.5 79 ...
84 64 70.5 71.5 40 92 92 91 61.5 73 74.5 ...
51 71 54 82.5 86 66 46 21.5 49 71.5 54 102 42 73 53.5 100 71 78 82 ...
52 100 81 65 59 79 ...
97 46.5 60.5 67.5 45.5 75 62 71 72.5 88 59 73 80.5 68.5 ...
61 70.5 54 82 ...
];
%final exam scores
C = [100];


fprintf('\n\n****************************************************************\n')
fprintf('       EXAM STATISTICS, MAE 325, FALL 1999 \n')
fprintf('       --------------------------------------\n ')
fprintf(' (For prelim 1, 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')

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