Skip to content

Home / Statistical Tools / Control Charts / Xbar / Math Details

Math Details

This page gives the exact formulas Quantum XL uses to build an Xbar chart. Each equation lists what it computes and where it appears on the chart. Every formula on this page is shared with other control charts, so each block is followed by a link to the page that owns it.

An Xbar chart is the Xbar-R chart with only its first panel drawn, so the arithmetic is the Xbar-R arithmetic. The range panel is still computed and is simply not plotted, and under the default estimator the subgroup ranges are what the sigma behind the limits is built from.

Notation

Term Description
\(i\) subgroup index, in plotted order
\(n_i\) number of usable observations in subgroup \(i\)
\(n_{\text{sub}}\) number of subgroups entering an estimate
\(x_{ij}\) the \(j\)th observation in subgroup \(i\)
\(\bar{x}_i\) mean of subgroup \(i\), the value plotted on the Xbar panel
\(R_i\) range of subgroup \(i\), computed for the sigma estimate but not plotted on this chart
\(\bar{\bar{x}}\) grand mean, the center line of the Xbar panel
\(\hat{\sigma}_{\text{within}}\) estimated within-subgroup standard deviation
\(k\) sigma multiplier (number of standard deviations), default \(3\)
\(d_2(n)\), \(d_3(n)\) expected value and standard deviation of the range of \(n\) standard normal observations
\(\mathcal{B}\) the baseline set of subgroups the estimates are computed from
\(\text{CL}\), \(\text{UCL}_i\), \(\text{LCL}_i\) center line, upper and lower control limits at subgroup \(i\)

Plotted statistic

\[ \bar{x}_i = \frac{1}{n_i}\sum_{j=1}^{n_i} x_{ij} \]

The mean of each subgroup is the only value plotted. It is computed from every subgroup, whatever the baseline selection is, because the baseline governs the limits and never what is plotted. A subgroup with a single usable value still has a mean, and it is plotted.

Center line

\[ \bar{\bar{x}} = \frac{\displaystyle\sum_{i \in \mathcal{B}}\;\sum_{j=1}^{n_i} x_{ij}}{\displaystyle\sum_{i \in \mathcal{B}} n_i} \]

The center line is the mean of the individual observations, not the mean of the subgroup means. The distinction only matters when the subgroups differ in size, and then it matters:

\[ \bar{\bar{x}} \;=\; \frac{1}{n_{\text{sub}}}\sum_{i} \bar{x}_i \quad \text{only when every } n_i \text{ is the same} \]

A larger subgroup supplies more observations and therefore carries more weight in the center line. Averaging the plotted points by hand will not reproduce the drawn center line on a chart with mixed subgroup sizes.

A supplied historical mean replaces \(\bar{\bar{x}}\) after it has been computed, so the baseline still decides which subgroups fed the estimate that was discarded.

Used by: the center line of the Xbar panel, the Center row of the summary table, and the center of the band the out-of-control tests measure runs against.

Control chart constants

The range constants are looked up at each subgroup's own size. On this chart only \(d_2\) is used, inside the Rbar estimate; \(d_3\) belongs to the range panel, which is computed and not drawn.

The range constants describe the distribution of the range \(R\) of \(n\) independent standard normal observations:

\[ d_2(n) = \mathrm{E}[R], \qquad d_3(n) = \sqrt{\mathrm{Var}(R)}, \qquad d_4(n) = \operatorname{median}(R) \]

So \(R/d_2(n)\) is an unbiased estimate of \(\sigma\) from a subgroup range, \(d_3(n)\) scales the spread of a range, and \(\widetilde{R}/d_4(n)\) is the corresponding estimate from a median range. Quantum XL evaluates these from precomputed full-precision tables for \(n = 2\) to \(100\). Outside that range they are undefined, which is why a subgroup size or moving range length above \(100\) produces no estimate and no limits.

Full details: Control Chart Constants.

Within-subgroup sigma

This dialog offers two estimators of \(\hat{\sigma}_{\text{within}}\), and one value is estimated once for the whole chart (once per phase when the chart is split).

Rbar (average range), the default:

\[ \hat{\sigma}_{\text{within}} = \frac{\sum_{i=1}^{n_{\text{sub}}} f_i\, \dfrac{R_i}{d_2(n_i)}}{\sum_{i=1}^{n_{\text{sub}}} f_i}, \qquad f_i = \left(\frac{d_2(n_i)}{d_3(n_i)}\right)^{2} \]

\(R_i\) is the range of subgroup \(i\), \(n_i\) its size, and \(n_{\text{sub}}\) the number of subgroups with at least two observations. Each subgroup's unbiased range estimate \(R_i/d_2(n_i)\) is combined with the minimum-variance weights \(f_i\) (subgroups whose range estimate is more precise get more weight). The unbiased-constants setting has no effect on this estimator: \(d_2\) is always applied.

This is not the textbook \(\overline{R}/d_2\) estimator. When every subgroup has the same size \(n\) all of the weights are equal and the expression collapses to \(\overline{R}/d_2(n)\), the familiar average range over \(d_2\). When the subgroup sizes differ it does not: each subgroup is weighted by the precision of its own range, so a hand calculation of \(\overline{R}/d_2\) from a mixed-size data set will not reproduce the reported value.

Pooled standard deviation:

\[ \hat{\sigma}_{\text{within}} = \sqrt{\frac{\sum_{i=1}^{n_{\text{sub}}} (n_i - 1)\, s_i^2}{\sum_{i=1}^{n_{\text{sub}}} (n_i - 1)}} \]

When Use unbiased constants (within sigma) is checked (the default), the pooled estimate is divided by \(c_4(\nu + 1)\), where \(\nu = \sum_i (n_i - 1)\) is the pooled degrees of freedom:

\[ \hat{\sigma}_{\text{within}}^{\,\text{unbiased}} = \frac{1}{c_4(\nu + 1)}\sqrt{\frac{\sum_{i} (n_i - 1)\, s_i^2}{\nu}} \]

Full details, including the degrees of freedom each estimator carries: Process Sigma Estimation.

Sbar is not offered on this chart, so no average of the subgroup standard deviations is formed. The Use unbiased constants (within sigma) checkbox has no effect on Rbar, which always applies \(d_2\); under the pooled estimator it divides by \(c_4(\nu + 1)\) as shown above, where \(c_4(n)\) is the expected value of the sample standard deviation of \(n\) standard normal observations.

Control limits

Every limit on the chart has the same form, a center line plus or minus \(k\) standard deviations of the plotted statistic. For a chart of subgroup means that standard deviation is the standard error of a mean, so the subgroup size enters point by point and the limits are written per point:

Every quantity that divides by a subgroup size, or looks a constant up at a subgroup size, becomes a per-point quantity as soon as the sizes differ. On a chart of subgroup means the standard error uses each subgroup's own size \(n_i\):

\[ \sigma_i = \frac{\hat{\sigma}_{\text{within}}}{\sqrt{n_i}}, \qquad \text{UCL}_i = \text{CL} + k\,\sigma_i, \qquad \text{LCL}_i = \text{CL} - k\,\sigma_i \]

The band is narrow where a subgroup is large and wide where it is small, so the limits are drawn as a staircase instead of a straight pair of lines, with one step per change of size. Each point is judged against its own limits, and its zone lines are placed from its own limits. The center line does not move: it stays at the grand mean, which is the mean of the individual observations, so larger subgroups already carry more weight in it.

The within sigma itself is a single chart-wide value. It is estimated once from all of the subgroups, with the size differences already accounted for inside the estimator, and it is not re-estimated per point.

Full details: Varying Subgroup Size Limits and Control Limits and Zones.

There is no flooring and no capping on this panel. A subgroup mean can legitimately be any value, so both limits are drawn wherever the arithmetic puts them.

When a point is left blank

A point is plotted only when its statistic exists:

  • A range or a standard deviation needs at least two observations. When \(n_i < 2\) the dispersion point is left unplotted and receives no center line, no limits, and no zones, so the panel shows a break at that position.
  • A mean needs at least one observation. A subgroup with no observations at all is unplotted on every panel.
  • A subgroup of size one contributes nothing to the within sigma, but it still contributes its value to the grand mean and it still consumes one position of the baseline window used to estimate the limits.

Full details: Varying Subgroup Size Limits.

A subgroup with a single usable value, which would leave a gap on the range panel of a full Xbar-R chart, plots normally here, because the panel that has nothing to show is the one this variant does not draw. A gap that does appear breaks any run the out-of-control tests were counting.

Sigma zones

The zone lines, and the four out-of-control tests that read them, are placed by cutting the drawn band into thirds on each side. The sigma multiplier does not enter the calculation.

On the variable charts the band that is actually drawn is cut into thirds on each side, and the sigma multiplier \(k\) does not enter the calculation:

\[ A_i^{+} = \text{CL}_i + \tfrac{2}{3}\left(\text{UCL}_i - \text{CL}_i\right), \qquad B_i^{+} = \text{CL}_i + \tfrac{1}{3}\left(\text{UCL}_i - \text{CL}_i\right) \]
\[ B_i^{-} = \text{CL}_i - \tfrac{1}{3}\left(\text{CL}_i - \text{LCL}_i\right), \qquad A_i^{-} = \text{CL}_i - \tfrac{2}{3}\left(\text{CL}_i - \text{LCL}_i\right) \]

Each side is measured from its own limit, so an asymmetric band gives asymmetric zone lines, and a manual band is divided the same way as a calculated one. On the range, standard deviation, and moving range panels the zone lines are built from the unclamped lower limit and then floored at zero, so when the drawn lower limit has been clamped to zero the lower zone lines are not thirds of the band that appears on the chart.

Full details, including what the labels "1 sigma" and "2 sigma" really mean at a multiplier other than \(3\): Control Limits and Zones.

So on an Xbar chart drawn at the default \(k = 3\) the zone lines sit at one and two standard errors as their labels say. At any other multiplier they are still thirds of the band you asked for, which changes what tests 5 through 8 are testing. On this variant all eight tests are available, so the multiplier reaches all of them.

Baseline and split limits

Neither of these changes the formulas above; both change which subgroups the sums run over.

Estimate Limits From restricts every estimate to the first \(N\) subgroups and then extends the resulting center line and limits across the whole chart. On this chart the minimum is 5 subgroups, the window advances past blank subgroups and excluded outliers rather than spending a slot on them, and the plotted values, the minimum, the maximum, and the counts are always computed from all of the data. Formulas: Baseline and Limit Estimation.

Split Control Limits divides the chart into phases and re-runs the whole estimation inside each one, so each phase gets its own grand mean, its own within-subgroup sigma, its own limits, and its own zone lines, and every out-of-control run counter restarts at the boundary. A baseline count is reused inside each phase, capped at that phase's length. One transformation is fitted for the whole chart rather than one per phase. Formulas: Splits and Phases.

Shared Math Details used here

This chart uses shared formulas defined once in Shared Math Details.

Shared concept Used here for Reference
Control chart constants \(d_2\) in the Rbar sigma estimate Control Chart Constants
Process sigma estimation the Rbar and pooled estimates of the within-subgroup sigma Process Sigma Estimation
Control limits and zones the general limit form, the zone construction, and the manual and disabled limit types Control Limits and Zones
Varying subgroup size limits the per-point Xbar limits and the blanking rules Varying Subgroup Size Limits
Baseline and limit estimation what Estimate Limits From restricts, and what it does not Baseline and Limit Estimation
Splits and phases per-phase estimation and the run counters restarting Splits and Phases
Out-of-control rules flagging out-of-control points Out-of-Control Rules

Xbar contributes no formula of its own. Every equation above is one of these shared pieces evaluated for a chart of subgroup means.

See Also

References

  1. Montgomery, D. C. (2013). Introduction to Statistical Quality Control (7th ed.). Wiley.
  2. Wheeler, D. J., and Chambers, D. S. (1992). Understanding Statistical Process Control (2nd ed.). SPC Press.
  3. Duncan, A. J. (1986). Quality Control and Industrial Statistics (5th ed.). Irwin.
  4. Shewhart, W. A. (1931). Economic Control of Quality of Manufactured Product. Van Nostrand.