## 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 .

*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

where is the gamma function. As *n* grows, *c*_{4}
is asymptotically equal to (4*n*-4)/(4*n*-3).
For more information, refer to the *ASQC Glossary and Tables for
Statistical Quality Control*, the *ASTM Manual on Presentation
of Data and Control Chart Analysis*, Montgomery (1996), and Wadsworth
and others (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
of the standard deviation of a normal
distribution from the sample standard deviation of *n* observations:

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;

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