Home / Statistical Tools / Control Charts / EWMA / EWMA How-To
EWMA How-To¶
This walkthrough builds a complete EWMA chart from thirty hourly readings. Two things about this chart are unlike any Shewhart chart, and the data is chosen so that both are visible at once: the control limits widen from left to right, and the chart marks a change that an I-MR chart of the same readings does not mark at all.
The data is on this page rather than in a file to download. Press Copy for Excel, then paste it into a blank worksheet.
The data¶
Thirty consecutive hours from a plating bath, one concentration reading per hour, in grams per litre. From reading 23 onward the level runs higher and stays there.
| Concentration |
|---|
| 97.63 |
| 99.07 |
| 99.46 |
| 100.60 |
| 102.23 |
| 99.54 |
| 100.03 |
| 99.12 |
| 97.89 |
| 99.53 |
| 102.93 |
| 100.36 |
| 100.80 |
| 99.11 |
| 100.26 |
| 100.11 |
| 99.52 |
| 99.41 |
| 99.84 |
| 99.68 |
| 100.73 |
| 100.16 |
| 102.30 |
| 103.41 |
| 101.48 |
| 101.29 |
| 101.73 |
| 103.39 |
| 102.36 |
| 101.41 |
Reading down the column, no single value looks wrong: 102.93 appears at hour 11 while the bath is behaving normally, and the later readings are not obviously larger than that. The change is in the level, not in any one reading.
Steps¶
-
Put the data in Excel
Press Copy for Excel above the table. In Excel, open a blank worksheet, click cell A1, and press Ctrl+V. The header lands in A1 and the thirty readings in A2:A31.
-
Start the chart
From the Excel ribbon: QXL Stat Tools Tab > Control Charts > Time Weighted Charts > EWMA.
-
Give it the cells
In the Data Selection window set Selected Range: to A1:A31. Leave Data in Columns selected and First Row/Column is Header checked. Press Next >.
-
Check the measurement column and leave the subgroup size at 1
The EWMA Chart dialog opens on the Data tab. Check Concentration. Leave the Subgroups group on Constant size: with
n = 1, which is one reading per point.With
n = 1the sigma estimators offered change to the individuals set: Average moving range (selected when the dialog opens), Median moving range, and Square root of MSSD. Leave the default. -
Leave the EWMA weight at its default
On the Limits and Estimation tab the EWMA Weight group holds EWMA weight (λ):, default 0.2. This group exists on no other chart. Leave it for now; the last section suggests changing it.
-
Finish
Press Finish. The chart is written to a new worksheet named EWMA and the Control Chart analysis pane opens on the right.
What you should see¶
One panel of thirty points. The plotted line is much smoother than your data, because each point is a weighted average of the readings before it, and the control limits are not two straight lines.
The center line is at 100.51, the grand mean of all thirty readings.
The limits open out from the center line and then flatten. This funnel identifies an EWMA chart at a glance:
| Plotted point | Lower limit | Upper limit | Half width |
|---|---|---|---|
| 1 | 99.90 | 101.12 | 0.61 |
| 2 | 99.73 | 101.30 | 0.78 |
| 3 | 99.64 | 101.39 | 0.88 |
| 5 | 99.55 | 101.48 | 0.96 |
| 10 | 99.50 | 101.53 | 1.01 |
| 20 onward | 99.49 | 101.53 | 1.02 |
The estimated within-subgroup standard deviation is 1.02, from an average moving range of 1.15. Compare that against the half widths and the rule is exact: at the default weight the first point's limits sit at 0.6 of that standard deviation and the band settles at 1.0 of it, arriving within one percent of its final width by about the tenth point. The funnel is not a drawing quirk. An early point really is a smoothed average of very little data, so its band is genuinely narrower.
Three points are out of control: 28, 29 and 30. Point 28 is the first, plotting at 101.71 against an upper limit of 101.53.
The same readings do not signal on an I-MR chart
Run an I-MR chart on this identical column and not one point is marked, on either panel, with all eight tests on. Not the point-beyond-limits test, and not the run and zone tests either.
The EWMA marks it because each plotted point carries the readings before it, so a run of slightly-high values accumulates into a plotted point that is clearly high even though no single reading was. The cost is that the chart reports late: the level moved at reading 23 and the chart says so at reading 28.
Only one test runs on this chart
EWMA offers Rule 1 and nothing else. The other rows on the Rules tab are greyed out and permanently off, because the run and zone tests are defined against a fixed band and this band changes at every point. See Out-of-Control tests.
There are also no manual limits on this chart, for the same reason: the Manual radio and the limits grid are absent entirely.
Things to try next¶
- Change the weight and watch both things change. Set EWMA weight (λ): to 0.4 and run again. The plotted line follows your data more closely, the band settles at a larger final width, and the signal arrives sooner. Set it to 0.05 and the opposite happens on all three counts. The weight is the one setting that redraws the series and the band together.
- Set it to 1. At λ = 1 the smoothing does nothing at all: each plotted point is its own reading and the funnel disappears.
- Estimate the limits from the settled stretch. Set Estimate Limits From to the first 20 points. The center line and the sigma are then built from before the change rather than from all thirty readings, so the center line drops and the later points sit further outside.
- Split at the change. Add a split at point 23. Each phase is re-seeded, so the band narrows to the center line and opens out again: a split EWMA chart shows one funnel per phase.