disp('Diluting Acid')
lw = 3;
set(0, 'DefaultAxesFontSize', 15);
fs = 15;
msize = 10;
% --------------------------------------
% In a laboratory, students are told to mix 100 ml of distilled
% water with 50 ml of sulphuric acid and 30 ml of C_2 H_5 OH. Of
% course, the measurements are not exact. The water is measured
% with a mean of 100 ml and a standard deviation of 4 ml, the acid
% with a mean of 50 ml and a standard deviation of 2 ml, and C_2
% H_5 OH with mean 30 ml and standard deviation of 3 ml. The three
% measurements are normally distributed and independent.
%
% (a) What is the probability of a given student measuring out at
% least 103 ml of water?
%
% (b) What is the probability of a given student measuring out
% between 148 ml and 157 ml of water plus acid?
%
% (c) What is the probability of a given student measuring out
% between 175 ml and 180 ml of liquid, total?
1 - normcdf(103, 100, 4)
%ans = 0.2266
normcdf(157,150, sqrt(4^2 + 2^2)) ...
- normcdf(148, 150, sqrt(4^2 + 2^2))
%ans = 0.6139
normcdf(180, 180, sqrt(4^2 + 2^2 + 3^2 )) ...
- normcdf(175, 180, sqrt(4^2 + 2^2 + 3^2))
%ans = 0.3234