Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
HISTOGRAM Statement

Adding a Normal Curve to the Histogram

See CAPHST1 in the SAS/QC Sample Library

This example is a continuation of the preceding example.

The following statements fit a normal distribution using the thickness measurements and superimpose the fitted density curve on the histogram:

   title 'Process Capability Analysis of Plating Thickness';
   legend1 frame cframe=ligr cborder=black position=center;
   proc capability data=trans noprint;
      spec lsl = 3.45 llsl = 2 clsl = black
           usl = 3.55 lusl = 2 cusl = black;
      histogram / normal(color=yellow w=3)
                  cfill  = blue
                  frame = ligr
                  legend = legend1;
   run;

The NORMAL option summarizes the fitted distribution in the printed output shown in Figure 4.3, and it specifies that the normal curve be displayed on the histogram shown in Figure 4.4.

The CAPABILITY Procedure
Fitted Normal Distribution for thick

Parameters for Normal Distribution
Parameter Symbol Estimate
Mean Mu 3.49533
Std Dev Sigma 0.032117

Goodness-of-Fit Tests for Normal Distribution
Test Statistic DF p Value
Kolmogorov-Smirnov D 0.05563823   Pr > D >0.150
Cramer-von Mises W-Sq 0.04307548   Pr > W-Sq >0.250
Anderson-Darling A-Sq 0.27840748   Pr > A-Sq >0.250
Chi-Square Chi-Sq 6.96953022 5 Pr > Chi-Sq 0.223

Percent Outside Specifications for Normal Distribution
Lower Limit Upper Limit
LSL 3.450000 USL 3.550000
Obs Pct < LSL 8.000000 Obs Pct > USL 5.000000
Est Pct < LSL 7.906248 Est Pct > USL 4.435722

Quantiles for Normal Distribution
Percent Quantile
Observed Estimated
1.0 3.42950 3.42061
5.0 3.44300 3.44250
10.0 3.45750 3.45417
25.0 3.46950 3.47367
50.0 3.49600 3.49533
75.0 3.51650 3.51699
90.0 3.53550 3.53649
95.0 3.55300 3.54816
99.0 3.57200 3.57005

Figure 4.3: Summary for Fitted Normal Distribution

caphgs4.gif (7256 bytes)

Figure 4.4: Histogram Superimposed with Normal Curve

The printed output includes the following:

For details, including formulas for the goodness-of-fit tests, see "Printed Output". Note that the NOPRINT option in the PROC CAPABILITY statement suppresses only the printed output with summary statistics for the variable THICK. To suppress the printed output in Figure 4.3, specify the NOPRINT option enclosed in parentheses after the NORMAL option.

The NORMAL option is one of many options that you can specify in the HISTOGRAM statement. See the "Syntax" section for a complete list of options or the "Dictionary of Options" section for detailed descriptions of options.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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