Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
OUTPUT Statement

Example 7.2: Approximate Confidence Limits for Cpk

See CPKCON3 in the SAS/QC Sample Library

This example illustrates how you can use the OUTPUT statement to compute confidence limits for the capability index Cpk.

You can request the approximate confidence limits given by Bissell (1990) with the keywords CPKLCL and CPKUCL in the OUTPUT statement. However, this is not the only method that has been proposed for computing confidence limits for Cpk. Zhang, Stenback, and Wardrop (1990), referred to here as ZSW, proposed approximate confidence limits of the form

\hat{C}_{pk} +- k \hat{\sigma}_{pk}
where \hat{\sigma}_{pk}is an estimator of the standard deviation of \hat{C}_{pk}.Equation (8) of ZSW provides an approximation to the variance of \hat{C}_{pk}from which one can obtain 100\gamma% confidence limits for Cpk as

{LCL} & = & \hat{C}_{pk} [1 - \Phi^{-1}( (1-\gamma)/2 ) \sqrt{ \frac{n-1}{n-3} -...
 ...1}{n-3} -
 \frac{(n-1)\Gamma^2( (n-2)/2 ) }{2 \Gamma^2( (n-1)/2 )} } \; ] \;\; \

This assumes that \hat{C}_{pk} is normally distributed. You can also compute approximate confidence limits based on equation (6) of ZSW, which provides an exact expression for the variance of \hat{C}_{pk}.

The following program uses the methods of Bissell (1990) and ZSW to compute approximate confidence limits for Cpk for the variable HARDNESS in the data set TITANIUM (see Example 7.1).

   proc capability data=titanium noprint;
      var hardness;
      specs lsl=0.8 usl=2.4 gamma=0.95;
      output out=summary
          n    = n
          mean = mean
          std  = std
          lsl  = lsl
          usl  = usl
          cpk  = cpk
          cpklcl = cpklcl
          cpkucl = cpkucl
          cpl  = cpl
          cpu  = cpu;

   data summary;
      set summary;
      length method $ 16;

   method = 'Bissell';
   lcl = cpklcl;
   ucl = cpkucl;
   output;

   method = 'ZSW Equation 6';
   level = 0.95;
   aux   = probit( 1 - (1-level)/2 );
   zsw = log(0.5*n-0.5)
         + ( 2*(lgamma(0.5*n-1)-lgamma(0.5*n-0.5)) );
   zsw = sqrt((n-1)/(n-3)-exp(zsw));
   lcl = cpk*(1-aux*zsw);
   ucl = cpk*(1+aux*zsw);
   output;

   method = 'ZSW Equation 8';
   ds = 3*(cpu+cpl)/2;
   ms = 3*(cpl-cpu)/2;
   f1 = (1/3)*sqrt((n-1)/2)*gamma((n-2)/2)*(1/gamma((n-1)/2));
   f2 = sqrt(2/n)*(1/gamma(0.5))*exp(-n*0.5*ms*ms);
   f3 = ms*(1-(2*probnorm(-sqrt(n)*ms)));
   ex = f1*(ds-f2-f3);
   sd = ((n-1)/(9*(n-3)))*(ds**2-(2*ds*(f2+f3))+ms**2+(1/n));
   sd = sd-(ex*ex);
   sd = sqrt(sd);
   lcl = cpk-aux*sd;
   ucl = cpk+aux*sd;
   output;
   run;

   title 'Approximate 95% Confidence Limits for Cpk';
   proc print data = summary noobs;
      var method lcl cpk ucl;
   run;

The results are shown in Output 7.2.1.

Output 7.2.1: Approximate Confidence Limits for Cpk

Approximate 95% Confidence Limits for Cpk

method lcl cpk ucl
Bissell 1.43845 1.80818 2.17790
ZSW Equation 6 1.43596 1.80818 2.18040
ZSW Equation 8 1.42419 1.80818 2.19217


Note that there is fairly close agreement in the three methods.

You can display the confidence limits computed using Bissell's approach on plots produced by the CAPABILITY procedure by specifying the keywords CPKLCL and CPKUCL in the INSET statement.

The following statements also compute an estimate of the index Cpk along with approximate limits using the SPECIALINDICES option:

   proc capability data=titanium specialindices;
      var hardness;
      specs lsl=0.8 usl=2.4 gamma=0.95;
   run;

Output 7.2.2: Approximate Confidence Limits for Cpk using the SPECIALINDICES option

The CAPABILITY Procedure
Variable: hardness (Hardness Measurement)

Process Capability Indices
Index Value 95% Confidence Limits
Cp 2.005745 1.609575 2.401129
CPL 1.808179 1.438675 2.175864
CPU 2.203311 1.757916 2.646912
Cpk 1.808179 1.438454 2.177904
Cpm 1.725446 1.410047 2.066027

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.