EWMA Charts
EWMA Charts
EWMA Charts
com
Chapter 249
Exponentially Weighted
Moving Average (EWMA)
Charts
Introduction
This procedure generates exponentially weighted moving average (EWMA) control charts for variables. Charts
for the mean and for the variability can be produced. The format of the control charts is fully customizable. The
data for the subgroups can be in a single column or in multiple columns. This procedure permits the defining of
stages. The target value can be entered directly or estimated from the data, or a sub-set of the data. Sigma may be
estimated from the data or a standard sigma value may be entered. Means and ranges/standard deviations can be
stored to the spreadsheet.
249-1
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
∑x
j =1
ij
xi =
n
The points of the chart are obtained from the xi ’s by the following exponential smoothing operation
zi = λ xi + (1 − λ )zi −1
The value of z0 is set to the target mean. The value of λ is specified by the user.
Values for the points of the EWMA variation chart are given by substituting xi with the range or standard
deviation.
∑∑ x
i =1 j =1
ij
x= k
.
∑n
i =1
i
If the subgroups are of equal size, the above equation for the grand mean reduces to
k
∑x i
x1 + x 2 + + x k
x= i =1
= .
k k
249-2
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
∑R
i =1
i
R =
k
E (R ) µR
d2 = =
σ σ
The calculation of E(R) requires the knowledge of the underlying distribution of the xij’s. Making the assumption
that the xij’s follow the normal distribution with constant mean and variance, the values for d2 are derived through
the use of numerical integration. It is important to note that the normality assumption is used and that the accuracy
of this estimate requires that this assumption be valid.
When n is one, we cannot calculate Ri since it requires at least two measurements. The procedure in this case is to
use the ranges of successive pairs of observations. Hence, the range of the first and second observation is
computed, the range of the second and third is computed, and so on. The average of these approximate ranges is
used to estimate σ.
∑s
i =1
i
s =
k
E (s ) µs
c4 = =
σ σ
The calculation of E(s) requires the knowledge of the underlying distribution of the xij’s. Making the assumption
that the xij’s follow the normal distribution with constant mean and variance, the values for c4 are obtained from
n
Γ
2 2
c4 =
n − 1 n − 1
Γ
2
249-3
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
σˆ λ
LCLi = µ 0 − m [
1 − (1 − λ )
2i
]
n 2−λ
UCLi = µ 0 + m
σˆ λ
[
1 − (1 − λ )
2i
]
n 2−λ
where m is a multiplier (often set to 2.7 or 3), and λ is the exponential smoothing constant.
Note that the values of limits change with each successive subgroup, but tend to level off at around the tenth
subgroup.
Values for the limits of the EWMA variation chart are given by substituting µ0 with the range or standard
deviation center line value (such as R-bar or s-bar).
249-4
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
Data Structure
In this procedure, the data may be in either of two formats. The first data structure option is to have the data in
several columns, with one subgroup per row.
Example dataset
S1 S2 S3 S4 S5
2 6 3 8 5
8 8 7 7 9
6 2 2 4 3
5 6 7 6 10
48 2 6 5 0
. . . . .
. . . . .
. . . . .
The second data structure option uses one column for the response data, and either a subgroup size or a second
column defining the subgroups.
In the alternative example dataset, the Subgroup column is not needed if every subgroup is of size 5 and the user
specifies 5 as the subgroup size. If there are missing values, the Subgroup column should be used, or the structure
of the first example dataset.
249-5
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
Procedure Options
This section describes the options available in this procedure. To find out more about using a procedure, go to the
Procedures chapter.
Variables Tab
This panel specifies the variables that will be used in the analysis.
Input Type
Specify whether the data is in a single response column or in multiple columns with one subgroup per row.
249-6
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
Subgroup ID Variable
Specify the column containing the subgroup identifiers.
Response ID Variable
5 1
6 1
4 1
3 2
7 2
6 2
4 3
5 3
8 3
. .
. .
. .
A new subgroup is created for each change in the Subgroup ID Variable, going down.
Subgroup Size
Specify the number of individuals in each subgroup.
Response
5
6
4
3
7
6
4
5
8
.
.
.
If the subgroup size is 3, then subgroups are formed by going down the response column in groups of 3. The first
subgroup would be 5, 6, 4; the second would be 3, 7, 6; and so on.
X1 X2 X3
5 6 4
3 7 6
4 5 8
. . .
. . .
. . .
249-7
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
If only one variable is specified, NCSS automatically generates an individuals chart with a moving-range of size
2.
Stages
Number of Stages
Specify whether the analyses and charts are to be produced based on a single set of subgroups, or a series of sets
of subgroups. Typically a single stage is used unless you wish to have separate estimation for various segments of
the subgroups. When using multiple stages, the software requires that there be at least one subgroup in every stage
specified.
Stage Specification
Specify whether the various stages will be defined using a variable (column) with a unique value for each stage,
or by entering a range of rows for each stage.
• Stage Variable
X1 X2 X3 Stage
5 6 4 1
3 7 6 1
4 5 7 1
6 5 4 1
3 7 6 1
5 8 3 2
2 6 4 2
3 6 5 2
4 5 8 2
. . . .
. . . .
. . . .
X1 X2 X3 Stage Variable
5 6 4 1
3 7 6 1
4 5 7 1
6 5 4 1
3 7 6 1
5 8 3 2
2 6 4 2
3 6 5 2
4 5 8 2
. . . .
. . . .
. . . .
A new stage is created for each change in the Stage Variable, going down.
249-8
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
Stage Ranges
Enter a range for each stage using a dash. Separate each stage with a comma.
This would produce three stages. The first stage would be made up of rows 1 to 50, the second stage would be
rows 51 to 100, and the third stage would be rows 101 to 150.
• All Rows
All rows in the response column(s) will be used.
249-9
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
• All Rows
All rows in the response column(s) will be used.
249-10
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
Labels (Optional)
Subgroup Label Variable
Specify a variable (column) that contains the desired x axis (subgroup) labels for plots. If left blank, the plot will
use the subgroup number. The format of the labels is controlled on the x axis tab of the plot format window.
Point Label Variable
Specify a variable (column) that contains the desired individual point labels for plots. If left blank, no point labels
are shown. The format of the labels is controlled on the main chart tab of the plot format window.
Limit Multipliers
Primary Limit Multiplier
This option specifies the multiplier of sigma for the primary control limits. For the well-known 3-sigma limits, the
multiplier is set to 3.
Specification Limits
Lower Limit
Enter an optional lower specification limit for display on the chart. These limits are not the control limits.
249-11
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
Upper Limit
Enter an optional upper specification limit for display on the chart. These limits are not the control limits.
Spec Value
Enter an optional specification value for display on the chart.
• Range
The average range will be used to estimate sigma.
• SD
The average standard deviation will be used to estimate sigma.
Sigma Specification
Specify the method by which Sigma will be estimated for use in the charts.
249-12
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
Reports Tab
The following options control the format of the reports.
Specify Reports
Target Value and Sigma Summary Section
This report gives the numeric values of the target value and sigma, as well as the sigma estimation.
Report Options
Precision
Specify the precision of numbers in the report. A single-precision number will show seven-place accuracy, while
a double-precision number will show thirteen-place accuracy. Note that the reports are formatted for single
precision. If you select double precision, some numbers may run into others. Also note that all calculations are
performed in double precision regardless of which option you select here. This is for reporting purposes only.
Variable Names
This option lets you select whether to display variable names, variable labels, or both.
Page Title
This option specifies a title to appear at the top of each page.
Plot Subtitle
This option specifies a subtitle to appear at the top of each plot.
Select Plots
EWMA Chart, EWMA Variability Chart
These charts are controlled by three form objects:
1. A checkbox to indicate whether the chart is displayed.
2. A format button used to call up the plot format window (see Quality Control Chart Format Options
below for more formatting details).
3. A second checkbox used to indicate whether the chart can be edited during the run.
EWMA Parameter
This specifies the value of the smoothing parameter (λ) in the EWMA charts. The range for this parameter is 0 to
1 (not including 0). Typically, a value between 0.05 and 0.25 works well in practice. Popular choices include
0.05, 0.10, and 0.20.
249-13
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
Storage Tab
The options on this panel control the automatic storage of the means on the current dataset.
Storage Columns
Store Means or Ranges/SDs in Column
You can automatically store the means, ranges, or standard deviations of each subgroup into the column specified
here. Whether the range or standard deviation is stored depends on the choice of Range or SD Estimation on the
Target & Sigma tab.
Warning: Any data already in this column is replaced. Be careful not to specify columns that contain important
data.
249-14
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
Symbols Section
You can modify the attributes of the symbols using the options in this section.
A wide variety of sizes, shapes, and colors are available for the symbols. The symbols for in-control and out-of-
control points are specified independently. There are additional options to label out-of-control points. The label
for points outside the primary control limits is the subgroup number. The label for points that are out-of-control
based on the runs test is the number of the first runs test that is signaled by this point.
The user may also specify a column of point labels on the procedure variables tab, to be used to label all or some
of the points of the chart. The raw data may also be shown, based on customizable raw data symbols.
Lines Section
You can specify the format of the various lines using the options in this section. Note that when shading is
desired, the fill will be to the bottom for single lines (such as the mean line), and between the lines for pairs of
lines (such as primary limits).
Lines for the zones, secondary limits, and specification limits are also specified here.
249-15
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
Titles, Legend, Numeric Axis, Group Axis, Grid Lines, and Background
Tabs
Details on setting the options in these tabs are given in the Graphics Components chapter. The legend does not
show by default, but can easily be included by going t1o the Legend tab and clicking the Show Legend checkbox.
This section displays the target value that is used in the EWMA chart.
Target Value Specification
This is the method by which the target value is obtained.
249-16
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
Target Value
This is value of the target value used to create the moving average chart.
Sigma User-Specified
Specification Sigma Value
User-Specified 8
This section shows the specification of the standard deviation used in the EWMA chart.
Sigma Specification
This is the method by which the sigma value is obtained.
User-Specified Sigma Value
This is value of the sigma entered by the user, and is the value used to create the moving average chart.
EWMA Chart
This EWMA plot shows the progress of the weighted moving averages across the 50 subgroups. There does not
appear to be an indication of a change in the process mean.
249-17
© NCSS, LLC. All Rights Reserved.
NCSS Statistical Software NCSS.com
Exponentially Weighted Moving Average (EWMA) Charts
EWMA Chart
As shown here, a variety of enhancements can be made to the formatting of the control charts to make the chart as
easy to read as possible.
249-18
© NCSS, LLC. All Rights Reserved.