Sub topic 12
Setting Baseline Limits and Monitoring Going Forward
This chapter assumes you can compute the four charts from earlier in the tutorial (I-MR, X-bar and R, p, and u). It assumes you know the signal rules, and that you are comfortable reading short NumPy code. Here the question is which data you use to set the limits, when you stop changing them, and how you judge new points against them.
Two phases of chart use
Control charts are used in two phases.
- Phase I (baseline). You collect historical data and ask whether the process was stable. You find and explain special causes. You end with trial limits that describe the process when only common-cause variation is present.
- Phase II (monitoring). You keep those limits fixed and plot each new point against them. A signal means the process may have changed.
The two phases answer different questions.
| Aspect | Phase I: baseline | Phase II: monitoring |
|---|---|---|
| Question | Was the process stable? What are its natural limits? | Is the process still behaving like the baseline? |
| Limits | Calculated from the data, then revised | Frozen from the baseline |
| Signals lead to | Investigating the history and removing explained points | Action on the live process |
| Typical data | 20 to 30 points or subgroups | Ongoing |
Most charting mistakes come from mixing the two. A common one is recalculating limits from every new point, which turns Phase II into a never-ending Phase I.
Building the baseline
How much data
The limits are estimates, and an estimate from few points is noisy.
- For X-bar and R charts, aim for at least 20 to 25 subgroups. Subgroups of 4 or 5 are typical.
- For I-MR charts, aim for 20 to 30 individual values. Each moving range uses only two values, so the average moving range is a weak estimate on small samples.
- For p and u charts, use enough periods that the average rate is stable. Aim for 20 or more periods, and for p charts an expected count of defectives per period of about 5 or more.
With fewer points you can still draw a chart. Label the limits as trial limits and expect them to move.
What the baseline must contain
The baseline should be representative. It should span the normal sources of variation you want the limits to cover, such as different operators, shifts, material lots, and days. If the baseline covers only one calm Tuesday morning, the limits will be too narrow. Later routine variation will then trigger false alarms.
Keep the data in time order. Time order is how you spot trends and shifts, and it is how you later link a signal to an event.
Cleaning the baseline
Trial limits are computed from all the baseline data. Points outside them are investigated.
- If you find an assignable cause (a bad lot, a mis-set machine, a data entry error), exclude that point or subgroup and recompute.
- After recomputing, new points may fall outside the tighter limits. Repeat the investigation.
- If you cannot find a cause, keep the point. A signal with no explanation is not grounds for deletion.
Removing points because they are inconvenient makes the limits too narrow. The chart then fires false alarms during monitoring.
The following code sketches this loop for an I-MR chart. It is mechanical, so in practice a human decides at each round whether a cause was found. The code drops every flagged point in each round. Because the moving ranges are computed on the points that remain, a range that spans a removed point is slightly artificial. This is acceptable for trial limits.
import numpy as np
def imr_limits(x):
"""Center line and 3-sigma limits for individuals, from the average moving range."""
x = np.asarray(x, dtype=float)
mr_bar = np.abs(np.diff(x)).mean()
center = x.mean()
return center - 2.66 * mr_bar, center, center + 2.66 * mr_bar
def baseline_limits(x, max_rounds=5):
"""Iteratively drop points outside the limits. Assumes each one has an assignable cause."""
x = np.asarray(x, dtype=float)
kept = np.ones(len(x), dtype=bool)
for _ in range(max_rounds):
lcl, cl, ucl = imr_limits(x[kept])
out = kept & ((x > ucl) | (x < lcl))
if not out.any():
break
kept &= ~out
return lcl, cl, ucl, kept
baseline = [10.1, 9.9, 10.0, 10.2, 9.8, 10.1, 10.0, 11.6,
9.9, 10.1, 10.2, 9.9, 10.0, 10.1, 9.8, 10.0]
lcl, cl, ucl, kept = baseline_limits(baseline)
print("removed baseline indexes:", np.where(~kept)[0].tolist())
print("frozen limits:", round(lcl, 2), round(cl, 2), round(ucl, 2))
# Phase II: the limits are now constants. Do not recompute them from new data.
new_data = np.array([10.0, 10.1, 9.9, 10.2, 10.7, 10.6, 10.8])
flagged = np.where((new_data > ucl) | (new_data < lcl))[0].tolist()
print("new points beyond limits:", flagged)With this data, the 11.6 at index 7 falls outside the first-round limits (about 9.06 to 11.15). It is removed, and the second-round limits come out near 9.49, 10.01, and 10.52. The last three new points exceed the upper limit, so the output ends with new points beyond limits: [4, 5, 6].
Freezing limits and monitoring
Once the baseline is accepted, write down the numbers and stop recalculating them. What you freeze depends on the chart.
| Chart | Freeze these values | Computed fresh for each new point |
|---|---|---|
| I-MR | Mean of X, average moving range (so both limit sets) | Nothing |
| X-bar and R | Grand mean, average range | Nothing, if subgroup size stays at n |
| p | Average proportion, p-bar | Limits, from p-bar and that period's n |
| u | Average defects per unit, u-bar | Limits, from u-bar and that period's n |
The p and u rows look like an exception, but they are not. The center line stays frozen. The limit width depends on the sample size of the period, so it moves with n while the underlying parameter stays fixed.
import numpy as np
p_bar_baseline = 0.052 # frozen from the baseline period
def p_chart_point(defectives, n, p_bar=p_bar_baseline):
"""Return the proportion and its limits for one new period, with p_bar fixed."""
sigma = np.sqrt(p_bar * (1 - p_bar) / n)
return defectives / n, max(0.0, p_bar - 3 * sigma), p_bar + 3 * sigma
print(p_chart_point(defectives=9, n=100))For X-bar and R charts, if the subgroup size changes, you must switch to the constants for the new n. The frozen grand mean and average range stay valid only if you adjust for the new n correctly. Changing n often is a sign that the data collection plan needs fixing.
When to revise limits
Limits are not permanent, but they should change only for a reason you can state.
| Trigger | Action |
|---|---|
| Deliberate, verified improvement (new tooling, new method) | Collect a new baseline after the change and compute new limits. Keep the old limits in the record. |
| New material, machine, or measurement system | Treat it as a new process and re-baseline. |
| Baseline was too short or had too few points | Recompute when more stable data accumulate. |
| A signal you have not explained | Do not revise. Investigate. |
| The chart "looks too noisy" or "has too many alarms" | Do not revise. Check whether the process is unstable or the baseline was unrepresentative. |
A calendar review is a fair practice, for example a quarterly check of whether the frozen limits still match the stable process. The review should compare recent in-control data with the baseline. It is not an automatic recomputation.
Edge cases and judgment calls
An unstable baseline you cannot fix. Sometimes the history is full of signals and no causes can be found. The limits you compute then describe a process that mixes several states, so they will be wide and unreliable. The honest outcome is to say that no stable baseline exists yet. Use the chart in the meantime to find causes, and set limits only after the process has been stabilized.
Limits that chase the data. If you recompute with every new point, a slow drift moves the center line and limits along with it. The points then never leave the limits, and the chart never signals. Frozen limits are what let a chart detect drift.
A stable chart is not a capable process. A baseline can show no special causes while the process still produces output outside specification limits. Stability and capability are separate questions. Check stability first, then compare the natural spread to the specifications.
After an improvement, the old limits will signal. If you reduce variation, points will cluster near the center line, and long runs inside the inner zone appear. This is a good signal. Re-baseline so the narrower limits can catch future deterioration.
Seasonality and known cycles. If the process varies by shift or day of week, the baseline must include enough cycles to cover this. Otherwise the cyclical pattern shows up as special causes in monitoring. Consider charting each shift separately.
Reacting to a single point. A point beyond 3-sigma limits in a stable process occurs by chance about 0.27% of the time. This means about 1 in 370 points. A single signal in a long series is worth investigating, but not worth dismantling the process over until evidence supports it.
Undocumented limits. Write down the baseline dates, the number of points, which points were excluded and why, and the frozen values. Without this, nobody can later tell whether a limit change was justified.
Exercise
A team plots a p chart weekly. Each week they recompute p-bar from all data collected so far, including the newest week, and redraw the limits. Over six months, defect rates creep upward, but no point ever signals. Explain why, and say what they should do instead.
Show answer
Recomputing p-bar from all data so far lets the center line follow the drift upward, and the limits move with it. Each new point is compared with limits that already include recent worse data, so it looks normal. They should compute p-bar from a stable baseline period, freeze it, and compute each week's limits from that frozen p-bar and that week's sample size. They should recompute only after a deliberate, documented process change, with a new baseline.
Exercise
You build an I-MR baseline from 25 points. The first-round limits flag two points. You find a documented tooling fault for one of them, but nothing for the other. Which points do you drop before computing the frozen limits, and what do you do after recomputing?
Show answer
Drop only the point with the documented tooling fault. Keep the unexplained point, and note it in the baseline record. Recompute the limits from the remaining 24 points. Then check again whether any points exceed the new limits or form run signals, and investigate each one the same way. Freeze the limits when no signals remain except the ones you decided to keep, and monitor new data against them.