Control Chart Studio

Statistical process control — variables and attributes charts

Chart type and data

Variables — measured values
Attributes — counted values
Small shifts — time-weighted

Decimal mark

Open file reads CSV, TXT and Excel (.xlsx).

Tests for special causes

Change the run lengths

Each number can be changed within the range Minitab allows. Test 1 always uses the 3σ control limits.

Chart options

Each stage gets its own limits. You can also click a point on the chart.

Very large samples

EWMA parameters

λ = weight of the newest point (0.05 to 0.25 is usual). L = width of the limits in sigma.

CUSUM parameters

k = half of the shift to detect, in sigma (0.5 detects a 1σ shift). h = decision interval in sigma (4 or 5).

Target and sigma — optional

Leave empty to estimate both from the data.

No chart yet Type or paste your data above, or load the example for this chart type.

User guide — control charts

What a control chart tells you

A control chart plots a process statistic in time order against a center line and two control limits placed three standard deviations either side of it. Points that stay inside the limits with no pattern show only common-cause variation — the natural noise of a stable process. A point outside the limits, or a non-random pattern, signals a special cause: something changed and is worth investigating.

Control limits are calculated from the data. They are not specification limits and say nothing about whether the product meets its tolerance — the capability section does that, and only after the chart shows a stable process.

Choosing a chart

The link Not sure? Answer 3 questions under the chart buttons leads you to the right chart. The full list:

ChartDataUse it when
X̄–RMeasurements in subgroups2 to 10 parts are measured together at each sampling time. The classic shop-floor chart.
X̄–SMeasurements in subgroupsSubgroups are larger than 10, or their size varies. The standard deviation uses every value, the range only two.
I–MRSingle measurementsOnly one value exists per time point: batch results, daily readings, destructive or slow tests.
pDefective items / sample sizeEach item is classed good or defective and you track the fraction defective. Sample size may vary.
npDefective itemsSame as p but plotted as a count. Use with a constant sample size.
cDefects per sampleYou count defects (an item can have several) on samples of constant size or area.
uDefects / units inspectedYou count defects and the number of units, length or area inspected varies.
EWMASingle values or subgroupsYou must detect a small, sustained shift of the mean (0.5 to 1.5σ) quickly.
CUSUMSingle values or subgroupsSame purpose as EWMA; it also shows when the shift began.

Defective or defect? A defective (nonconforming) item fails as a whole — use p or np. A defect (nonconformity) is a single flaw, and one item may carry many — use c or u.

Entering data

How the limits are calculated

All limits are the center line ± 3 standard deviations of the plotted statistic. k is the number of subgroups, n the subgroup size.

X̄–R (equal subgroup size)

X̿ = ΣX̄ / k    R̄ = ΣR / k    σ̂ = R̄ / d₂
X̄ chart: X̿ ± A₂·R̄     R chart: UCL = D₄·R̄, CL = R̄, LCL = D₃·R̄

X̄–S (equal subgroup size)

S̄ = ΣS / k    σ̂ = S̄ / c₄
X̄ chart: X̿ ± A₃·S̄     S chart: UCL = B₄·S̄, CL = S̄, LCL = B₃·S̄

I–MR (moving range of 2 consecutive values)

MRᵢ = |xᵢ − xᵢ₋₁|    σ̂ = M̄R̄ / d₂ = M̄R̄ / 1.128
I chart: X̄ ± 3·M̄R̄/d₂ = X̄ ± 2.660·M̄R̄     MR chart: UCL = D₄·M̄R̄ = 3.267·M̄R̄, CL = M̄R̄, LCL = 0

Attributes charts

p:  p̄ = Σd / Σn     p̄ ± 3·√( p̄(1 − p̄) / nᵢ )
np: n·p̄ ± 3·√( n·p̄(1 − p̄) )
c:  c̄ = Σc / k     c̄ ± 3·√c̄
u:  ū = Σc / Σn     ū ± 3·√( ū / nᵢ )

A lower limit that would fall below zero is set to 0, and an upper limit for p cannot exceed 1. When the sample size varies, the p and u limits are calculated for every sample and drawn as steps.

Sigma estimate and unequal subgroups

The option Sigma estimate chooses how σ̂ is obtained from the subgroups. With equal subgroup sizes the first two choices give the same result.

Standard, unequal sizes (R): σ̂ = Σ fᵢ·Rᵢ/d₂(nᵢ) / Σ fᵢ,   fᵢ = d₂(nᵢ)² / d₃(nᵢ)²
Standard, unequal sizes (S): σ̂ = Σ hᵢ·Sᵢ/c₄(nᵢ) / Σ hᵢ,   hᵢ = c₄(nᵢ)² / (1 − c₄(nᵢ)²)
Average of the subgroup estimates: σ̂ = Σ (Rᵢ/d₂(nᵢ)) / k   or   Σ (Sᵢ/c₄(nᵢ)) / k
Pooled: σ̂ = Sp / c₄(d + 1),   Sp = √( Σ(nᵢ − 1)Sᵢ² / d ),   d = Σ(nᵢ − 1)

The standard choice weights the subgroups for minimum variance (the method Minitab documents); the plain average is the default of the R package qcc. Each subgroup then gets its own limits:

X̄ chart: X̿ ± 3·σ̂/√nᵢ    R chart: (d₂(nᵢ) ± 3·d₃(nᵢ))·σ̂    S chart: (c₄(nᵢ) ± 3·√(1 − c₄(nᵢ)²))·σ̂

X̿ is always the mean of all individual measurements.

Control chart constants

Standard table (the default) uses d₂ to three decimals and d₃ to four, exactly as printed in the standard tables (ASTM MNL 7, AIAG, Montgomery). Minitab and the R package qcc divide by the same d₂ values, so results can be compared with them digit for digit. c₄ is always computed from its formula, c₄ = √(2/(n−1))·Γ(n/2)/Γ((n−1)/2). The other factors (A₂, D₃, D₄, A₃, B₃, B₄, E₂) are derived from these at full precision instead of being read from a rounded table, so a hand calculation with a rounded A₂ or D₄ can differ in the last displayed digit. The tables stop at n = 25; larger subgroups use the exact values.

Exact values replaces the table values with d₂ and d₃ computed to full precision from the distribution of the range of a normal sample (for n = 2, d₂ = 2/√π = 1.12838 instead of 1.128). The difference shows in about the fourth significant digit of σ̂, mostly on the I–MR chart. The table below shows the constants for the option currently selected.

A₂ = 3/(d₂√n)   D₃ = max(0, 1 − 3d₃/d₂)   D₄ = 1 + 3d₃/d₂
A₃ = 3/(c₄√n)   B₃ = max(0, 1 − 3√(1−c₄²)/c₄)   B₄ = 1 + 3√(1−c₄²)/c₄

Tests for special causes

Each test looks for a pattern that would be very unlikely in a stable process. A flagged point is drawn in red with the number of the test it failed.

TestPattern (standard run lengths)Typical meaning
11 point more than 3σ from the center lineA sudden, large change — the basic out-of-control signal.
29 points in a row on the same side of the center lineA sustained shift in the process level.
36 points in a row, all increasing or all decreasingA trend or drift: tool wear, temperature, depletion.
414 points in a row, alternating up and downTwo alternating sources: shifts, machines, over-adjustment.
52 out of 3 points more than 2σ from the center line, same sideA moderate shift, caught earlier than test 1.
64 out of 5 points more than 1σ from the center line, same sideA small sustained shift.
715 points in a row within 1σ of the center lineToo little variation: mixed streams inside subgroups, or limits that are out of date.
88 points in a row more than 1σ from the center line, either sideA mixture: two processes plotted on one chart.

Stages

When the process was changed on purpose — a new tool, material or setting — one set of limits for the whole chart would be wrong. A stage starts new limits: type the point numbers in Stages — new limits from point, or click the first point after the change and choose Start a new stage here.

EWMA and CUSUM

Shewhart charts react to each point on its own and are slow to notice a small shift that persists. Time-weighted charts add up the evidence over several points.

EWMA: zᵢ = λ·xᵢ + (1 − λ)·zᵢ₋₁, z₀ = μ₀    limits: μ₀ ± L·(σ/√n)·√( λ/(2 − λ)·(1 − (1 − λ)^2i) )
CUSUM: C⁺ᵢ = max(0, xᵢ − (μ₀ + K) + C⁺ᵢ₋₁)   C⁻ᵢ = max(0, (μ₀ − K) − xᵢ + C⁻ᵢ₋₁)
K = k·σ/√n    signal when C⁺ or C⁻ exceeds H = h·σ/√n

Very large samples: Laney p′ and u′

The p and u charts assume that the only variation between samples is binomial or Poisson sampling noise. With samples of thousands of items that noise becomes tiny, the limits become very tight, and ordinary day-to-day variation shows up as false signals (overdispersion). Laney's correction measures the real short-term variation of the standardized values:

zᵢ = (pᵢ − p̄) / √( p̄(1 − p̄)/nᵢ )    σz = M̄R̄(z) / d₂    limits: p̄ ± 3·√( p̄(1 − p̄)/nᵢ )·σz

The same is done for u with √(ū/nᵢ). σz is always shown in the calculation card: near 1 the ordinary chart is fine, well above 1 the Laney chart is the right one.

Distribution, normality and capability

For measured data the page shows a histogram of the individual values used for the limits, with the fitted normal curve.

Cp = (USL − LSL) / 6σ̂    Cpk = min( (USL − X̄)/3σ̂, (X̄ − LSL)/3σ̂ )    σ̂ = within-subgroup sigma from the chart
Pp, Ppk: the same with s, the standard deviation of all values

Cp and Cpk describe what the process can do in the short term; Pp and Ppk what it actually delivered. They are only meaningful when the chart shows no signals. The link to Cp/Cpk Studio opens the same values there for confidence intervals and a full capability report.

Reading the result

  1. The What the values mean section explains every number for the data on screen.
  2. Start with the lower chart (R, S or MR). The limits of the upper chart are built from the spread, so if the spread is out of control those limits cannot be trusted yet.
  3. For each flagged point, look for what changed at that time: material, operator, setting, tool, gauge, environment.
  4. Click a point to open its menu: exclude it from the limit calculation, start a new stage, write a note with the cause, or jump to its row in the data cells. An excluded point stays visible but no longer enters the limits, and the tests are rerun on the remaining points. Do not exclude a point merely because it is inconvenient.
  5. For a long series, drag across the chart to zoom in, or use the Show buttons; double-click to see everything again. The limits always use all the data, whatever part is shown.
  6. When no signals remain, the limits describe the stable process and can be used to monitor new data.
Use at least 20–25 subgroups (or about 100 individual values) to set limits. With fewer points the limits are only preliminary and will move as data is added.
The p, np, c and u limits use the normal approximation, which is rough when the average count per sample is below about 5.

Saving, sharing and reports

References

Which chart fits your data?

Data sets

Saved in this browser only: the data, chart type, options, stages, exclusions and notes.

PDF report

These details are printed at the top of the report and in the signature block. All of them are optional.

The first report downloads the PDF library and a font (about 1 MB), so it needs an internet connection.