Have you ever had to prepare an Average and Range Chart?
If so, you most likely used some type of software package to display your data and compute the necessary control limits for your Xbar and R chart. But, have you ever wondered how these control limits for an Xbar and R chart were computed?
For those of you that had to perform the calculations by hand, chances are you applied Xbar and R chart formulas using various control chart constants. I know I did! I recall looking up values for A2 and D4 without any idea where they came from.
The truth is; computing control limits isn’t that complicated. And, while the control chart constants used to compute control limits appears to be a mystery, they are quite easy to understand and derive.
In this article, I’ll show you how to derive the following constants: d2, d3, A2, D3, and D4. I’ll also show you how to use them to compute control limits for the Xbar and R chart. And it’s not that complicated. Knowing where these constants come from and how you can derive them through simple simulations will improve your knowledge and deepen your appreciation of statistical process control. After you go through this article, you’ll be building Xbar and R charts with easy and confidence!
It all starts with this chart…
The Range Chart
To build control limits for a Range chart we need to estimate the standard deviation, σ. We can estimate σ from m subgroups taken from a process. Each subgroup is a collection of n samples made under like conditions. To assure we collect n samples made under like conditions, we collect consecutive samples over a short period of time. Doing so assures the conditions that produced the first sample are likely the same for the remaining n-1 samples. As such, the data that describes a feature derived from n like samples estimates common cause variation.
For each subgroup we compute the range and plot those values on the Range chart. The Range is the smallest value subtracted from the largest value in a subgroup. To estimate the standard deviation (σ) we compute the average Range across m subgroups and divide by a correction factor, called d2. In this article, I’ll focus on the range method and illustrate how we can derive the constants: d2, d3, D3 and D4 used to compute the control limits for a Range chart.
Let’s talk about the basics…
1.0 Computing the Range
Let’s say that x1, x2,…, xn describes a single value, of a part feature, from n samples. To compute the range, we take the difference between the largest and smallest value as shown in the expression below.
R = xmax – xmin
This next part is critical!
2.0 Computing d2 and d3 using the Relative Range, W
In statistics, there is a relationship between the range of a sample, from a normal distribution, and the standard deviation of that distribution. We can describe that relationship as a random variable W = R / σ. We call this variable (W) the Relative Range. The parameters of the distribution of W (mean and standard deviation) are a function of the sample size n. The mean and standard deviation of W is d2 and d3. As such, an estimator of the standard deviation is s = R/d2. In Table 1, shown are the values of d2 for the samples sizes n = 2, 3, 4, 5, 6, and 7.
Shown in Figure 1 is a simulation of 10 million distributed range values for n=5. I used normally distributed values having a mean and standard deviation of 0 and 1 to compute the range. The mean of the distribution of range values is d2 and the standard deviation is d3. In this case, d2 = 2.326 and d3 = 0.864.
Refer to the following post, Range Statistics. It explains, in further detail, how to estimate the d2 constant and use it to compute the standard deviation.
Let’s put what we learned into practice!
3.0 Computing the Average Range, , and standard deviation, s.
If R1, R2,…,RM represent the range for each sample, then we can find the average range using the following expression.
To compute the average range, we sum the ranges (Ri) and divide by the number of subgroups (m).
Now that we have the average range () we can estimate the standard deviation, σ. To do so, we will estimate the standard deviation by rearranging the Relative Range. Since W = R/σ, then σ = R/W. We can estimate σ using the standard deviation, s. We can estimate the Range (R) using the average Range () and the value of W which is the mean of the distribution of ranges (d2).
How accurate is the Average Range ()?
4.0 The Relative Efficiency of the Range to estimate the variance, s2.
For small samples sizes between n = 2 through n = 6, the range method provides a good estimate of the sample variance s2. In table 2, I show the relative efficiency of the range method to estimate the variance, s2. Beyond n = 6 samples per subgroup, the relative efficiency deteriorates. This is especially true after n = 10 samples per subgroup. But, for small samples sizes, say n = 2 to n = 5 the relative efficiency is good and satisfactory.
Let’s derive and compute the control limits!
5.0 Computing control limits about the subgroup averages
If we use as an estimator of μ and as an estimator of σ, then the parameters of the chart are:
We call UCL and LCL upper and lower control limits. To compute the control limits for the chart we use as an estimate of the process center (or mean) μ. Here is the average of the m subgroup averages. For a process operating in control we expect that each new subgroup, m+1, will have an average that falls within .
6.0 The A2 Constant
As mention earlier, , is the average across all m subgroup averages and represents the process centre. To simplify the control limit expressions (UCL, LCL) we make the following substitution:
The A2 constant only depends on the subgroup same size n. Using A2 we can rewrite the control limit expressions as follows.
The constant A2 is tabulated for various sample sizes in Table 3.
7.0 Computing the Upper and Lower Control Limits for the Ranges – Deriving D3 & D4
So far, we have shown that the subgroup range relates to the process standard deviation. It is thus possible to observe process variability by plotting the subgroup Range values. For this reason we call this type of plot a Range Chart. The parameters of the Range Chart are easily found. The average Range, , is the centreline. To determine the upper and lower control limits about, , we need an estimator of the standard deviation of the Ranges. Recall that we found the standard deviation of the distribution of range values for n=5 in figure 1. Note that we can find the standard deviation of the Ranges from the distribution of the Relative Range (W = R/σ). The standard deviation of W, called d3, is a known function of n. Let’s rearrange the Relative Range, W, and express it as a function of the Range, R.
R = Wσ
The standard deviation of the range is:
Since σ is unknown, we may estimate using:
Now that we have an estimate of the standard deviation of the Ranges we can compute the 3-sigma control limits using these expressions.
We can simplify these expressions by making the following substitution.
Substituting D3 and D4 into the control limit expression we have,
In Table 4, the constants D3 and D4 are shown for subgroup sample sizes n.
When we use few subgroups to construct a X-bar and Range chart, we often consider these as trial control limits. In such a case, we still plot the subgroup averages and ranges on the control chart. The series of subgroup average and range values should display a random pattern. That is, there should not be evidence to suggest special cause variation. We observe special cause variation if any value falls beyond the control limits or when a consecutive values form a trend. When we notice such special cause events, we should investigate. If these special cause events have an assignable cause, we should remove those values and use new trial control limits.
Here’s the best part! An Xbar and R Chart Case Study!
8.0 Xbar and R Chart Case Study
A metal stamping press makes metal parts used in automotive seating. A manufacturing Engineer wishes to establish statistical control of a critical feature; hole diameter. The Engineer collects twenty-five subgroups (m=25). Each subgroup contains n=5 consecutive samples collected each hour. The data appears in Table 4. Using this data, we will compute the control limits and display an Xbar and R chart.
The Range (R) Chart
When working with an Xbar and R chart, we begin with the R chart. The control limits for the chart depends on the process variability, . If the Range chart is not in control, the control limits for the chart will have no meaning. Once we compute the control limits for the Range chart, we will study the range chart for control. Using the data from Table 4, we will compute the center line for the R chart.
For n=5 sample per subgroup, we find that D3 = 0 and D4 = 2.115. Therefore, the control limits for the R chart are:
The 25 sample range values along with the centerline and upper control limit appear in the Range chart shown in Figure 2. The Range chart does not reveal any out-of-control condition. As such, the range chart suggests the process variability is stable and in control. Based on this observation we will use to compute the control limits for the chart.
To build the chart, we will use the data from Table 4.
Computing the Control Limits for the Xbar Chart
To compute the control limits for the chart we will use A2 = 0.577 from Table 3 for a subgroup sample size of n=5.
Shown in Figure 3 is the chart. When we plot the 25 sample subgroup averages on this chart, the plot does not reveal any out-of-control conditions. We therefore conclude the Xbar and Range charts exhibit control. Going forward, we will adopt these trial control limits for use in online statistical process control.
This article provides a foundation readers can use to derive and build their own Xbar and R chart. I showed how we can derive the Xbar and R chart constants, d2 and d3,through simulation and used those constants to compute control limits for the Xbar and Range chart.
In our example, we computed trial control limits that we will use to check a process with time. From time to time, the Xbar and R chart will not exhibit control. When the Xbar and R chart does not exhibit control we will need to identify special cause events. Finding special cause events is a critical practice. It demands that we determine when such an event started, how long it lasted, and what type of special cause variation is at work. Knowing the type of variation, when it started, and how long it lasted helps isolate a potential root cause. Identifying a potential root cause drives continuous improvement. This, we will discuss in a follow-up article.
For additional information, on the Xbar and R Chart, please refer to the following website .
If you are interested is seeing how you can visualize and estimate the d2 and d3 constants then watch the video below!
It’s your turn!
I enjoy hearing from my readers, therefore, if you have any questions about the Xbar and R chart then I’d like to hear from you. In the meantime, are you interested in learning more about various topics in statistical process Control? Then consider readings these blog posts: How to calculate statistical process control limits, Control chart constants – How to derive A2 and E2, and Estimating the d2 constant and the d3 constant using Minitab.