Lean Six SigmaSPC & Control Charts
Three questions pick the right control chart
Measurement or count, how many readings per point, and what you are counting. Worked X-bar and R and p chart examples show why a 3.5% day can be out of control while a 3.75% day is not.

A control chart can only answer the question it was built to answer. Put individual readings on a chart designed for subgroup averages, or put a defect count on a chart designed for a fraction defective, and the limits will be wrong. Sometimes they are too tight, so the chart cries wolf every shift and people learn to ignore it. Sometimes they are too wide, so a real shift in the process slides by without a single point out of control. Neither failure is obvious from looking at the chart, because a wrong chart looks exactly like a right one.
The good news is that choosing the chart is not a matter of taste. Three questions settle it for almost every case on a factory floor: what kind of data you have, how it is collected, and what one plotted point is supposed to represent. This article walks through those questions, the seven charts most plants actually use, the constants behind their limits, and a full worked example for one variables chart and one attributes chart. It ends with the mistakes that turn a good chart into decoration and a short list of steps for setting one up.
First question: measurement or count?
Every control chart belongs to one of two families, and the split comes from the data, not from the process.
- Variables data is a measurement on a continuous scale: a diameter in millimeters, a fill weight in grams, a torque in newton meters, a cure temperature, a cycle time. Two readings can differ by any amount, limited only by the resolution of the gage.
- Attributes data is a count. Either you count units that fail (a board is good or defective), or you count defects on a unit (a painted panel has three runs and a scratch). The numbers are whole numbers, and the statistics behind them come from the binomial and Poisson distributions instead of the normal distribution.
When you have a choice, take the measurement. A diameter of 12.019 mm tells you the part is close to the upper limit and drifting; a go/no-go gage only tells you it still passes. Variables charts detect shifts with far smaller samples, often five parts where an attributes chart needs hundreds. Attributes charts earn their place when the characteristic truly is pass or fail (a missing component, a cosmetic flaw, a leak test with a yes or no result), or when you want one chart to summarize many kinds of failure at once.
Second question: how many readings form one point?
For variables data, the next question is the subgroup size, written : how many readings are taken together and summarized as one point on the chart.
Individuals and moving range (I-MR), n = 1
Use the I-MR chart when each reading stands alone. That is the normal case for batch processes (one viscosity reading per batch), slow processes (one part an hour), destructive tests, and computed values such as a daily scrap rate or a monthly yield. The individuals chart plots each reading. The moving range chart plots the absolute difference between each reading and the one before it, which is the only short term estimate of variation available when you have one value at a time.
X-bar and R, n from 2 to about 9
When you can take a few consecutive parts at a time, say five shafts off the lathe every hour, plot the subgroup average on an X-bar chart and the subgroup range (largest minus smallest) on an R chart. Averages are more sensitive than individual readings because averaging cuts the noise: the standard deviation of a mean of readings is . Five is the classic size because it is easy to measure and calculate, and it catches a shift of about one and a half sigma quickly.
X-bar and S, n of 10 or more
The range throws away information. It uses only the two extreme readings in each subgroup, which is fine for four or five readings and increasingly wasteful as the subgroup grows. Once subgroups reach about 10 readings, replace the range with the subgroup standard deviation and use the X-bar and S chart. Many references draw the line at 9 or 10; some quality teams use S charts for any subgroup above 8. Whatever cutoff you choose, write it down and use it consistently. With software doing the arithmetic, there is no penalty for using S charts for smaller subgroups too.
Third question: what are you counting?
Attributes charts split along two lines: are you counting defective units or defects, and is the amount inspected the same every time?
- p chart: the fraction of units that are defective, when the number inspected changes from sample to sample. A good unit and a defective unit are the only outcomes.
- np chart: the number of defective units, when every sample is the same size. It carries the same information as a p chart, but operators find a count easier to read than a fraction.
- c chart: the number of defects per inspection unit, when the inspection unit stays the same (one car door, one 100 meter roll, one board). One unit can have several defects.
- u chart: defects per unit of opportunity, when the area, length or number of units inspected changes. Defects per square meter of painted panel, or defects per thousand solder joints, are typical.
The decision table
Put the three questions together and the choice becomes a lookup.
| Data | How collected | Plotted statistic | Chart | Distribution behind the limits |
|---|---|---|---|---|
| Measurement | One reading at a time | Each reading, and the moving range | I-MR | Normal (approximately) |
| Measurement | Subgroups of 2 to about 9 | Subgroup mean and range | X-bar and R | Normal for means |
| Measurement | Subgroups of about 10 or more | Subgroup mean and standard deviation | X-bar and S | Normal for means |
| Defective units | Sample size varies | Fraction defective | p | Binomial |
| Defective units | Sample size constant | Number defective | np | Binomial |
| Defects | Same inspection unit each time | Defects per sample | c | Poisson |
| Defects | Inspection area or quantity varies | Defects per unit | u | Poisson |
Rational subgrouping: the decision that matters most
The chart type follows from the data, but the subgroup is a choice you make, and it decides what the chart can see. The rule, from Walter Shewhart's original work, is that a subgroup should contain only the variation you consider normal and short term. Everything you want to detect should happen between subgroups.
That is why the classic subgroup is five consecutive parts from one machine, one cavity, one operator. Within those five parts, nothing much should change, so the range measures the common cause noise of the process. The X-bar chart then asks whether the hour-to-hour averages move more than that noise can explain.
Break the rule and the chart quietly fails. Suppose you take one part from each of four mold cavities and call it a subgroup of four. Real differences between cavities now live inside every subgroup, so the range is inflated, the limits on the X-bar chart are too wide, and the chart will hardly ever signal. The cure is to chart each cavity on its own, or to chart the cavity averages with an individuals chart. The same trap catches subgroups that span two spindles, two shifts, or parts pulled from a tote that mixed an hour of production.
The opposite mistake also happens. If the parts in a subgroup are so alike that the range is almost zero (for example, five readings of the same part), the limits become far too tight and nearly every point falls outside them. Repeat readings of one part measure the gage, not the process.
The constants, and what they stand for
Control limits are set at three standard deviations of the plotted statistic on either side of its center line. Most charts estimate that standard deviation from the average range or average standard deviation, using tabulated constants that depend on the subgroup size. They are not arbitrary fudge factors. Each one is a conversion from a range or a standard deviation to three standard errors of the statistic you plot.
The key constant is , the expected range of readings from a normal distribution with a standard deviation of 1. It gives the estimate
The X-bar chart limits are , and the constant simply packages that arithmetic:
The R chart limits are and . For an individuals chart, the moving range has , so and
| n | d2 | A2 | D3 | D4 |
|---|---|---|---|---|
| 2 | 1.128 | 1.880 | 0 | 3.267 |
| 3 | 1.693 | 1.023 | 0 | 2.574 |
| 4 | 2.059 | 0.729 | 0 | 2.282 |
| 5 | 2.326 | 0.577 | 0 | 2.114 |
| 6 | 2.534 | 0.483 | 0 | 2.004 |
| 7 | 2.704 | 0.419 | 0.076 | 1.924 |
Standard control chart constants. D3 is zero for subgroups of six or fewer, so the R chart has no lower limit there.
Two points about the constants are worth remembering. First, use the constant for the subgroup size you actually have. A table lookup error, such as using for on subgroups of 5, changes the limits by about 26%. Second, the constants estimate short term variation from within subgroups. They do not use the overall standard deviation of all the data, and that difference is the whole point: limits built from the overall spread already include any shifts between subgroups, so they cannot detect them.
Worked example 1: an X-bar and R chart for a turned shaft
A lathe turns a shaft with a bearing diameter specified at 12.000 mm plus or minus 0.025 mm. Every hour, the operator measures five consecutive shafts. After 20 hours, the team has 20 subgroups of 5, or 100 readings. The subgroup averages and ranges summarize to
Step 1: Limits for the R chart
Always start with the range chart. If the within-subgroup variation is not stable, the X-bar limits, which are built from , mean nothing. For , and :
The team checks the 20 ranges. None exceeds 0.0444 mm and there are no unusual runs, so the short term variation is stable.
Step 2: Limits for the X-bar chart
With :
Step 3: Check the arithmetic against sigma
The process standard deviation estimate is
and three standard errors of a mean of five is mm, which matches . The constant was doing exactly that calculation.
Step 4: Read the chart, and do not confuse it with the drawing
Notice that the control limits (11.9919 to 12.0161 mm) are much narrower than the specification (11.975 to 12.025 mm). That is normal, because the limits describe averages of five parts, and averages vary less than individual parts. An individual shaft at 12.020 mm is inside the specification and says nothing alarming. A subgroup average of 12.018 mm is above the upper control limit and says the process has shifted, even though every part in that subgroup may still be good. That early warning, before scrap appears, is what the chart is for.
The data also answer a capability question. The process mean is 0.004 mm above nominal, and the upper specification is mm away, or about sigma. That gives a Cpk of about 0.78, so the process is stable but not capable. Centering it would help, but the variation is also too large to give a Cpk of 1.33. The control chart tells you the process is predictable; capability tells you whether the prediction is good enough. They are separate questions.
Worked example 2: a p chart with varying sample sizes
An electronics plant runs a final functional test on circuit boards. The number tested each day depends on the schedule, from 400 to 1,200 boards. Over 20 production days, the plant tested 15,600 boards and found 312 defective.
Step 1: The center line
The center line is the total defectives divided by the total inspected, not the average of the daily fractions:
Step 2: Limits that change with sample size
The standard deviation of a fraction from a sample of is , so each day gets its own limits:
| Boards tested (n) | Three sigma | UCL | LCL | Expected defectives |
|---|---|---|---|---|
| 400 | 0.0210 | 4.10% | 0 (none) | 8 |
| 800 | 0.0148 | 3.48% | 0.52% | 16 |
| 1,200 | 0.0121 | 3.21% | 0.79% | 24 |
Worked example with illustrative data. A negative lower limit is set to zero.
The limits step in and out as the daily volume changes, which looks odd the first time people see it, but it is correct. A small sample can swing a long way by chance; a big one cannot.
Step 3: Two days that look alike
On one day the plant tested 400 boards and found 15 defective, a rate of 3.75%. On another it tested 1,200 and found 42 defective, a rate of 3.5%. The first point is inside its upper limit of 4.10%. The second is above its limit of 3.21% and signals a special cause, even though its rate is lower. Forty-two defectives when 24 are expected is a much stronger signal than 15 when 8 are expected. Anyone who plotted the daily rates against a single fixed limit would have reached the wrong conclusion on both days.
If the daily sample size had been fixed at 500, an np chart would have been simpler: center line defectives, upper limit , and lower limit 0.6. Operators would just compare the count to 19.
Step 4: Check for overdispersion
The p chart assumes every board has the same chance of failing, independent of every other board. With very large samples, that assumption is almost never quite true. Lots of components differ, solder paste ages through the day, and these small real shifts are larger than the binomial model allows. The result is limits that are too tight, with many points flagged out of control even though nothing special happened.
David Laney's p' chart (p prime) corrects for this. It converts each point to a z score, measures how much those z scores actually vary from point to point using a moving range, and multiplies the binomial limits by that ratio, called . If is near 1, the ordinary p chart was fine. If the plant's data gave , the limit for a 1,200-board day would widen from 3.21% to
and the 3.5% day would no longer count as a signal. Neither answer is automatically right. A large is itself a finding: it says day-to-day variation is real and worth studying, but it should not be treated as a stream of separate alarms. Laney's chart, or an individuals chart of the daily rates, is the honest choice when sample sizes run into the thousands.
Defect counts: c and u charts
For defects rather than defectives, the Poisson distribution sets the limits, and its variance equals its mean. A paint line that averages defects per car door has limits of , giving an upper limit of 12.0 defects and no lower limit (the calculation gives a negative number).
When the amount inspected changes, convert to a rate. If the line found 84 defects on 60 square meters of panels, defects per square meter, and a sample of area has limits
For a 4 square meter sample the upper limit is 3.17 defects per square meter; for 8 square meters it tightens to 2.65, with a lower limit of 0.15. As with the p chart, the limits follow the sample size. The same overdispersion caveat applies: defects that cluster (one bad spray gun leaving runs across a whole batch) violate the Poisson assumption and make the chart too sensitive. Laney's method has a u' version for that case.
Common mistakes
Charting measurements as pass or fail
Plants with a measured characteristic sometimes chart the fraction out of tolerance on a p chart because "that is what the customer cares about." The chart then reacts only after parts are already bad, and it needs hundreds of samples to see what five measurements would have shown. If you measure it, chart the measurement.
Using the wrong chart for individual readings
Treating a set of consecutive single readings as a subgroup (for example, grouping five batches into an artificial subgroup) mixes batch-to-batch variation into the range and inflates the limits. Batch data belongs on an I-MR chart.
Drawing specification limits on the chart
Specification limits come from the drawing and describe what the customer will accept. Control limits come from the process and describe what it will do. Putting tolerance lines on an X-bar chart is especially misleading, because averages are plotted against limits meant for individual parts, and the averages will almost never get near them. Keep specifications on histograms and capability reports.
Recalculating limits all the time
Some systems recompute the limits every time a new point arrives. A slow drift then pulls the limits along with it, and the chart never signals. Set limits from a stable baseline of at least 20 to 25 subgroups, freeze them, and recompute only after a documented change to the process: new tooling, a new material supplier, a deliberate improvement.
Using the overall standard deviation
Calculating limits as the grand mean plus or minus three times the standard deviation of all the readings feels natural, but it builds every shift in the data into the limits. Use , or with the right constants.
Ignoring the gage
If the measurement system cannot resolve the variation, a variables chart shows chunky data with only a few distinct values, and the range chart often shows many zero ranges. Fix the gage first; a control chart cannot be better than the measurements behind it.
Setting up a chart in practice
- Name the question. Write down which characteristic matters and what kind of change you want to catch: a shift in average, more spread, more defects.
- Classify the data. Measurement or count; if a count, defectives or defects.
- Choose the subgroup. Decide how many readings, how often, and from which stream (one machine, one cavity, one line), so that each subgroup holds only short term variation.
- Pick the chart from the table. Use the subgroup size and sample size rules above.
- Collect a baseline. Gather at least 20 to 25 subgroups, or 100 or more individual readings, without adjusting the process for the sake of the chart.
- Compute and check the dispersion chart first. R, S or MR must be stable before the limits on the average chart can be trusted. For attributes charts with large samples, check for overdispersion.
- Freeze the limits and react to signals. Apply your out-of-control rules consistently, record the cause of each signal, and recompute only when the process truly changes.
Choosing the chart takes a few minutes once the three questions are answered. Choosing the subgroup takes thought, and it is the part worth arguing about with the people who run the process. A correct chart with a sensible subgroup will show you when the process changes and, just as important, when it has not, so nobody wastes a shift chasing noise.