Statistical Process Improvement
Georgetown University


XmR Charts (Shewhart's Control Chart)



X-bar and p-Charts require considerable data for each time period.  Sometimes, we have a single observation per time period.  In this section, we show you how to create a chart from single data items per time period.  One often runs into these types of data when monitoring an individual.  This section teaches the use of XmR (X stands for observation, and mR stands for moving range) charts.   

The objectives of this session are:

  • Understand the concepts behind moving average and moving range charts.
  • Understand when is it appropriate to use XmR charts.
  • Analyze data and set statistical limits using XmR charts.
  • Interpret output of XmR charts.




One of the most widely used control charts is the XmR chart, first developed by Schwartz.  This chart is particularly useful when there is only one observation in each time period.  The purpose of constructing any control chart, including XmR chart, is to see if the variation is due to chance or to changes in the process.  Every process exhibits some variation in outcomes of care.  Controlled variation is stable and consistent over time. This variation is due to chance or inherent features of the process of care.  Uncontrolled variation are points outside the limits and these observations cannot be due to chance. They represents a change in the process of care that is affecting outcomes.


Control charts are also used to visually tell a story. Any control chart, including XmR chart, has a set of common elements: 

  • X-axis shows time periods
  • Y-axis shows the observed values
  • UCL line shows the Upper Control limit
  • LCL line shows the lower control limit
  • 95% or 99% of data should fall within UCL and LCL. 
  • Values outside the control limits mark statistically significant changes and may indicate a change in the underlying process

This section describes how an XmR control chart can be organized. 


Figure 1:  XmR chart is best when there are single observations per time 
period & outcomes are measured on an interval scale

We start with a list of assumptions behind construction of an XmR chart:       

  1. There is one observation per time period.
  2. Patients’ case mix or risk factors do not change over the time periods. Since these charts often monitor the same patient over time, there is little need to measure severity of the patient as this is unlikely to change in short time periods.  If data comes from different patients at different time periods, it is important to verify that these patients have similar prognosis or severity of illness on admission.
  3. Observations are measured in an “interval” scale, i.e. the observation values can be meaningfully added or divided.
  4. Observations are independent of each other, meaning that knowledge of one observation does not tell much about what the next value will be.  Outcomes of infectious diseases are usually not considered independent as knowing that at time period "t' we have an infectious disease, increases the probability of infection for time period "t+1."

All of the above assumptions must be met before the use of XmR charts make sense.  Please note that XmR charts do not assume that the observed values have a Normal distribution.  While observations may come from non-Normal distributions, differences in consecutive values have a near Normal distribution. 

Control Limits

If there is an intervention, we need to decide if the control limits should be calculated from the pre-intervention or post-intervention period.  Select the period with the least variability and that will produce the tightest control limit.  The variability within pre- and post intervention period can be examined visually or by calculating the difference between maximum and minimum value in each time period.  Calculate the control limit from the pre-intervention period if it has the smaller difference.  Otherwise, calculate the control limits from the post intervention period.  Control limits are calculated from one time period and extended to the other so that we can judge if the post and pre-intervention periods differ.  Control limits in XmR chart are calculated from moving range (mR).  A range is based on the absolute value of consecutive differences in observations. The first step in calculating control limits is to estimate the average of the moving range.       

  • Count the number of time periods, n.
  • Calculate the absolute value of the difference of every consecutive value, call this moving range.
  • Add the moving ranges and divide by "n" minus one to get the average moving range.

Upper control limit is average of the observations plus a constant E times the average moving range.  The constant E depends on how many consecutive observations are included in the moving range.  When 2 consecutive observations are examined, the constant is 2.66 for control limits that include 99% of the data.  If the moving range is calculated from 2 consecutive time periods then the correction factor E for control limits that include 95% of the data is 1.88. Then the Upper Control Limit (UCL) can be calculated as:

UCL = Average of observations + 1.88 * Average of moving range

Similarly, lower control limit is average of observation minus 1.88 times the average range.  The Lower Control Limit (LCL) is calculated as:

LCL = Average of observations – 1.88 * Average of moving range

Construction of the Chart

Once the control limits have been calculated, you can construct the control chart.  First you plot the x- and y-axis, put time on the x-axis and the observations on the y-axis.  Plot the observed values for each time period.  Plot the control limits over the entire time period (it is desirable to show the calculated control limit as a solid line and the extended portion as a dashed line).  Points within control limits are controlled variations   These points do not show real changes, even though data seem to rise and fall.  These are merely random variation that has traditionally existed in the process.  Points outside the limits show real changes in the process.  If a point falls outside the limits, we need to investigate what change in the process might have led to it.  In other words, we need to search for a "special cause" that would explain the change.  Once a control chart has been constructed, they are useful as a way of telling an improvement story.  Distribute the chart by electronic media, as part of company newsletter, or display it as an element of a storyboard.  When you distribute a chart, show that you have verified assumptions, check that your chart is accurately labeled, and include your interpretation of the finding.



Let’s look at a diabetic patient’s weight.  His clinician asked him to weigh himself weekly and to bring the data to their follow-up visit.  The patient attempted to lose weight by changing the food shopped for the household.  He started the intervention in week 8, so the first 7 weeks show the data prior to the intervention and the remainder show the data post the intervention.  The data in the following Table show Jim's weight over time:


Time period Weight in Pounds
1 199
2 201
3 197
4 197
5 200
6 195
7 193
8 198
9 196
10 196
11 193
12 190
13 194
14 189
15 185
16 188
Table 1:  Patient's Weight over Time


The question is whether the patient's new shopping patterns has affected his weight. First we check that all of the assumption of XmR chart are reasonable in this setting.  There is one observation per time period; the same patient is monitored so the patients' severity of illness is unlikely to have changed; weight is measured on an “interval” scale, and there is no reason to expect that the observations are dependent on each other..  Therefore, all assumptions seem reasonably met.


Second, we need to make a decision whether to calculate the control limit from either pre-intervention or post intervention data.  To make this decision, we need to select a time period with least variability.  The range of data (the maximum value minus the minimum value) in the pre-intervention period is 8 Lbs. The range for the post intervention period is 13 Lbs.  The pre-intervention period has the lower variability and therefore control limits calculated from this period will be tighter.   Therefore, we select to calculate the control limits from the pre-intervention period. 


Third, we calculate the average range between any two consecutive values.  This is done by calculating the absolute value of the difference of any two consecutive number and then taking the average of these differences: 


Time period Weight in Pounds Range of 2 consecutive values
1 199 Not available
2 201 2
3 197 4
4 197 0
5 200 3
6 195 5
7 193 2
8 198 Not relevant to control limits from pre-intervention period
9 196
10 196
11 193
12 190
13 194
14 189
15 185
16 188
Average 197.43 2.67
Table 2:  Calculating Average Range


Fourth, using the averages, we calculate the Upper (UCL) and Lower (LCL) control limits. 


UCL = 197.43 + 1.88 * 2.67 = 202

LCL = 197.43  - 1.88 * 2.67 = 192


Fifth, we plot the chart for the entire 16 weeks (Figure 2). 


Figure 2:  Control Limits Are Based on First 7 Weeks


Sixth, we interpret the findings.  During the first 7 weeks, no points are outside the control limit.  After this period, when food shopping patterns were changed, we see 4 points outside the limit.  These points mark a departure from the pattern in the first 7 weeks.  They show that the patient's weight has declined.  This decline is not a random fluctuation but marks a real change in the process.  

Analyze Data

Advanced learners like you, often need different ways of understanding a topic. Reading is just one way of understanding. Another way is through doing and practicing the concepts learned in this section.  The following is designed to get you to think more about the concepts taught in this session.

Question 1. The following data were collected regarding satisfaction with a clinic's service over time (0 means unacceptable care and 100 best possible care). 
Time period 1 2 3 4 5 6 7 8
Observation 90 85 92 67 98 83 94 90


1a: Draw a control chart and report the control limits.  

First estimate the control limits.  Calculate the average across the time periods.  Use E of 1.88 to estimate UCL and LCL.  Here is my calculations for the UCL and LCL and the related formulas:



In creating the control chart, make sure that the axis are labeled, there are no markers on the UCL and LCL and that both lines are red.  Re-size the Y axis to start from a minimum of 50. Make sure there is a legend.


1b: Has the clinic improved or gotten worse over these 8 time periods?  


Real change (improvements or worsening) occurs only if the observations are outside the control limit.  In this case, with only 8 observation, the control limits are wide apart and no points fall outside the limit. 


Question 2. Analyze the following data regarding a patient's therapy time using XmR chart.  


Day Minutes of exercise   Day Minutes of exercise
1 25   8 40
2 30   9 15
3 32   10 28
4 0   11 0
5 15   12 60
6 17   13 20
7 15   14 24


2a. What is the UCL? 

2b. What is LCL? 

2c. Any time periods out of control limits?  

2d. Draw the control chart and indicate your interpretation of the results.


Question 3.  Steve, a diabetes patient, decided to change his shopping patterns and cut out certain food items.  The following data reports his blood sugar levels before and after the change.  Has he improved?


Before change in shopping patterns   After change in shopping patterns
Day Glucose level   Day Glucose level
1 117   11 115
2 101   12 143
3 90   13 156
4 98   14 142
5 133   15 152
6 109   16 147
7 107   17 155
8 216   18 158
9 128   19 151
10 132   20 125
    21 120
    22 130
    23 150
    24 155
    25 163
    26 131
    27 113
    28 131


3a. What is the UCL and LCL? 

3b. Draw the control chart using XmR and Time Between Charts (assume a blood sugar level of 130 as being high for this individual). 

3c. Which control chart has a tighter control limit? 

3d. In monitoring this process, which of the two charts should be used to analyze the data?


There are sets of presentations for this lecture:

  1. Lecture on XmR charts  Slides► Listen►

  2. Use Excel to create an XmR chart  Excel 2003►  Video SWF►

  3. Introduction to Control Chart  Slides Listen

  4. How to plot a control chart  Slides  Listen 

  5. Learn Excel  More

Narrated slides and video require use of Flash.


  • Decide on Which chart is right?  More►
  • Construct a Moving Average chart  More►
  • Annotated bibliography of use of Shewhart's Control Chart (XmR charts)  PubMed
  • Use of moving average chart in analysis of stock market.  More
  • There is growing interest in effective use of patient diaries.  Unfortunately, few clinicians analyze patient diaries to see if there has been a statistical change in patients' compliance or health outcomes.  For an example of how this can be done see control charts for diet and exercise.  More   PubMed 
  • Berwick writes about the source of variability in health care outcomes  PubMed

This page was first prepared on January 1990 and last revised on 01/15/2017.  This page is part of the course on Quality/Process Improvement.   Main Page