George Mason University
Process Improvement
 

 

XmR Charts (Shewhart's Control Chart)

 

Objectives

63 people have rated this page an average of 4.44 out of 5 stars.  See their suggestions and questions.  Rate this page.  

Lecture on XmR charts  Listen►
Create XmR chart  Video►  SWF►

Objectives
Introduction
Assumptions
Control limits
Construction of chart
Example
Analyze data
Presentations
Recently asked questions
More
Minute evaluation


 

Recently asked:  For question 3, when I use an Xbar analysis, much of the observed exercise times are way outside of the UCL (38.4) and LCL (26.6). Is this correct? Thank you.  See answer to this and other questions.

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.

 

Introduction

 

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. 

Assumptions

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.  The value of the correction factor is chosen so that 99% of the data fall within the control limits. 


 

 If the moving range is calculated from 2 consecutive time periods then the correction factor E is 2.66. Then the Upper Control Limit (UCL) can be calculated as:

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

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

LCL = Average of observations – 2.66 * 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

Example

       

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 + 2.66 * 2.67 = 204.52

LCL = 197.43  - 2.66 * 2.67 = 190.33

 

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.

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

.

Has the clinic improved over time?   Draw a control chart and report the control limits.   Please note that UCL higher than 100 is meaningless and should be reset to the maximum value of 100.  You can do this using the IF function.  For example, if B1 and B2 contain the average of observations and the average of the range of consecutive values, then the UCL can be calculated as =IF(B1+2.66*B2>100,100,B1+2.66*B2).  The IF function has three parts separated by commas.  The first part is a condition that should be met.  In this case the condition is B1+2.66*B2>100.  The second part is the value that is reported if the condition is true, in this case it is 100.  The third part is the value that is reported if the condition is not met.  In this case it is the calculated value for UCL, which is B1+2.66*B2.

 

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

 

What is the UCL?  What is LCL?  Any time periods out of control limits?   Draw the control chart and indicate your interpretation of the results.

 

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

 

What is the UCL and LCL?  Draw the control chart using XmR and Time Between Charts (assume a blood sugar level of 130 as being high for this individual).  Which control chart has a tighter control limit?  In monitoring this process, which of the two charts should be used to analyze the data?

 

Email your instructor and obtain his email.  Then send an email to him with your Excel file attached.  For full credit of your work, in the subject line include the course number and your name.  For example, subject line could be:  "Joe Smith from HAP 586 analysis of data using XmR chart"   Please submit one file containing answers to all questions.  Please note that all cell values must be calculated using a formula from the data.  Do not enter values in any calculated cells.  Calculate each cell from values of the data.  Put each chart in a separate worksheet within the same file.  Make sure that legend, the X-axis and the Y-axis are appropriately labeled.   Keep a copy of all assignments till end of semester.  Email

Presentations

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.

Frequently Asked Questions

 


Access code (available through your instructor):
 
Ask your question:

Enter your email:
 

Ask a question and we will answer it within the next 48 hours.  If you have no questions, please review the answer to the questions asked by others: 
 

Question: For question 3, when I use an Xbar analysis, much of the observed exercise times are way outside of the UCL (38.4) and LCL (26.6). Is this correct? Thank you.  Answer: I think you must be doing something wrong.   This question was asked on 4/21/2008 3:59:07 PM and answered on 4/21/2008 4:23:59 PM.

Question: What is the difference between the time between chart we did earlier this semester and the one we do with this assignment?  Answer: None, time between chart is a time between chart. You are asked to do additional examples of work you had done in the past so that you can see the difference among the charts.  This question was asked on 4/19/2008 11:01:03 AM and answered on 4/19/2008 12:51:38 PM.

Question: When creating a time between chart for question #3 which ratio should we compare the pre or the post intervention glucose level? And why?  Answer: You are always comparing the pre to post intervention data. You calculate the control limit from one period and extrapolate it for the other period.   This question was asked on 4/15/2008 8:07:20 PM and answered on 4/16/2008 12:00:41 AM.

Question: For question 1, which control chart would you like us to use, Time between or XmR? I think you want Time between but I'm not sure.   Answer: XmR chart or Tukey chart could analyze this data.   This question was asked on 4/14/2008 11:03:35 PM and answered on 4/15/2008 11:58:50 PM.

Question: What would be your recommendation for chart usage in personal project analysis - the XmR or Time Between?  Answer: Depends on the data you want to analyze. For missing plans, I would suggest time between charts.   This question was asked on 4/14/2008 9:45:04 PM and answered on 4/15/2008 11:57:46 PM.

Question: If you have become a member of a professional organization and participated in at least one session of their local meeting what are the next steps besides informing you of the event? There aren't any more special instructions that we should follow?  Answer: Send an email to Ms Jackson.   This question was asked on 4/14/2008 9:22:45 PM and answered on 4/15/2008 11:57:03 PM.

Question: Is the group assignment due tomorrow? If so I was wondering if my group, or maybe even the class could have more time to complete the project? Please??  Answer: Yes you can have an extension for a week.   This question was asked on 4/14/2008 9:18:01 PM and answered on 4/15/2008 11:56:34 PM.

Question: What "IF" formula do I use to convert a negative number to "0" for the LCL?  Answer: The IF formula is described in the problem statement.   This question was asked on 4/14/2008 4:48:38 PM and answered on 4/15/2008 11:53:59 PM.

Question: When taking the average in excel, how do you tell excel that you need the average of #/(n-1) instead of #/n?  Answer: First if you are taking the average of n-1 values, Excel does the correct adjustment if you just highlight n-1 cells. Otherwise you use sum function to calculate the top and divide in parentheses by count minus one.  This question was asked on 4/14/2008 4:38:22 AM and answered on 4/14/2008 7:10:03 AM.

Question: In the presentation on how to create an XmR chart in Excel, when taking averages for control limits, the averages were take from weeks 1-6 even though the pre-intervention period ranged from weeks 1-7. Was this a mistake?  Answer: The range is calculated over two weeks, this reduces the number of ranges to 6. The average range is calculated by examining the values for weeks 1-6 which reflect the values for weeks 1 through 7.   This question was asked on 4/14/2008 4:36:22 AM and answered on 4/14/2008 7:08:25 AM.

[1/5]

 

Suggestions

Add your own suggestions or read below suggestions made by others regarding how to improve this session.  Add

Suggestion: the lectures was very interesting and i think the chart about deciding which chart is most suitable for a data is very helpful and well explained  This comment was left on 4/22/2008 11:20:00 PM.

Suggestion: Lecture was excellent but would have appreciated more if the lecture included a side by side comparison of the control chart using XmR and Time Between Chart..thank you  This comment was left on 4/15/2008 11:47:07 PM.

Suggestion: I really enjoyed the videos and the step by step explanations. It was very clear and easy to understand.  This comment was left on 4/15/2008 9:39:30 PM.

Suggestion: The video for this lecture was excellent. It made the calculations much easier to understand. Thank you!  This comment was left on 4/15/2008 4:46:30 PM.

Suggestion: Once again, working step by step through the chart construction process in the lecture was very helpful in addition to including the necessary elements for a control chart.  This comment was left on 4/15/2008 10:00:19 AM.

Suggestion: this lecture difficult.Mybe because i did not attend the class  This comment was left on 4/15/2008 2:19:00 AM.

Suggestion: would be nice if there was a little bit more material in the video, maybe do one more problem.  This comment was left on 4/14/2008 9:39:21 PM.

Suggestion: I think this was easy to understand, however there is a discrepancy between the lecture and the online reading that may make a significant difference in answers.  This comment was left on 4/14/2008 4:41:15 AM.

Suggestion: The explanation of the XmR chart by using the RA as an example.  This comment was left on 4/12/2008 8:42:56 PM.

Suggestion: It was good to learn about a control chart to use when the data is only a single measure at a given time period. THe lecture could be improved bu including a side by side comparison with other control charts  This comment was left on 4/12/2008 9:41:19 AM.

[1/6]

More

  • Decide on Which chart is right?  More►
  • Construct a Moving Average chart  More►
  • For an application of XmR chart in diabetes care see Davidson, Mayer B.. Enhancing Diabetes Care Using Statistical Process Control Charts. Endocrinologist. 13(6):457, November/December 2003.  PubMed

  • Annotated bibliography of use of Shewhart's Control Chart (XmR charts)  PubMed
  • Iglewicz and Hoaglin write about how to detect and correct for outliers.  More►
  • Use of moving average chart in analysis of stock market.