Xbar and R Chart Formula and Constants (2024)

Have you ever had to prepare an Average and Range Chart?

Xbar and R 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 ease 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.

Xbar and R Chart Constants

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 (\bar{R}) 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 \bar{R} 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 \bar { R } and the value of W which is the mean of the distribution of ranges (d2).

How accurate is the Average Range (\bar{R})?

4.0 The Relative Efficiency of the Range to estimate the variance, s2.

For small sample 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 sample sizes, say n = 2 to n = 5 the relative efficiency is good and satisfactory.

Xbar and R Chart Constants

Let’s derive and compute the control limits!

5.0 Computing control limits about the subgroup averages

If we use \bar{\bar{X}} as an estimator of μ and \bar{R}/d_{2} as an estimator of σ, then the parameters of the \bar{X} chart are:

We call UCL and LCL upper and lower control limits. To compute the control limits for the \bar{X} chart we use \bar{\bar{X}} as an estimate of the process center (or mean) μ. Here \bar{\bar{X}} 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 \pm { 3 }/{ { d }_{ 2 }\sqrt { n } }.

6.0 The A2 Constant

As mention earlier, \bar { \bar { X } }, 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.

Xbar and R Chart Constants

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, \bar { R }, is the centreline. To determine the upper and lower control limits about, \bar { R }, 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.

and

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.

Xbar and R Chart Constants

When we use few subgroups to construct an Xbar 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 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.

Table 5: Xbar and R Chart Case Study Data

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, \bar { R }. If the Range chart is not in control, the control limits for the \bar { X } 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 centerline 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 \bar { R } to compute the control limits for the \bar { X } chart.

Figure 2: Range Chart

To build the \bar { X } chart, we will use the data from Table 4.

Computing the Control Limits for the Xbar Chart

To compute the control limits for the \bar { X } chart we will use A2 = 0.577 from Table 3 for a subgroup sample size of n=5.

Shown in Figure 3 is the \bar { X } 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.

Figure 3: Xbar Chart

Now!

This article provides a foundation for readers to 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, andEstimating the d2 constant and the d3 constant using Minitab.

Xbar and R Chart Formula and Constants (2024)

FAQs

What is the SPC formula? ›

Process average, or x̄ Upper Specification Limit (USL) and Lower Specification Limit (LSL). The Process Standard Deviation (σₑₛₜ). This can be calculated directly from the individual data, or can be estimated by: σₑₛₜ = R̄/d₂

What is the constant d2 in the control chart? ›

The D2 function returns the expected value of the sample range of n independent, normally distributed random variables with the same mean and a standard deviation of 1. This expected value is referred to as the control chart constant d2.

What is the formula for control limits? ›

control limits, control limits are calculated generally as follows x-bar +/- 3 * sigma-hat where x-bar is the average of the data and sigma-hat is the estimate of standard deviation for the chart. To see the specific control limit formulas for Shewhart control charts, including XBar and R, please read this FAQ.

What is the constant control? ›

Constant - The factors that do not change during the experiment. Control - The control is the group that serves as a standard of comparison. It is exposed to the same conditions as the experimental group, except for the variable being tested.

What are the 7 rules in a SPC chart? ›

The 8 Control Chart Rules
RuleRule NamePattern
1Beyond LimitsOne or more points beyond the control limits
2Zone A2 out of 3 consecutive points in Zone A or beyond
3Zone B4 out of 5 consecutive points in Zone B or beyond
4Zone C7 or more consecutive points on one side of the average (in Zone C or beyond)
4 more rows

What is the rule 5 in SPC? ›

Rule 5 – 15 or more data points hugging the mean

15 or more data points hugging the centre line (inner one-third of the chart). In a normal distribution, you should have around 68% of the data near the mean of the distribution (+/- 1 standard deviation). When you get a pattern like this, you're exceeding the 68%.

How to calculate d2 and D3 in control chart? ›

To compute the constant d2, the mean of the ranges per each row for all the nrows > 1 · 107 rows is calculated, likewise, the constant d3 is computed using the standard deviation of all ranges for each of the nrows > 1 · 107 rows.

What is D3 and D4 in R chart? ›

The constants for R charts are d3 (1σ around R,), D3 (Lower 3σ limit of R) and D4 (Upper 3σ limit of R). To get these constants, we start with the assumption that the standard deviation of R is proportional to the standard deviation of the individual X's. The proportionality constant is d3 shown in Eq.

What is d2 in gage R&R? ›

D2 Values Used in Gage Repeatability and Reproducibility Studies. D2 values appear in Gage RR equations when using the Average and Range method. The Average and Range method uses constants to estimate Gage Repeatability and Reproducibility (GR&R).

What are constants in data structure? ›

A constant is a data object with a fixed value that cannot be changed during program execution. The value of a constant can be a numeric value, a logical value, or a character string. A constant that does not have a name is a literal constant.

What are the variables in control chart? ›

What is a variables control chart? Variables control charts plot continuous measurement process data, such as length or pressure, in a time-ordered sequence. In contrast, attribute control charts plot count data, such as the number of defects or defective units.

What is the A2 constant? ›

The A2 constant is a function of the sample size n. Once we know the sample size, n, we can find the value for d2 and compute the value for A2. The X-Bar chart and Individuals chart both use A2 and E2 constants to compute their upper and lower control limits.

What is controlled vs constants? ›

Generally speaking, a constant cannot be changed. A controlled variable is one that is set at a particular value (or set of values) for the term of the experiment and kept there. Temperature, pressure and time are often examples of controlled variables.

Top Articles
Latest Posts
Article information

Author: Gov. Deandrea McKenzie

Last Updated:

Views: 5531

Rating: 4.6 / 5 (66 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Gov. Deandrea McKenzie

Birthday: 2001-01-17

Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

Phone: +813077629322

Job: Real-Estate Executive

Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.