I recently came across quality control charts in my studies and found out that the estimator
$$\hat \sigma =\frac{s}{c_4}$$
is preferred for UCL and LCL calculations in an x-bar chart as it is considered unbiased ($s$ is the sample standard deviation). I am not used to all these new estimators although I already took 2 basic statistics courses and I am familiar with typical confidence intervals and basics estimators.
Now, say that I would like to build a simple x-bar chart and s-chart with both $\mu$ and $\sigma$ unknown for a list of 50 samples each of consisting of 5 observations.
According to what I understood from my study materials I would write something like this in R
s <- apply(sd,samples) # Calculate sd for each sample
s_bar <- mean(s) # Center line for the s-chart
UCL_s <- s_bar + 3*s_bar/c4 * sqrt(1-c4^2)
LCL_s <- s_bar - 3*s_bar/c4 * sqrt(1-c4^2)
and for the x-bar chart
x <- apply(mean,samples) # Calculate mean for each sample
x_bar <- mean(s) # Center line for the x-chart
UCL_x <- s_bar + 3*s_bar/(c4 * sqrt(n))
LCL_x <- s_bar - 3*s_bar/(c4 * sqrt(n))
Now my questions:
- Is the estimation process of $\sigma$ and its intervals correct and unbiased?
- How would I calculate the $c_4$ term? I could look it up on the tables but is there a more fast way to find it? Is there an R function that provides such coefficient?
Say that the standard deviation is now given and equal to $\sigma$. The UCL and LCL should now be the following
UCL_s <- c4 * sigma + 3 * sigma * sqrt(1-c4^2)
LCL_s <- c4 * sigma + 3 * sigma * sqrt(1-c4^2)
Why do I need to multiply the known $\sigma$ for the coefficient $c_4$?