Run Chart with Runs Tests for Clustering, Mixtures, Trends and Oscillation

Paste a column of measurements in time order and get a run chart about the median with the four runs-test p-values — clustering, mixtures, trends and oscillation — plus an honest account of which published run rules can be applied to a chart that has no control limits.

Run chart vs control chart — the difference that matters

A run chart plots your measurements in time order against a centre line and nothing else. A control chart adds an estimate of short-term variation, σ̂, and draws control limits from it. That single addition is the whole difference, and everything else follows from it.

The control chart is the more powerful instrument, and it costs more: you have to defend the estimator. Is σ̂ the average moving range over d₂? The median moving range over d₄? The pooled within-subgroup standard deviation over c₄? Three answers, three sets of limits, and a reviewer entitled to ask which one you used and why. A run chart never faces that question, because it never divides by anything. It tests the ORDER of the points — how often the series crosses its own centre line, how often it changes direction — and the order is a fact about the data that no estimator can move.

So a run chart cannot tell you that a point is out of control, and it will not pretend to. What it can tell you is that the series is not behaving randomly: that it is drifting, that it is bunching on one side, that it looks like two processes interleaved, or that it is sawing back and forth. Those are the signals it was invented for, and it finds them without assuming the measurement is normally distributed.

Use a run chart when you are looking at a process for the first time, when you have too few points to trust a limit calculation, when the data are plainly not normal, or when you simply want to know whether anything changed. Move to an [I-MR chart](/i-mr-chart) when you want limits — same data, same column, one click across.

Data

Paste straight from Excel, Minitab or a CMM export — include the header row and the columns are matched by name, in any order.

#Sample(opt)MeasurementNew batch(opt)
1
2
3
4

0 rows of data

Loading the calculation engine…

Enter data on the left to chart it

SVG is vector — it stays sharp at any size in a report. PNG 4× is roughly 600 dpi at figure width. Every export carries the estimator, the constants and the rule set drawn inside the figure, so the file is readable on its own.

Downloads carry a small “made with spcplot.com” credit along the bottom edge. The chart on screen is never watermarked, and the credit is a credit rather than a licence restriction — the figures are yours to publish either way. A Pro or Lifetime licence removes it.

Options

This plot has no adjustable options yet.

Your measurements are processed entirely in this browser tab. Nothing you type here is uploaded, so confidential production data stays confidential.

The four p-values, and what each one is asking

Two runs tests are computed, and each is read in both tails, which is where four p-values come from.

Runs about the centre line. A run is one or more consecutive points on the same side of the centre line. With m points above it, n on or below it and N = m + n, a random series is expected to produce E(R) = 2mn/N + 1 runs, with variance 2mn(2mn − N)/(N²(N − 1)). Compare the observed count against that and read the normal tail. Too few runs is clustering — the points bunch on one side at a time, which is what a drift, a shift or a settling process looks like. Too many runs is mixtures — the series crosses the middle far more often than chance allows, which is what two interleaved populations look like: two machines, two operators, two supply lots feeding one chart.

Runs up and down. A run here is a maximal stretch going the same direction. For N points a random series is expected to produce E(V) = (2N − 1)/3 of them, with variance (16N − 29)/90. Too few reversals is a trend. Too many is oscillation — a series that alternates almost every point, which usually means over-adjustment: somebody is correcting the process on each reading and pushing it back and forth across the target.

All four are labelled *approximate* because all four are normal approximations to discrete distributions. Below about twenty points they are indicative rather than exact, and the tool says so on the figure rather than letting anybody quote three decimals off eight observations.

Run chart rules: which published tests actually apply

Nelson, Western Electric and ISO 7870-2 are all written for a Shewhart control chart, and roughly half of every one of those sets is a zone test — one point beyond 3σ, two of three beyond 2σ, four of five beyond 1σ, fifteen within 1σ, eight outside 1σ. Every one of those measures a distance from the centre line in multiples of σ̂. A run chart has no σ̂. There is nothing to divide by, so those tests cannot be run at all.

What survives is the part of each set that is about order: a run of consecutive points on one side of the centre line, a monotone trend, and alternation. Those need no sigma, and they are precisely the patterns a run chart exists to show. Choose a rule set here and the tool applies those and lists the ones it had to suppress, with the reason, on the figure. It does not report "no violations" for a test it never ran — a silent pass on an unrun test is how an audit finding gets written.

Which set you choose changes the answer, and that is not a defect in anybody’s software: Nelson wants nine consecutive points on one side of the centre line, Western Electric eight, ISO 7870-2 seven. On the dataset loaded here, Nelson and Western Electric flag different numbers of points, and both are correct under their own published definition. The active set is printed under the chart so the figure can be reproduced by somebody who was not in the room.

One set deserves a specific warning. Nelson test 1 alone — the out-of-the-box setting in most SPC software, and the default on the control charts elsewhere on this site — consists of exactly one 3σ test. On a run chart it is empty: nothing can ever be flagged. Select it here and the tool says so in red rather than showing a clean chart.

Two conventions that change the numbers

A point sitting exactly on the centre line is counted as below it. That is the convention the runs test is defined under, and it is not cosmetic: with an odd number of points and a median centre line, exactly one point is always on the line, and moving it to the other side changes m, n, the expected run count and all four p-values. On a coarse gauge — readings in whole units, or to one decimal — a dozen points can land on the median at once. The tool draws those as hollow rings so you can see how many there were, and says so under the figure.

A tie between consecutive points has no direction, so it cannot start, continue or end a run up or down. Those differences are dropped and the expected reversal count is computed for the points that remain. Leaving them in would compare the series against the expectation for a longer one and make a repetitive gauge look like a trend.

The centre line is the median by default, not the mean, and the runs-about-the-centre test is defined about a median split — it expects roughly half the points on each side. On a skewed series a mean centre line can leave three quarters of the points on one side, which inflates the expected number of runs and makes clustering harder to see. The mean is offered because some house standards specify it; whichever is in force is printed on the figure.

Stages, when the process changed on purpose

Mark the first row after a known change in the "New batch" column and the series splits into stages. Each stage gets its own centre line and its own runs tests, and no run is allowed to cross the boundary.

This matters more than it sounds. A run that spans a deliberate process change is evidence about the change, not about the process — and left alone, a recipe change halfway through a series produces an enormous run about the pooled median and a clustering p-value near zero, telling you at length something you already knew. Splitting the stages asks the useful question instead: was each stage, on its own, behaving randomly?

Common questions

What is the difference between a run chart and a control chart?
A run chart plots the data in time order against a centre line, usually the median. A control chart adds an estimate of short-term variation and draws control limits from it. The run chart therefore cannot say a point is out of control; it tests whether the ORDER of the points is random, using runs about the centre line and runs up and down. It needs no sigma estimate and no normality assumption, which is why it is the right first look at an unfamiliar process.
Why does my run chart have no UCL and LCL?
Because it is a run chart. Control limits require a sigma estimate, and producing one is what makes a chart a control chart. Nothing is missing and nothing failed to compute — the figure states this in its disclosure block so that a reader who finds it in a report six months later cannot mistake the centre line for a limit. Paste the same column into the I-MR chart if you want limits.
What do clustering, mixtures, trends and oscillation actually mean?
They are the two tails of two tests. Clustering is too few runs about the centre line — the points bunch, which is what a drift or a shift looks like. Mixtures is too many — the series crosses the middle more often than chance allows, which is what two interleaved populations look like. Trends is too few direction reversals. Oscillation is too many, which usually means somebody is over-adjusting the process. A p-value below your α says the pattern is unlikely under randomness; it does not say what caused it.
Can I use Nelson or Western Electric rules on a run chart?
Partly, and the tool is explicit about which part. The order-based tests — a run of consecutive points on one side, a monotone trend, alternation — apply, because they need no sigma. The zone tests do not, because there are no zones without control limits. Select a set and the figure lists the tests it applied and the tests it suppressed, with the reason for each.
How many points does a run chart need?
It will draw from two, but all four p-values are normal approximations: the usual guidance is more than twenty points, with at least ten on each side of the centre line. Below that the tool still computes them and prints a warning saying the approximation is indicative rather than exact — which is also why they are labelled "approximate" wherever they are reported.
A point is exactly on the median. Which side does it count as?
Below. That is the convention the runs test is defined under, and it is the one used here. It is not a rounding detail: with an odd number of points there is always one point on the median, and on a coarse gauge there can be a dozen. The tool draws them as hollow rings and reports how many there were, because counting them the other way would change every p-value on the sheet.
Is my data uploaded anywhere?
No. The whole calculation runs as JavaScript in this browser tab, and nothing on this site accepts a measurement — the only server code here takes a payment. That is why the tool is usable on data you are contractually barred from putting in a cloud service.