See CAPPROC in the SAS/QC Sample LibraryThe fluid weights of 100 drink cans are measured in ounces. The filling process is assumed to be in statistical control. The
measurements are saved in a SAS data set named Cans
.
data Cans; label Weight = "Fluid Weight (ounces)"; input Weight @@; datalines; 12.07 12.02 12.00 12.01 11.98 11.96 12.04 12.05 12.01 11.97 12.03 12.03 12.00 12.04 11.96 12.02 12.06 12.00 12.02 11.91 12.05 11.98 11.91 12.01 12.06 12.02 12.05 11.90 12.07 11.98 12.02 12.11 12.00 11.99 11.95 11.98 12.05 12.00 12.10 12.04 12.06 12.04 11.99 12.06 11.99 12.07 11.96 11.97 12.00 11.97 12.09 11.99 11.95 11.99 11.99 11.96 11.94 12.03 12.09 12.03 11.99 12.00 12.05 12.04 12.05 12.01 11.97 11.93 12.00 11.97 12.13 12.07 12.00 11.96 11.99 11.97 12.05 11.94 11.99 12.02 11.95 11.99 11.91 12.06 12.03 12.06 12.05 12.04 12.03 11.98 12.05 12.05 12.11 11.96 12.00 11.96 11.96 12.00 12.01 11.98 ;
You can use the PROC CAPABILITY and VAR statements to compute summary statistics for the weights.
title 'Process Capability Analysis of Fluid Weight'; proc capability data=Cans normaltest; var Weight; run;
The input data set is specified with the DATA= option. The NORMALTEST option requests tests for normality. The VAR statement specifies the variables to analyze. If you omit the VAR statement, all numeric variables in the input data set are analyzed.
The descriptive statistics[7] for Weight
are shown in Figure 5.1. For instance, the average weight (labeled Mean) is 12.0093. The Shapiro-Wilk test statistic labeled W is 0.987876, and the probability of a more extreme value of W (labeled Pr < W) is 0.499. Compared to the usual cutoff value of 0.05, this probability (referred to as a p-value) indicates that the weights are normally distributed.
Figure 5.1: Descriptive Statistics
Process Capability Analysis of Fluid Weight |
Moments | |||
---|---|---|---|
N | 100 | Sum Weights | 100 |
Mean | 12.0093 | Sum Observations | 1200.93 |
Std Deviation | 0.04695269 | Variance | 0.00220456 |
Skewness | 0.05928405 | Kurtosis | -0.1717404 |
Uncorrected SS | 14422.5469 | Corrected SS | 0.218251 |
Coeff Variation | 0.39096946 | Std Error Mean | 0.00469527 |
Basic Statistical Measures | |||
---|---|---|---|
Location | Variability | ||
Mean | 12.00930 | Std Deviation | 0.04695 |
Median | 12.00000 | Variance | 0.00220 |
Mode | 12.00000 | Range | 0.23000 |
Interquartile Range | 0.07000 |
Tests for Location: Mu0=0 | ||||
---|---|---|---|---|
Test | Statistic | p Value | ||
Student's t | t | 2557.745 | Pr > |t| | <.0001 |
Sign | M | 50 | Pr >= |M| | <.0001 |
Signed Rank | S | 2525 | Pr >= |S| | <.0001 |
Tests for Normality | ||||
---|---|---|---|---|
Test | Statistic | p Value | ||
Shapiro-Wilk | W | 0.987876 | Pr < W | 0.4991 |
Kolmogorov-Smirnov | D | 0.088506 | Pr > D | 0.0522 |
Cramer-von Mises | W-Sq | 0.079055 | Pr > W-Sq | 0.2179 |
Anderson-Darling | A-Sq | 0.457672 | Pr > A-Sq | >0.2500 |
Quantiles (Definition 5) | |
---|---|
Quantile | Estimate |
100% Max | 12.130 |
99% | 12.120 |
95% | 12.090 |
90% | 12.065 |
75% Q3 | 12.050 |
50% Median | 12.000 |
25% Q1 | 11.980 |
10% | 11.955 |
5% | 11.935 |
1% | 11.905 |
0% Min | 11.900 |
Extreme Observations | |||
---|---|---|---|
Lowest | Highest | ||
Value | Obs | Value | Obs |
11.90 | 28 | 12.09 | 59 |
11.91 | 83 | 12.10 | 39 |
11.91 | 23 | 12.11 | 32 |
11.91 | 20 | 12.11 | 93 |
11.93 | 68 | 12.13 | 71 |
[7] In SAS 7, the Moments table was reorganized. Tables for Basic Statistical Measures, Tests for Location, and Tests for Normality have been added.