C4 Function

computes the expected value of the standard deviation of n independent normal random variables.

Syntax

C4(n)

where n is the sample size, with $n\geq 2$.

Description

The C4 function returns the expected value of the standard deviation of n independent, normally distributed random variables with the same mean and with standard deviation of 1. This expected value is referred to as the control chart constant $c_4$.

The value $c_4$ is calculated as

\[  c_4 = \frac{\Gamma (\frac{n}{2}) \sqrt {2/(n-1) } }{\Gamma (\frac{n-1}{2}) }  \]

where $\Gamma (\cdot )$ is the gamma function. As n grows, $c_4$ is asymptotically equal to $(4n-4)/(4n-3)$.

For more information, refer to the American Society for Quality Control (1983), the American Society for Testing and Materials (1976), Montgomery (1996), and Wadsworth, Stephens, and Godfrey (1986).

In other chapters, $c_4$ is written as $c_4(n)$ to emphasize the dependence on n.

You can use the constant $c_4$ to calculate an unbiased estimate $(\hat{\sigma })$ of the standard deviation $\sigma $ of a normal distribution from the sample standard deviation of n observations:

\[  \hat{\sigma } = (\mbox{sample standard deviation})/c_4  \]

where the sample standard deviation is calculated using n – 1 in the denominator. In the SHEWHART procedure, $c_4$ is used to calculate control limits for s charts, and it is used in the estimation of the process standard deviation based on subgroup standard deviations.

Examples

The following statements result in a value of 0.939985603:

data;
   constant=c4(5);
   put constant;
run;