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(88, 0.02^2) 
% and N(90, 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 2.04?
%
%(c) If  D  is averaged over batch of  n=64  pistons, what is 
%the probability that \bar D  exceeds 2.04? Exceeds 2.004?

%StDev of the difference:  sqrt(0.01^2 + 0.02^2) %0.0224

 1-normcdf((2.04 - 2)/0.0224)
  %ans =   0.0371
  1- normcdf(2.04, 2, 0.0224)
  
  
  %%
 1-normcdf((2.04 - 2)/(0.0224/sqrt(64)))
   %ans =     0
 1-normcdf((2.004 - 2)/(0.0224/sqrt(64)))
  %ans =    0.0766
