Compute the constant \(c_4\), which corrects the bias of the sample
standard deviation \(S\) as an estimator of the process standard deviation
\(\sigma\) under normality.
Arguments
- n
Integer sample size, at least 2. Can be a vector.
Value
Numeric vector of \(c_4\) values, the same length as n.
Details
The constant is given by
$$c_4 = \sqrt{\frac{2}{n-1}} \,\frac{\Gamma(n/2)}{\Gamma\{(n-1)/2\}},$$
so that \(E[S] = c_4 \, \sigma\). Multiplying \(S\) by \(1 / c_4\)
produces an unbiased estimator of \(\sigma\).
References
Montgomery, D. C. (2009). Introduction to Statistical Quality Control,
6th ed. Wiley.
Author
Daniela R. Recchia, Emanuel P. Barbosa
Examples
c4(5)
#> [1] 0.9399856
c4(2:15)
#> [1] 0.7978846 0.8862269 0.9213177 0.9399856 0.9515329 0.9593688 0.9650305
#> [8] 0.9693107 0.9726593 0.9753501 0.9775594 0.9794056 0.9809714 0.9823162