disp('Piston Production Error')
lw = 3;
set(0, 'DefaultAxesFontSize', 15);
fs = 15;
msize = 10;
% end of preabmle--------------------------------------
%The piston production error.
%Profile of a piston constitutes a ring in which inner and outer radii
%X and Y are normal random variables, N(30, 0.02^2)
% and N(20, 0.01^2), respectively.
%The thickness D = Y - X is the random variable of interest.
%
%(a) Find the distribution of D.
%
%(b) For a randomly selected piston, what is the probability
%that D exceeds 10.04?
%
%(c) If D is averaged over batch of n=64 pistons, what is
%the probability that \bar D exceeds 10.04? Exceeds 10.004?
1-normcdf((10.04 - 10)/0.0224)
%ans = 0.0371
1-normcdf((10.04 - 10)/(0.0224/sqrt(64)))
%ans = 0
1-normcdf((10.004 - 10)/(0.0224/sqrt(64)))
%ans = 0.0766