Chapter Contents Previous Next
 PROC CAPABILITY and General Statements

## Computing Descriptive Statistics

 See CAPPROC in the SAS/QC Sample Library

The 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* for WEIGHT are shown in Figure 1.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.

 Process Capability Analysis of Fluid Weight

 The CAPABILITY Procedure Variable: weight (Fluid Weight (ounces))

 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.499 Kolmogorov-Smirnov D 0.088506 Pr > D 0.052 Cramer-von Mises W-Sq 0.079055 Pr > W-Sq 0.218 Anderson-Darling A-Sq 0.457672 Pr > A-Sq >0.250

 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
Figure 1.1: Descriptive Statistics

 Chapter Contents Previous Next Top