Resources

Two-Sided Confidence Limits for Cp

 /****************************************************************/
 /*       S A S   S A M P L E   L I B R A R Y                    */
 /*                                                              */
 /*    NAME: CPCON                                               */
 /*   TITLE: Two-Sided Confidence Limits for Cp                  */
 /* PRODUCT: QC                                                  */
 /*  SYSTEM: ALL                                                 */
 /*    KEYS: Capability Analysis, Capability Indices,            */
 /*   PROCS: CAPABILITY                                          */
 /*    DATA:                                                     */
 /*                                                              */
 /*     REF: Chou Y., Owen D. B., Borrego S. A. (1990).  "Lower  */
 /*          Confidence Limits on Process Capability Indices."   */
 /*          Journal of Quality Technology 22, pp. 223-229.      */
 /*                                                              */
 /*   NOTES: This program calculates confidence limits for Cp    */
 /*          using the method described on page 224 of COB       */
 /*          (1990).                                             */
 /*    MISC:                                                     */
 /*                                                              */
 /*  Examples in the documentation were created using the        */
 /*    statement:  ods listing style=statistical;                */
 /*                                                              */
 /****************************************************************/

  options ps=60 ls=80;


  data a;
    input x @@;
    cards;
      1.38  1.49  1.43  1.60  1.59
      1.34  1.44  1.64  1.83  1.57
      1.45  1.74  1.61  1.39  1.63
      1.73  1.61  1.35  1.51  1.47
      1.46  1.41  1.56  1.40  1.58
      1.43  1.53  1.53  1.58  1.62
      1.58  1.46  1.26  1.57  1.41
      1.53  1.36  1.63  1.36  1.66
      1.49  1.55  1.67  1.41  1.39
      1.75  1.37  1.36  1.86  1.49
      ;

  proc capability data=a noprint;
    var x;
    specs lsl = 0.8  usl = 2.4;
    output out  = summary
           n    = n
           mean = mean
           std  = std
           lsl  = lsl
           usl  = usl
           cp   = cp;

  data summary;
     set summary;

  * Assign parameters;
  level = 0.95;

  lcl = cp*sqrt(cinv((1-level)/2    ,n-1)/(n-1));
  ucl = cp*sqrt(cinv(1-((1-level)/2),n-1)/(n-1));
  output;

  title 'Two-Sided 95% Confidence Limits for Cp';
  proc print data = summary noobs;
     var lcl cp ucl n mean std lsl usl;
  run;

  title;