Home / Statistical Tools / Control Charts / Xbar-S / Math Details
Math Details¶
This page gives the exact formulas Quantum XL uses to build an Xbar-S 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.
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 |
| \(s_i\) | standard deviation of subgroup \(i\), the value plotted on the S panel |
| \(\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\) |
| \(c_4(n)\), \(c_5(n)\) | expected value and standard deviation of the sample standard deviation 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 statistics¶
The mean goes on the Xbar panel and the standard deviation on the S panel. Both are 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 has a mean but no standard deviation, since the \(n_i - 1\) divisor is zero.
Center line of the Xbar panel¶
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:
A larger subgroup supplies more observations and therefore carries more weight in the center line. Averaging the plotted points on the Xbar panel 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 standard deviation constants are looked up at each subgroup's own size, so they appear in the sigma estimate, in the S panel's center line, and in its limits.
\(c_4(n)\) is the expected value of the sample standard deviation of \(n\) independent standard normal observations, so \(s/c_4(n)\) is an unbiased estimate of \(\sigma\). \(\Gamma\) is the gamma function. Quantum XL evaluates the formula directly (a log-gamma form is used for large \(n\); the value approaches \(1\) as \(n\) grows and is taken as \(1\) for extremely large \(n\)).
\(c_5(n)\) is the standard deviation of the sample standard deviation of \(n\) standard normal observations, computed from \(c_4\).
Full details: Control Chart Constants.
Within-subgroup sigma¶
Xbar-S 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). Both panels are built from it.
Sbar (average standard deviation), the default:
With Use unbiased constants (within sigma) checked (the default):
\(s_i\) is the sample standard deviation of subgroup \(i\) (with the \(n_i - 1\) denominator) and \(h_i\) the minimum-variance weight. With the unbiased-constants box unchecked, the estimate is the plain average of the subgroup standard deviations:
The unchecked form applies no \(c_4\) at all and weights every subgroup equally, so with unequal subgroup sizes a subgroup of two observations counts as much as a subgroup of twenty five.
Pooled standard deviation:
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:
Full details, including the degrees of freedom each estimator carries: Process Sigma Estimation.
Rbar is not offered on this chart, so no average of the subgroup ranges is formed. Unlike Xbar-R, where the default estimator applies its own constant unconditionally, both estimators offered here are affected by the Use unbiased constants (within sigma) checkbox, which is why that checkbox is live rather than greyed out on this dialog.
Control limits on the Xbar panel¶
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\):
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.
Center line and limits on the S panel¶
A dispersion panel does not sit at a fixed distance from a center line: its limits are multiples of its own center line, and those multiples are built from the standard deviation constants and the sigma multiplier.
A dispersion panel (a range, moving range, or standard deviation chart) places its limits at multiples of its own center line, and those multiples are built from the constants above with the chart's sigma multiplier \(k\). For a range or moving range panel:
A standard deviation panel is built the same way from the \(c\) constants, at \(1 - k\,c_5/c_4\) and \(1 + k\,c_5/c_4\) times its center line. Those two multiples are the ones conventionally tabulated as \(B_3\) and \(B_4\); Quantum XL computes them directly from \(c_4\) and \(c_5\) rather than reading a named factor. In both cases the lower multiple is floored at \(0\), because neither a range nor a standard deviation can be negative, and \(k\) is the multiplier the chart is drawn with rather than a fixed \(3\).
Applied at each subgroup's own size, they give the S panel's center line and limits:
On a standard deviation panel the center line is a function of the subgroup size, so the center line steps as well as the limits:
The multipliers in parentheses are the \(B_4\) and \(B_3\) factors evaluated at \(n_i\). The lower limit is floored at zero, because a standard deviation cannot be negative; the zone lines are placed from the unfloored lower limit and then floored themselves.
This panel has one extra behavior: its center line steps only while unbiased constants are in use. With the within-sigma unbiasing option cleared the center line is the flat \(\hat{\sigma}_{\text{within}}\) at every point, while the limits still step, so the band becomes visibly asymmetric about a straight center line.
Full details: Varying Subgroup Size Limits and Control Chart Constants.
Three consequences are worth stating plainly. The S panel's center line is not the average of the plotted standard deviations: it is the standard deviation expected from a subgroup of size \(n_i\) given the estimated within-subgroup sigma, which is why it steps when the subgroup sizes differ. The lower limit is floored at zero, so on small subgroups, where \(k\,c_5/c_4\) exceeds \(1\), there is no lower limit to fall below and the panel can only signal upward. And clearing the within-sigma unbiasing option flattens that stepped center line to a single value while the limits keep stepping, which is the one setting on this chart that changes the shape of a panel rather than only its width.
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.
On an Xbar-S chart the case to expect is a subgroup that ended up with one usable value: its mean is plotted on the Xbar panel with its own limits, and the S panel shows a gap at that position with no point, no center line, and no limits. A gap also 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:
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-S 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.
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 on both panels, 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 | \(c_4\) and \(c_5\) in the sigma estimate, and the \(B_3\) and \(B_4\) multiples of the S panel | Control Chart Constants |
| Process sigma estimation | the Sbar 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, the stepped S center line, 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 on both panels | Out-of-Control Rules |
Xbar-S contributes no formula of its own. Every equation above is one of these shared pieces evaluated for a chart of subgroup means beside a chart of subgroup standard deviations.
See Also¶
References¶
- Montgomery, D. C. (2013). Introduction to Statistical Quality Control (7th ed.). Wiley.
- Wheeler, D. J., and Chambers, D. S. (1992). Understanding Statistical Process Control (2nd ed.). SPC Press.
- Duncan, A. J. (1986). Quality Control and Industrial Statistics (5th ed.). Irwin.
- Shewhart, W. A. (1931). Economic Control of Quality of Manufactured Product. Van Nostrand.