Run chart
A run chart is a line chart that plots a measurement in time order and takes its median as the centre line. The team reads it with probability rules. A long series of points on one side of the median or a series of points that rise or fall without a break signals non-random variation. So do too few or too many alternations around the median and a point far from all the others. The chart needs neither control limits nor an assumption about the distribution of the data. The team can read it from about a dozen points. It takes its name from its runs. A run is a sequence of consecutive points on the same side of the median.
Goal
The run chart is a monitoring chart: it plots each value of a measurement in date order and shows where it falls relative to the median. It shows whether the measurement has changed and from which point.
Descriptive statistics summarise a period and ignore the order of its values. A mean before a change and a mean after it say that an indicator has fallen. They say neither when the fall starts nor whether it lasts. Perla, Provost and Murray show three units that have the same mean and the same standard deviation before and after an improvement. In the first, the gain holds. In the second, the fall had started before the change. In the third, the gain fades. Only the order of the points tells the three stories apart.
The deliverable is the annotated chart: the dated points, the median of the baseline period, the changes introduced, the rule that gave a signal and the point where it fired. From it the team reads the effect of a change and decides whether to keep the change, correct it or drop it.
A control chart plots the same points with the mean and control limits. The run chart replaces the mean with the median and has no limits. It does not say whether the process is stable: that question belongs to the control chart.
Usage
When to use it
- Improvement under way: follow the indicator point by point and see whether the change works before the baseline is long enough for control limits.
- Before-and-after comparison: show when the effect starts.
- Before calculating control limits: a series that gives a signal cannot be the baseline of a control chart.
- A worrying value this week: check whether it extends a shift or a trend before asking anyone to explain it.
- After an improvement: in the Control phase of a DMAIC project, check that the gain holds.
When not to use it
- A question of stability or predictability: the run chart does not settle it. Draw a control chart.
- Measurements with no time order: a batch measured at one time has no chronology. Describe its distribution with a histogram.
Description
The elements
The horizontal axis carries the time order: days, weeks or successive cases when each request or each delivery gives one value. The vertical axis carries the measurement: a count, a rate, a lead time.
The centre line is the median: the value that leaves as many points above it as below it. Each point has an even chance of falling above the median. The reading rules rest on this probability. An extreme value does not move the median.
The baseline period covers the points recorded before the change. The team calculates the median from these points only. If the period shows no signal, the team freezes the median and extends it over the following points. The annotations place the changes introduced and the known events on the time axis: a new procedure, a migration, a reduced team during the holidays. A target line may be added. The rules ignore it.
A run is a sequence of consecutive points on the same side of the median. A point on the median neither extends nor breaks the current run. The number of runs is one more than the number of times the line crosses the median. The useful observations are the points that do not fall on the median. The thresholds of the rules depend on their number.
Building the run chart
- Define the measurement, the time unit and the rule set. The team writes down what it counts, within which scope and at what interval: the defects found per week in user acceptance testing (UAT) or the lead time of each request in order of closure. Outside IT, a cantonal administration can plot the processing time of each case file. The definition stays the same for the whole period of monitoring. A definition that changes produces a shift that the rule reports as an effect. A raw count also depends on the volume processed. When the volume varies from one period to the next, the team plots a rate, for example the defects per 100 test cases run. If half the values or more fall at 0 or 100%, the median sits on the boundary. The team then plots the time elapsed between two events. Finally, the team chooses the rule set before data collection begins.
- Record the values. The values come from a system, an export or a check sheet kept at the workstation. Each value keeps its date.
- Plot the points. The team plots one point per period in time order and joins each point to the previous one.
- Calculate the median of the baseline period. The team sorts the values of the period and takes the middle value. For an even number of values, the median is the mean of the two middle values. The team draws the median as a horizontal line and marks the date of the change on the axis.
- Check the baseline period. The team applies the rules to the points of the period alone. Without a signal, it freezes the median and extends it to the right. A signal shows that the period already contains a change. The team looks for its cause before it takes the period as the baseline.
- Plot the new points and apply the rules. The team reads each new point against the frozen median.
- Interpret the signal. A signal shows that something has changed. It does not show what. The team checks the date of the signal against the annotations: the change introduced, another modification of the process, a new way of counting. The reading takes judgement and knowledge of the context. Once the target is reached, Anhøj and Olesen recommend that the team calculate a new median from the points after the change or take the target as the new median.
The rules of Perla, Provost and Murray
Rules 1 to 3 look for patterns that chance alone produces with a probability below 5%. Rule 4 is a matter of judgement.
| Rule | Signal | How to count |
|---|---|---|
| 1. Shift | 6 or more consecutive points all above or all below the median | A point on the median is skipped. It does not count and does not break the run. |
| 2. Trend | 5 or more consecutive points all rising or all falling | Two equal values in a row count as one point. |
| 3. Runs | Fewer runs than the lower limit or more runs than the upper limit | The limits depend on the number of useful observations. |
| 4. Astronomical point | A point obviously different from all the others | The team judges. The highest value in a series is not astronomical for that reason alone. |
Too few runs means that the points stay on one side of the median for a long time. Most often the level has changed. Too many runs means that the points change side more often than chance does, for example when the series alternates the values of two teams.
| Useful observations | Lower limit | Upper limit |
|---|---|---|
| 12 | 3 | 11 |
| 20 | 6 | 16 |
| 23 | 7 | 17 |
| 30 | 11 | 21 |
The table in the article covers 10 to 60 useful observations. It rests on the tables of Swed and Eisenhart (1943). Rules 1 and 3 need more than ten points. With three or four points, no rule applies. The chart already shows the level and the direction.
The rules of Anhøj and Olesen
The published rule sets do not use the same thresholds. Anhøj notes that there is no general agreement on what makes a run unusually long. Anhøj and Olesen used simulation to measure the false-signal rate of several rules. They keep two. The thresholds of both grow with the number n of useful observations.
- Shift: signal if the longest run exceeds log2(n) + 3 rounded to the nearest integer. In a spreadsheet:
ROUND(LOG(n,2)+3,0). - Crossings: signal if the line crosses the median fewer times than the 5th percentile of a binomial distribution with parameters n − 1 and 0.5. In a spreadsheet:
BINOM.INV(n-1,0.5,0.05).
| Useful observations | Longest run without a signal (maximum) | Crossings without a signal (minimum) |
|---|---|---|
| 10 | 6 | 2 |
| 12 | 7 | 3 |
| 20 | 7 | 6 |
| 23 | 8 | 7 |
| 30 | 8 | 10 |
Perla's shift threshold of 6 points does not change with the length of the series. The more points the series has, the more likely a false signal becomes. The Anhøj and Olesen thresholds grow with n. Each rule keeps a false-signal rate close to 5% whatever the number of points. Together the two rules raise it a little. Anhøj and Olesen require at least 12 points before the team draws the median and recommend 20.
Their simulation also tests a trend rule. A drift of 0.3 standard deviations per point triggers it in about 20% of series of 100 points. The shift and crossings rules detect the same drift with near certainty from 20 points on.
In 2015 Anhøj compares the rules of Perla, his own rules and those of Carey on simulated series. He measures their diagnostic value by the positive likelihood ratio: how many times more likely a signal is with a real shift than without one. For a shift of two standard deviations, this ratio is 2 to 4 with Perla's rules and about 10 with Anhøj's or Carey's. Anhøj's example is the monthly count of hospital-acquired urinary tract infections in one hospital over a period without targeted action. Perla's rules find a shift and a trend in this series. Anhøj's and Carey's rules read it as random variation. Anhøj recommends choosing the rule set before data collection begins. The rules of Perla and those of Anhøj do not combine: each added test makes a false signal more likely.
The run chart and the control chart
| Run chart | Control chart | |
|---|---|---|
| Centre line | Median | Mean |
| Limits | None | Control limits calculated from the variation of the process |
| Question settled | Has the measurement changed? | Is the process stable? |
| Data required | About a dozen useful observations to apply the rules | A baseline to calculate the limits |
| Vocabulary of the signal | Random or non-random variation | Common cause or special cause |
Perla, Provost and Murray reserve the terms "common cause", "special cause", "stable" and "unstable" for the control chart. On one of their series, the run chart gives no signal. The Shewhart chart drawn on the same data detects special causes. Anhøj and Olesen advise drawing the run chart before the control chart: a signal can come from values that depend on one another. This dependence invalidates the control chart.
The simulations of Anhøj and Olesen also measure sensitivity. For a shift in level of up to two standard deviations, the shift and crossings rules react more often than a control chart that applies only the three-sigma rule. However, no counting rule reacts to an isolated point far from the others. Only the astronomical point rule can pick it up.
Test 4 of the control chart looks for eight successive values on the same side of the centre line. The shift rule looks for the same pattern around the median from six points. In the example of the defects found in acceptance testing, an individuals chart calculates its centre line and its limits from the thirteen baseline weeks. Its mean moving range is 2.5. The chart places its centre line at 15.08 defects and its limits at 8.43 and 21.73. No point crosses the limits. The shift rule fires in week 21 and test 4 in week 23.
The run chart and its neighbours
The histogram shows the distribution of the same values and loses their order. In exploratory data analysis, the NIST handbook describes the same plot without a median or rules under the name run-sequence plot. On this plot the analyst looks for a shift in level or in spread and for outliers.
Common mistakes
Reacting to the last point. A high value at the end of the series calls for an explanation, then for a correction. If the value gives no signal, the correction adds variation to the process instead of removing it.
Talking about a trend without a rule. A team announces that defects are rising after three points that rise. The trend rule needs five.
Recalculating the median at each point. The median then follows the data and erases the shift it was meant to show. The example of the defects in acceptance testing shows this: against the median of all 25 weeks, no run reaches six points.
Choosing the rules while reading the chart. A team that tries several rule sets ends up finding a signal. The team writes down the chosen set before the first value.
AI considerations
An assistant writes the R or Python script that draws the run chart and applies the chosen rule set in a few minutes. The analyst checks in the script that the median covers the baseline period only, that the points on the median are skipped and that the count of useful observations excludes them. A script written in a hurry calculates the median over the whole series.
A language model given a pasted column of values estimates the number of runs and crossings without computing it. It can be wrong without saying so. The analyst has the script print the side of each point, the runs and the crossings, then checks two or three counts on the chart.
Asked "is there a change?", a model may try several rules until one reacts, then declare the process "stable" in the vocabulary of the control chart. The analyst gives it the rule set fixed in advance and asks for one answer per rule.
The model suggests causes for the signal. It does not know the release calendar, the absence of a tester or the change in the way of counting. Its causes remain hypotheses for the team to check against the annotations on the chart.
Examples
The run chart in the example shows a shift below the frozen median after a change. A team records the defects found in acceptance testing every week. In week 14 it introduces a checklist for the requirements review. Weeks 1 to 13 form the baseline period. Their median is 15.
| Week | Defects | Side | Week | Defects | Side |
|---|---|---|---|---|---|
| 1 | 16 | + | 14 | 13 | − |
| 2 | 17 | + | 15 | 16 | + |
| 3 | 13 | − | 16 | 12 | − |
| 4 | 14 | − | 17 | 14 | − |
| 5 | 15 | on the median | 18 | 11 | − |
| 6 | 18 | + | 19 | 12 | − |
| 7 | 12 | − | 20 | 10 | − |
| 8 | 13 | − | 21 | 13 | − |
| 9 | 16 | + | 22 | 15 | on the median |
| 10 | 17 | + | 23 | 12 | − |
| 11 | 14 | − | 24 | 11 | − |
| 12 | 13 | − | 25 | 13 | − |
| 13 | 18 | + |
| Check | Perla, Provost and Murray | Anhøj and Olesen |
|---|---|---|
| Baseline period (12 useful observations) | 7 runs against limits of 3 to 11. Longest run: 2 points. No signal | 6 crossings against a minimum of 3. Longest run: 2 points against a maximum of 7. No signal |
| Shift (23 useful observations) | 9 points below the median from week 16 to week 25. The 6th falls in week 21. Signal | Longest run: 9 points against a maximum of 8. Signal |
| Trend | At most 4 points rising or falling (weeks 3 to 6 and weeks 7 to 10). No signal | No rule |
| Runs or crossings | 10 runs against limits of 7 to 17. No signal | 9 crossings against a minimum of 7. No signal |
| Astronomical point | Highest value: 18 (weeks 6 and 13). It stays within the spread of the others. No signal | No rule |
The mean falls from 15.08 defects before the checklist to 12.67 after it. These two figures do not show that the series stays below the median from week 16 on.
Visualisations
The run chart of the example and the patterns of the rules are drawings: the position of the points against the median carries the information. The rules, their thresholds, the comparison with the control chart, the data and how each rule set reads them are made of rows and columns. They are tables.
Cost
| Dimension | Level | Rationale |
|---|---|---|
| Preparation | Low | Define the measurement, the time unit and the rule set. Retrieve about a dozen baseline values from past records or start recording them. Without a history, weekly recording takes three months before the first reading. |
| Execution | Low | A spreadsheet draws the chart in a few minutes. |
| Documentation | Low | The annotated chart, the baseline median, the chosen rule set and the date of each signal. |
Tooling
Paper and a pencil are enough. On the team's wall, the chart gains one point a week.
A spreadsheet draws the run chart as a line chart. The baseline median is added as a second series that repeats the same value in every period. The MEDIAN function calculates it over the cells of the baseline period. The team counts the runs and the crossings from a column that records the side of each point.
Jacob Anhøj's R package qicharts2 draws the run chart and applies the Anhøj and Olesen rules. Minitab's run chart tests rest on p-values and look for clustering, mixtures, trends and oscillation. This set differs from those of Perla and Anhøj. Minitab counts a point on the median with the points below it. The rules of Perla and Anhøj skip it.
Sources
- Perla, Rocco J., Provost, Lloyd P., Murray, Sandy K., "The run chart: a simple analytical tool for learning from variation in healthcare processes", BMJ Quality & Safety, 2011, 20(1), pp. 46-51, doi:10.1136/bmjqs.2009.037895: the elements of the chart, the frozen median, the four rules, the table of runs and the limits of the technique against the control chart. The examples come from hospital care.
- Anhøj, Jacob, Olesen, Anne Vingaard, "Run Charts Revisited: A Simulation Study of Run Chart Rules for Detection of Non-Random Variation in Health Care Processes", PLOS ONE, 2014, 9(11): e113825: the shift and crossings rules, their thresholds, their false-signal rates and the comparison with the three-sigma rule.
- Anhøj, Jacob, "Diagnostic Value of Run Chart Analysis: Using Likelihood Ratios to Compare Run Chart Rules on Simulated Data Series", PLOS ONE, 2015, 10(3): e0121349: the comparison of three rule sets and the choice of the set before data collection.
- NIST/SEMATECH, e-Handbook of Statistical Methods, §1.3.3.25 "Run-Sequence Plot": the same plot in exploratory analysis to spot a shift in level or in spread and outliers.

