clc
Mag = [5 5 4 4 3 5];
Bach = [5 5 5 5 3 5 3 4 4 4 4 4 4 4 4];

fprintf('Mean Mag = %.2f; mean Bach = %.2f; mean common = %.2f \n', mean(Mag), mean(Bach), mean([Mag Bach]));

hF = 0;
hF = figure(hF + 1);
hist(Mag, [2, 3, 4, 5])
xlabel('Mark')
ylabel('People')
title('Masters')

hF = figure(hF + 1);
hist(Bach, [2, 3, 4, 5])
xlabel('Mark')
ylabel('People')
title('Bachelors')

hF = figure(hF + 1);
hist([Mag Bach], [2, 3, 4, 5])
xlabel('Mark')
ylabel('People')
title('All')

