Xbar-S chart: formulas, constants and a worked example

Updated

An Xbar-S chart is a pair of control charts for measurements collected in subgroups. The top chart plots each subgroup's mean (x̄) to show where the process is centered; the bottom chart plots each subgroup's standard deviation (s) to show how much it varies within the subgroup. It does the same job as the Xbar-R chart, but it measures spread with every value in the subgroup instead of only the largest and smallest, so it works better with larger subgroups.

When to use it

  • You measure a continuous characteristic in rational subgroups of 10 or more values, such as 10 tablets every half hour.
  • Your subgroup sizes vary from one sample to the next. The S chart handles unequal sizes more cleanly than the range.
  • You collect data automatically, so computing a standard deviation costs nothing.

For small subgroups (2 to 9), the Xbar-R chart is just as good and easier to explain. For one value at a time, use the I-MR chart.

How it works

Collect m subgroups of n values (20 to 25 subgroups for the first limits). For each subgroup, compute the mean x̄ᵢ and the sample standard deviation sᵢ. Average them to get x̄̄ and s̄.

The S chart:

UCL_S = B₄s̄ CL_S = s̄ LCL_S = B₃s̄

The Xbar chart:

UCL = x̄̄ + A₃s̄ CL = x̄̄ LCL = x̄̄ − A₃s̄

The constants come from c₄, the expected value of s for n values from a normal distribution with σ = 1:

c₄ = √(2/(n − 1)) · Γ(n/2) / Γ((n − 1)/2) σ̂ = s̄ / c₄ A₃ = 3 / (c₄√n) B₃, B₄ = 1 ∓ 3√(1 − c₄²) / c₄

B₃ is set to 0 when the formula gives a negative number (n ≤ 5).

n2345678910
c₄0.79790.88620.92130.94000.95150.95940.96500.96930.9727
A₃2.6591.9541.6281.4271.2871.1821.0991.0320.975
B₃00000.0300.1180.1850.2390.284
B₄3.2672.5682.2662.0891.9701.8821.8151.7611.716

Apply all eight tests for special causes to the Xbar chart. On the S chart, use Tests 1 to 4 only, because the distribution of s is skewed.

Example

A rotary tablet press makes tablets with a target weight of 250 mg. Every 30 minutes a technician weighs 10 tablets. After 10 hours there are 20 subgroups. Three of them:

SubgroupTablet weights (mg)x̄s
1251.0, 252.5, 251.0, 246.1, 252.7, 251.3, 248.4, 251.7, 251.1, 250.9250.671.984
2250.1, 251.6, 247.8, 249.5, 248.6, 251.8, 250.1, 249.1, 247.7, 249.2249.551.398
9262.8, 264.1, 242.5, 252.6, 245.3, 249.8, 241.1, 263.1, 243.2, 247.9251.249.030

Over all 20 subgroups, x̄̄ = 249.843 mg and s̄ = 3.065 mg. With n = 10, A₃ = 0.975, B₃ = 0.284 and B₄ = 1.716:

  • S chart: UCL = 1.716 × 3.065 = 5.259 mg; LCL = 0.284 × 3.065 = 0.870 mg.
  • Xbar chart: UCL = 249.843 + 0.975 × 3.065 = 252.831 mg; LCL = 246.855 mg.
S chart of tablet weight2468Standard deviation (mg)CL=3.065UCL=5.259LCL=0.87135791113151719Subgroup
S chart of tablet weight
Xbar chart of tablet weight248250252Mean weight (mg)CL=249.84UCL=252.83LCL=246.85135791113151719Subgroup
Xbar chart of tablet weight

The Xbar chart shows nothing unusual, but subgroup 9 on the S chart has s = 9.030 mg, far above the upper limit. Its mean (251.24 mg) looks normal: tablets of 241 mg and 264 mg average out. The batch record shows the hopper ran low during that half hour, so the dies filled unevenly. After the cause is fixed, subgroup 9 comes out of the baseline: s̄ = 2.751 mg, x̄̄ = 249.769 mg, the Xbar limits become 247.088 to 252.451 mg, the S limits 0.781 to 4.720 mg, and σ̂ = 2.751 / 0.9727 = 2.828 mg.

How to read the results

  • Start with the S chart. The Xbar limits are built from s̄, so an out-of-control S chart makes them unreliable.
  • A high point on the S chart means the parts in that subgroup disagreed with each other more than usual: uneven feeding, a loose fixture, mixed material.
  • A low point on the S chart (possible here, because B₃ > 0 for n = 10) means unusually little spread. Check first whether the data were recorded correctly or the gauge stuck.
  • A point outside the Xbar limits means the center moved. Patterns such as a run of 9 on one side (Test 2) or 6 in a row rising (Test 3) point to drifts.
  • Use σ̂ = s̄/c₄ for capability. It is the within-subgroup standard deviation that feeds Cp and Cpk in a capability analysis.

Common mistakes

  • Using s̄ as σ without c₄. The average standard deviation underestimates σ, especially for small subgroups (by 6% at n = 5).
  • Judging only the means. As subgroup 9 shows, a mean can look fine while individual tablets are far off target.
  • Subgroups taken over a long time. If the 10 tablets come from different hours, s includes drift and the Xbar limits become too wide.
  • Computing the limits from a single huge subgroup. You need many subgroups to see how the mean moves between them.

Frequently asked questions

When should I use an Xbar-S chart instead of an Xbar-R chart?

Use the Xbar-S chart when subgroups have 10 or more values, or when their sizes vary. For subgroups of 2 to 9 values, both charts work and give nearly the same limits; the Xbar-R chart is simpler.

What if my subgroup sizes are not all equal?

The limits then change with each subgroup's size: compute A₃, B₃ and B₄ for each nᵢ, and estimate σ from all subgroups together (for example with the pooled standard deviation). Subgroups with more values get narrower Xbar limits.

Why does the S chart have a lower limit at n = 10 but not at n = 5?

For n ≤ 5 the formula for B₃ gives a negative number, so the lower limit is set to 0. From n = 6 on, the spread of s is small enough relative to its mean for a positive lower limit.

Can I use the S chart by itself?

Yes. If you only care about consistency within subgroups, see the S chart. But the mean usually matters too, so most people plot both.

Try it with your own data

StatLab SPC is free, open-source statistics for engineers. It runs in your browser, works offline, and never uploads your data.

Open StatLab