PROC CAPABILITY and General Statements

Descriptive Statistics

This section provides computational details for the descriptive statistics which are computed with the PROC CAPABILITY statement. These statistics can also be saved in the OUT= data set by specifying the keywords listed in Table 5.52 in the OUTPUT statement.

Standard algorithms (Fisher 1973) are used to compute the moment statistics. The computational methods used by the CAPABILITY procedure are consistent with those used by other SAS procedures for calculating descriptive statistics. For details on statistics also calculated by Base SAS software, see Base SAS Procedures Guide.

The following sections give specific details on several statistics calculated by the CAPABILITY procedure.

Mean

The sample mean is calculated as

\[  \frac{\sum ^ n_{i=1} w_ i x_ i}{\sum ^ n_{i=1} w_ i}  \]

where n is the number of nonmissing values for a variable, $x_ i$ is the ith value of the variable, and $w_ i$ is the weight associated with the ith value of the variable. If there is no WEIGHT= variable, the formula reduces to $\frac{1}{n} \sum ^ n_{i=1} x_ i$.

Sum

The sum is calculated as $\sum ^ n_{i=1} w_ i x_ i$, where n is the number of nonmissing values for a variable, $x_ i$ is the ith value of the variable, and $w_ i$ is the weight associated with the ith value of the variable. If there is no WEIGHT= variable, the formula reduces to $\sum ^ n_{i=1} x_ i$.

Sum of the Weights

The sum of the weights is calculated as $~ \sum ^ n_{i=1} w_ i$, where n is the number of nonmissing values for a variable and $w_ i$ is the weight associated with the ith value of the variable. If there is no WEIGHT= variable, the sum of the weights is n.

Variance

The variance is calculated as

\[  \frac{1}{d} \sum ^ n_{i=1} w_ i (x_ i-{\bar{X}}_ w)^2  \]

where n is the number of nonmissing values for a variable, $x_ i$ is the ith value of the variable, ${\bar{X}}_ w$ is the weighted mean, $w_ i$ is the weight associated with the ith value of the variable, and d is the divisor controlled by the VARDEF= option in the PROC CAPABILITY statement. If there is no WEIGHT= variable, the formula reduces to

\[  \frac{1}{d} \sum ^ n_{i=1} (x_ i-{\bar{X}}_ w)^2  \]
Standard Deviation

The standard deviation is calculated as

\[  \sqrt { \frac{1}{d} \sum ^ n_{i=1} w_ i (x_ i-{\bar{X}}_ w)^2 }  \]

where n is the number of nonmissing values for a variable, $x_ i$ is the ith value of the variable, ${\bar{X}}_ w$ is the weighted mean, $w_ i$ is the weight associated with the ith value of the variable, and d is the divisor controlled by the VARDEF= option in the PROC CAPABILITY statement. If there is no WEIGHT= variable, the formula reduces to

\[  \sqrt { \frac{1}{d} \sum ^ n_{i=1} (x_ i-{\bar{X}}_ w)^2 }  \]
Skewness

The sample skewness is calculated as

\[  \frac{n}{(n-1)(n-2)} \sum ^ n_{i=1} \left( \frac{x_ i-\bar{X}}{s} \right)^3  \]

where n is the number of nonmissing values for a variable and must be greater than 2, $x_ i$ is the ith value of the variable, $\bar{X}$ is the sample average, and s is the sample standard deviation.

The sample skewness can be positive or negative; it measures the asymmetry of the data distribution and estimates the theoretical skewness $\sqrt {\beta _1} = \mu _3 \mu _2^{-\frac{3}{2}}$, where $\mu _2$ and $\mu _3$ are the second and third central moments. Observations that are normally distributed should have a skewness near zero.

Kurtosis

The sample kurtosis is calculated as

\[  \frac{n (n+1)}{(n-1)(n-2)(n-3)} \sum _{i=1}^ n \left( \frac{x_ i-\bar{X}}{s} \right)^4 - \frac{3 (n-1)^2}{(n-2)(n-3)}  \]

where $n > 3$. The sample kurtosis measures the heaviness of the tails of the data distribution. It estimates the adjusted theoretical kurtosis denoted as $\beta _2-3$, where $\beta _2 = \frac{\mu _4}{{\mu _2}^2}$, and $\mu _4$ is the fourth central moment. Observations that are normally distributed should have a kurtosis near zero.

Coefficient of Variation (CV)

The coefficient of variation is calculated as

\[  CV = \frac{100 \times s}{\bar{X}}  \]
Geometric Mean

The geometric mean is calculated as

\[  \left(\  \prod ^ n_{i=1} w_ i x_ i \right)^{1/\sum ^ n_{i=1} w_ i}  \]

where n is the number of nonmissing values for a variable, $x_ i$ is the ith value of the variable, and $w_ i$ is the weight associated with the ith value of the variable.

If there is no WEIGHT variable, the formula reduces to

\[  \left(\  \prod ^ n_{i=1} x_ i \right)^{1/n}  \]

If any $x_ i$ is negative, the geometric mean is set to missing.