What is "the" correct way of calculating Cp/Cpk values for Statistical Process Control? There seems to be many different methods of calculating $C_p$/$C_{pk}$ values in SPC, and I need help in determining which one to use at any given situation.
Currently, we need to show $C_p$/$C_{pk}$ values when drawing two different chart. 


*

*X-MR Chart

*X-Bar R Chart


Let's assume we have an LSL/USL of 3.0/3.2 respecitvely and we have the following sample:
$
3.55,
2.41,
3.61,
2.71,
2.91,
3.42,
3.52,
2.92,
2.98,
3.02,
3.14,
3.25,
2.98,
3.33,
3.31
$
So according to this website, here's how I would go about determining $C_{pk}$ value.


*

*Calculate sample mean
$\overline{x} = 3.137333333$

*Calculate Standard Deviation
$\sigma = 0.335249729$

*Calculate $C_{pu}$, $C_{pl}$ and take the smaller value as $C_{pk}$
$C_{pu} = \frac{USL-\overline{x}}{3s}$
$C_{pl} = \frac{\overline{x}-LSL}{3s}$
$C_{pu} = 0.062308444$
$C_{pl} = 0.136548292$
$C_{pk} = 0.062308444$
This works fine and all for X-MR Chart, since we don't have any subgroups, but let's assume for X-Bar R Chart, we're looking at a subgroup of 3. Now according to this website, we're supposed to use a different formula to calculate standard deviation, namely:
$\sigma'=\frac{\overline{R}}{d_2}$
This will lead to a different value of $C_{pk}$, namely $\sigma'=\frac{0.618}{1.693}=0.365$; $C_{pu}=0.057$; $C_{pl}=0.125$; and $C_{pk}=0.057$.
My question is, which formula am I supposed to use to calculate $C_p$/$C_{pk}$ value? 
 A: As far as I know estimating the standard deviation within a sub-group from the sub-group range was only ever done to make shop-floor calculation easier. So feel free to use the summed square deviations from the sub-group mean, which is the sufficient statistic when the distribution's Gaussian. The range method gets relatively less efficient as the sub-group size increases.
On the other hand, when the observations don't fall into sub-groups, you should be using the mean moving range or mean square successive differences to estimate the process standard deviation assuming a stationary process with no auto-correlation. If this is much different from that got from the mean summed squared deviations from the overall mean it's a sign that the process is not under control (cf the Durbin–Watson test). The latter estimate is used to calculate the process performance index $P_\mathrm{pk}$ rather than the process capability index $C_\mathrm{pk}$.
A: The short answer is that process capability ($C_p$/$C_{pk}$) and Shewhardt charts are two separate questions and should not be displayed at the same time.  It is entirely possible for a process to be in "statistical control" but not "capable" or for a process to be "capable" while not being in "statistical control."
Statistical control charts use modified time series charts to detect variation between units or subgroups with charts related to associated ranges between units or subgroups.  Control limits are based upon the variation in the process.
Process capability is based upon a histogram with limits defined by engineering or the customer.
In regards to the long answer of "which estimate for the standard deviation is 'right'," Gregory Roth II in his 2005 article "Capability Indexes: Mystery Solved" discusses the fact that none of the standards define which version of a standard deviation should be used, and the many methods available each provide different answers.  He compared estimates for $s$ of $\sqrt{\frac{\sum_{i=1}^n\left(X_i-\overline{X}\right)^2}{n}}$, $\sqrt{\frac{\sum_{i=1}^n\left(X_i-\overline{X}\right)^2}{n-1}}$, $\frac{\overline{R}}{d_2}$, and $\sqrt[i]{\frac{\sum f\left(d'\right)^2}{n}-\left(\frac{\sum|fd'}{n}\right)^2}$, along with the results of proprietary software outputs, which may include adaptations of $\sqrt{\frac{\sum x^2 - \frac{\left( \sum x \right )^2}{n}}{n-1}}$ (a computational equivalent to the sample standard deviation).  Roth's suggestion was to simply use a calculated sample standard deviation based upon all the data regardless of the application because modern computing power eliminates the need to shortcut the process by using tables from a control chart.
Mahmoud et al in their 2010 Journal of Quality Technology article "Estimating the Standard Deviation in Quality-Control Applications" discuss a wide variety of estimates for standard deviation which may be worth researching.  These methods include $s/c_4$, $c_4s$, $(\sqrt{n-1/n})s$, $\overline{s}/c_4$, $S_{pooled}$, and $c_4 S_{pooled}$.  The pooled sample standard deviation, $S_{pooled}$, is defined based upon a series of samples, $S^2_i$, the $i$th sample variance, and $n_i$, the $i$th sample size (which does not need to be constant):
$S_{pooled}=\sqrt{\frac{\sum^m_{i=1} \left (n_i-1  \right )S^2_i}{\sum^m_{i=1}\left ( n_i-1 \right )}}$.
According to Bissell (Bissell, A. F. How reliable is your capability index? Appl. Stat. 1990, 39, 331-340.), the preferred method for estimating the central tendency of the process is to use $\overline{\overline{x}}$ defined within a minimum of 50 consecutive items spread over $k$ subgroups: $\overline{\overline{x}}=\frac{1}{k}\sum_{j=1}^{k}\overline{x}_j$.  There are additional various version of the estimate for the central tendency which will impact your results for your capability analysis.
Any of these point estimators should be given with their confidence intervals.  For $C_p$, the confidence interval $c=C_p\sqrt{\frac{\chi^2_{1-\gamma,n-1}}{n-1}}$; for $C_{pk}$, a good estimate for the confidence interval is $c=\hat{C}_{pk}\pm Z_{1-\alpha/2}\sqrt{\frac{1}{9n}+\frac{\hat{C}_{pk}^2}{2\left(n-1\right)}}$.  This approximation is valid for $n\geq 25$ and is most appropriate for $n\geq 100$.
A: The Standard Deviation is different for a sample (estimated) versus the population. Hence the two formulae.
