SPSS command: SPSS SPCHART

Statistical process control charts in your browser

Control charts plot a process measure over time against a centre line and control limits, so you can tell routine variation from a real change.

Free · No account · Files stay on your device · Updated 18 October 2026

What it tells you

Crosstabs follows SPSS SPCHART for variables charts (X-bar/R, X-bar/s, I-MR) and attribute charts (p, np, c, u), and checks every point against 11 run and zone rules.

  • Whether the process is in statistical control or a point, run or trend signals a special cause.
  • The centre line and lower and upper control limits for every subgroup, including varying limits when subgroup sizes differ.
  • The estimated process sigma, from R̄/d2 or s̄/c4 with the constants computed from their definitions.
  • Which of the 11 rules each flagged point breaks, from a point beyond the limits to 14 points alternating.

When to use it

Use it when

  • Monitoring a measured quality characteristic (fill weight, cycle time) sampled in subgroups or one at a time.
  • Tracking defect rates or counts per batch, day or unit with p, np, c or u charts.
  • Checking whether a change to a process produced a real shift rather than noise.

Use something else when

  • Data with strong autocorrelation or seasonality: limits will be wrong; model the series with time-series tools.
  • Comparing a few fixed groups once: that is a job for ANOVA or a chi-square test, not a control chart.

How to run it in Crosstabs

  1. 01

    Open your data in time order

    Open a .sav, CSV or Excel file in Statistics mode. Rows should be in production order; subgroups appear in the order they first occur.

  2. 02

    Choose the chart

    In the Utilities and charts group pick Control Charts, then Chart: X-bar and R, X-bar and s, Individuals and moving range, p, np, c or u.

  3. 03

    Pick the variables

    Choose the Measurement (or Status variable (per unit) for p/np, Defect count (per unit) for c/u) and the Subgroup identifier; for I-MR set the Moving-range span instead (default 2).

  4. 04

    Set the limits

    For p and np charts enter the Value meaning nonconforming (default 1). Set Sigmas for control limits (default 3), declare any active weight, and press Run.

Worked example

Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.

Data

75 synthetic fill weights (grams): 15 hourly subgroups of 5 bottles from a 500 g filler. From hour 12 the filler is made to drift about 1.6 g upward, a shift the chart should catch. Values come from a seeded generator.

Control Limits: X-bar chart
SubgroupnValueCenter lineLCLUCL
H015499.844500.383499.097501.669
H025499.160500.383499.097501.669
H035500.080500.383499.097501.669
H045500.456500.383499.097501.669
H055499.616500.383499.097501.669
H065500.520500.383499.097501.669
H075499.730500.383499.097501.669
H085499.424500.383499.097501.669
H095500.290500.383499.097501.669
H105499.700500.383499.097501.669
H115499.788500.383499.097501.669
H125501.298500.383499.097501.669
H135501.312500.383499.097501.669
H145502.082500.383499.097501.669
H155502.448500.383499.097501.669

Estimated process sigma: 0.9585 (from R̄ / d2).

Control Limits: Range chart
SubgroupValueCenter lineLCLUCL
H011.7402.2290.0004.714
H021.3302.2290.0004.714
H032.0802.2290.0004.714
H042.8102.2290.0004.714
H052.5302.2290.0004.714
H062.4402.2290.0004.714
H072.1202.2290.0004.714
H080.8202.2290.0004.714
H091.2402.2290.0004.714
H102.6202.2290.0004.714
H112.2802.2290.0004.714
H121.7602.2290.0004.714
H133.6002.2290.0004.714
H142.8802.2290.0004.714
H153.1902.2290.0004.714
Rule Violations
ChartSubgroupRule
X-bar chartH114 of the last 5 below −1 sigma
X-bar chartH132 of the last 3 above +2 sigma
X-bar chartH14Above the upper control limit
X-bar chartH142 of the last 3 above +2 sigma
X-bar chartH15Above the upper control limit
X-bar chartH152 of the last 3 above +2 sigma
X-bar chartH154 of the last 5 above +1 sigma
X-bar chartH156 in a row trending up

How to read it

The X-bar chart is centred at 500.383 g with limits 499.097 to 501.669 g, and the range chart's centre line (R̄) is 2.229 g. 8 rule violations are flagged. The first subgroup mean above the upper limit is H14 (502.082 g against a UCL of 501.669 g), after the drift that starts at H12. The earlier flag at H11 (4 of the last 5 below −1 sigma) is a side effect: the drifted hours pull the centre line up, so ordinary hours sit below it. Because the limits are estimated from all 15 subgroups, recompute them from an in-control baseline once the cause is fixed.

Output tables explained

Control Charts
One or two charts (for example the X-bar chart and the Range chart) with the centre line, dashed control limits and highlighted points that break a rule.
Control Limits
For each chart and subgroup (or case): n, plotted value, centre line, LCL and UCL; footnotes give the estimated process sigma and any subgroups or cases left out.
Rule Violations
Every flagged point with the chart, subgroup and rule broken; shown only when at least one rule fires.

Assumptions and notes

  • Observations are independent over time and, for variables charts, roughly normal within subgroups.
  • Limits are estimated from all the data you supply; if a shift is present, recompute them from an in-control baseline period.
  • Only whole-number frequency weights are used; with a sampling weight every case counts once. X-bar subgroups need at least two units.

How the results are validated

SPCHART is checked against an independent Python reference: the d2 and d3 constants, computed by numerical integration in scipy.integrate, agree to 1e-8 and 1e-7, and c4 from scipy.special.gamma to 1e-12, all cross-checked against the published three-decimal tables. Limits for X-bar/R and X-bar/s with unequal subgroups, I-MR, p, np, c and u charts agree to between 1e-8 and 1e-10. Rule detection is covered by unit tests. Validation evidence

Questions

Which chart should I use?

Measurements in subgroups: X-bar and R (small subgroups) or X-bar and s (larger ones). One measurement at a time: individuals and moving range. Pass/fail per unit: p or np. Defect counts: c for a constant area of opportunity, u when it varies.

Are control limits the same as specification limits?

No. Control limits describe what the process actually does (usually ±3 sigma); specification limits are what the customer requires. A process can be in control and still out of specification.

Which rules are checked?

Points beyond either limit, 2 of 3 beyond 2 sigma, 4 of 5 beyond 1 sigma, 8 in a row on one side of the centre line, 6 in a row trending up or down, and 14 in a row alternating, on each side where it applies: 11 rules in all.

Why do my limits change from subgroup to subgroup?

Subgroup sizes differ. Limits depend on n, so smaller subgroups get wider limits, as in SPSS.

Run Control Charts on your own data

Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.

Open the workspace

SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.