control charts

Control Chart Constants | Tables and Brief Explanation


Control chart constants are the engine behind charts such as XmR, XbarR, and XbarS. And, if you've made a control chart by hand or sat in a class, you'll likely have memories of bizarre constants like d2, A2, etc. To me, control chart constants are a necessary evil. Why? Because, it's a nuisance to look up a constant to make a chart, and I suspect that has likely frightened away many would be users over the years. These days though, if you have a good piece of statistical software you wont even see these numbers. Open source options include R's ggQC package. An example plot is shown below. Other opensource options include qcc, iqcc, and qicharts to name a few.

Example XmR Chart with ggQC

There are also commercially available options like minitab or JMP. Regardless of the available software, it's still good to have a place to find these numbers when you need them and quick explanation of their use. It's also nice to have a sense of what these numbers physically mean. For that, check out my articles:

In the next few sections, you'll see in brief how we change quantities such as mean moving range (mR), mean range, and mean standard deviation into a dispersion statistics using the control chart constants. With that dispersion statistic in hand, we can calculate control limits for our data. To begin, we'll start with the building blocks – the bias correction factors.

Bias Correction Control Chart Constants

Bias correction constants are the fundamental quantities that allow you to calculate other higher level control constants such as A2, D3, D4, etc. Subsequent sections provide examples of how these constants are calculated.

To get a better grasp of what the bias correction factors are see my article on Estimating Control Chart Constants. There, I'll walk you though the math and simulation to pull it all together.

Bias Correction Constants

n d2 c4 d3 d4
2 1.1284 0.7979 0.8525 0.9539
3 1.6926 0.8862 0.8884 1.5878
4 2.0588 0.9213 0.8798 1.9783
5 2.3259 0.9400 0.8641 2.2569
6 2.5344 0.9515 0.8480 2.4717
7 2.7044 0.9594 0.8332 2.6455
8 2.8472 0.9650 0.8198 2.7908
9 2.9700 0.9693 0.8078 2.9154
10 3.0775 0.9727 0.7971 3.0242
11 3.1729 0.9754 0.7873 3.1205
12 3.2585 0.9776 0.7785 3.2069
13 3.3360 0.9794 0.7704 3.2849
14 3.4068 0.9810 0.7630 3.3562
15 3.4718 0.9823 0.7562 3.4217
16 3.5320 0.9835 0.7499 3.4821
17 3.5879 0.9845 0.7441 3.5383
18 3.6401 0.9854 0.7386 3.5907
19 3.6890 0.9862 0.7335 3.6398
20 3.7349 0.9869 0.7287 3.6859
21 3.7783 0.9876 0.7242 3.7294
22 3.8194 0.9882 0.7199 3.7706
23 3.8583 0.9887 0.7159 3.8096
24 3.8953 0.9892 0.7121 3.8468
25 3.9306 0.9896 0.7084 3.8822
26 3.9643 0.9901 0.7050 3.9159
27 3.9965 0.9904 0.7017 3.9482
28 4.0274 0.9908 0.6986 3.9791
29 4.0570 0.9911 0.6955 4.0088
30 4.0855 0.9914 0.6927 4.0374

XmR Control Chart Constants

XmR charts are the easiest control charts to make. For a full explanation see the following articles:

XmR Constants

n d2 d3 D4
2 1.1284 0.8525 3.2665

XmR Chart Calculation Reference

  1. Find the center line by calculating the mean of your data points
    X = mean(data)
  2. Determine the mean moving range of your data points. Data must be in the sequence the samples were produced.
    mR = mean(mR)
  3. Convert mean(mR) to sequential deviation(Š):
    Š = mR/ d2 = mR / 1.128
  4. Calculate the upper and lower XmR control limits using the sequential deviation
    1. Lower XmR Control Limit(LCL):
      LCLX = X – 3 ⋅ Š
    2. Upper XmR Control Limit(UCL):
      UCLX = X + 3 ⋅ Š

mR Chart Calculations

  1. Find the center line by calculating the mean moving range of your data points. Data must be in the sequence the samples were produced.
    mR = mean(mR)
  2. Calculate the upper and lower mR control limits
    1. mR Lower Control Limit:
      LCLmR = 0
    2. mR Upper Control Limit:
      UCLmR = 1 + 3(d3 / d2) ⋅ mR = D4 ⋅ mR

Additional XmR Constant Information

  • The constant 2.66 is sometimes used to calculate XmR chart limits. The constant takes into account the 3 used to calculate the upper and lower control limit.
    2.66 = 3 / d2 = 3 / 1.12838
  • Using the 2,66 constant
    Control Limits = X ± 2.66 ⋅ mR
  • The D4 constant is a function of d2 and d3:
    D4 = 1 + 3(d3 / d2) = 3.2665

XbarR Control Chart Constants

XbarR charts are useful when you have sub-groups. For example:

  • You have a very precise process for making cupcakes that uses a pan that can make 12 at a time. After cooking, you measure the weight of each cupcake to make sure the batter was evenly distributed. Here, the sub-group size = 12
  • You have a measurement process where you are make 5 measurements of a reference standard daily. Here, the sub-group size = 5

To see how to make XbarR charts with ggQC, check out the examples at rcontrolcharts.com

XbarR Constants

n d2 d3 A2 D3 D4
2 1.1284 0.8525 1.8800 0.0000 3.2665
3 1.6926 0.8884 1.0233 0.0000 2.5746
4 2.0588 0.8798 0.7286 0.0000 2.2821
5 2.3259 0.8641 0.5768 0.0000 2.1145
6 2.5344 0.8480 0.4832 0.0000 2.0038
7 2.7044 0.8332 0.4193 0.0757 1.9243
8 2.8472 0.8198 0.3725 0.1362 1.8638
9 2.9700 0.8078 0.3367 0.1840 1.8160
10 3.0775 0.7971 0.3083 0.2230 1.7770
11 3.1729 0.7873 0.2851 0.2556 1.7444
12 3.2585 0.7785 0.2658 0.2833 1.7167
13 3.3360 0.7704 0.2494 0.3072 1.6928
14 3.4068 0.7630 0.2354 0.3281 1.6719
15 3.4718 0.7562 0.2231 0.3466 1.6534
16 3.5320 0.7499 0.2123 0.3630 1.6370
17 3.5879 0.7441 0.2028 0.3779 1.6221
18 3.6401 0.7386 0.1943 0.3913 1.6087
19 3.6890 0.7335 0.1866 0.4035 1.5965
20 3.7349 0.7287 0.1796 0.4147 1.5853
21 3.7783 0.7242 0.1733 0.4250 1.5750
22 3.8194 0.7199 0.1675 0.4345 1.5655
23 3.8583 0.7159 0.1621 0.4434 1.5566
24 3.8953 0.7121 0.1572 0.4516 1.5484
25 3.9306 0.7084 0.1526 0.4593 1.5407
26 3.9643 0.7050 0.1484 0.4665 1.5335
27 3.9965 0.7017 0.1445 0.4733 1.5267
28 4.0274 0.6986 0.1408 0.4797 1.5203
29 4.0570 0.6955 0.1373 0.4857 1.5143
30 4.0855 0.6927 0.1341 0.4914 1.5086

XbarR Chart Calculation Reference

  1. Determine the sub-group size:
    n
  2. Calculate the mean of each sub-group:
    X = mean(each sub-group)
  3. Find the center line by calculating the mean of all sub-group means:
    X̿ = mean(mean(each sub-group))
  4. Determine the range, Max(value)-Min(Value), for each sub-group:
    R = range(each sub-group)
  5. Calculate the mean range of all sub-group ranges:
    R = mean(range(each sub-group))
  6. Convert mean of mean ranges to within deviation, Wd:
    Wd = R / d2n
    1. Example 1: If n = 3 then Wd = R / 1.693
    2. Example 2: If n = 10 then Wd = R / 3.078
  7. Determine your Upper and Lower Control Limits: Natural or Studentized
    1. Natural Control Limits will give you the window for the individual measurements in your process.
      1. Lower XbarR Natural Control Limit:
        LNCLx = X̿ – (3 ⋅ Wd) / √ 1 
      2. Upper XbarR Natural Control Limit:
        UNCLx = X̿ + (3 ⋅ Wd) / √ 1 

      Note: The that natural limits use the √ 1  and studentized limits use √ n  (see below). It's akin to the difference between standard deviation(SD) and standard error (SD / √ n )

    2. Studentized Control Limits (method 1) will give you the window for sub-group means.
      1. Lower XbarR Studentized Control Limit:
        LCLx = X̿ – (3 ⋅ Wd) / √ n 
      2. Upper XbarR Studentized Control Limit:
        UCLx = X̿ + (3 ⋅ Wd) / √ n 
    3. Studentized Control Limits (method 2) will give you the window for sub-group means using the control constant A2.
      1. A2n = 3 / (d2n ⋅ √ n )
      2. Lower XbarR Studentized Control Limit:
        LCLx = X̿ R ⋅ A2n
      3. Upper XbarR Studentized Control Limit:
        UCLx = X̿ + R ⋅ A2n

    Quick Demonstration: Let's show that method 1 and 2 for calculating the control limits yields the same result.

    Suppose n = 3; X̿ = 5, R = 7.

    Method 1:
    For n = 3, d2 = 1.6926, Wd = 7 / 1.6926 = 4.1356
    LCLx = 5 – 3 ⋅ 4.1356 / √ 3  = -2.163
    UCLx = 5 + 3 ⋅ 4.1356 / √ 3  = 12.163

    Method 2:
    For n = 3, A2 = 1.0233,
    LCLx = 5 – 7 ⋅ 1.0233 = -2.163
    LCLx = 5 + 7 ⋅ 1.0233 = 12.163

    The Point:
    For a given sub-group size = n:
    A2n = 3 / (d2n ⋅ √ n )

R Chart Calculations

  1. Determine the sub-group size:
    n
  2. Calculate the range, Max(value)-Min(Value), for each sub-group:
    R = range(each sub-group)
  3. Determine the center line by calculating the mean range of all sub-group ranges:
    R = mean(range(each sub-group))
  4. Find R chart control limits:
    1. R Lower Control Limit:
      LCLR = D3 ⋅ R
    2. R Upper Control Limit:
      UCLR = D4 ⋅ R

Additional R Chart Constant Information

  • The D3 constant is a function of d2, d3, and n.
    If n = 5 Then
    D3n=5 = 1 – 3(d3n=5 / d2n=5) = -0.1145  →  0
  • The D4 constant is a function of d2, d3, and n.
    If n = 5 Then
    D4n=5 = 1 + 3(d3n=5 / d2n=5) = 2.1145

XbarS Control Chart Constants

XbarS charts come in to play when you have sub-groups. For example:

  • You have a very precise process for making cupcakes that uses a pan that can make 12 at a time. After cooking, you measure the weight of each cupcake to make sure the batter was evenly distributed. Here, the sub-group size = 12
  • You have a measurement process where you are make 5 measurements of a reference standard daily. Here, the sub-group size = 5

XbarS charts can be made with with ggQC using method = “xBar.sBar”. See the stat_QC() function for more details.

XbarS Constants

n c4 A3 B3 B4
2 0.7979 2.6587 0.0000 3.2665
3 0.8862 1.9544 0.0000 2.5682
4 0.9213 1.6281 0.0000 2.2660
5 0.9400 1.4273 0.0000 2.0890
6 0.9515 1.2871 0.0304 1.9696
7 0.9594 1.1819 0.1177 1.8823
8 0.9650 1.0991 0.1851 1.8149
9 0.9693 1.0317 0.2391 1.7609
10 0.9727 0.9754 0.2837 1.7163
11 0.9754 0.9274 0.3213 1.6787
12 0.9776 0.8859 0.3535 1.6465
13 0.9794 0.8495 0.3816 1.6184
14 0.9810 0.8173 0.4062 1.5938
15 0.9823 0.7885 0.4282 1.5718
16 0.9835 0.7626 0.4479 1.5521
17 0.9845 0.7391 0.4657 1.5343
18 0.9854 0.7176 0.4818 1.5182
19 0.9862 0.6979 0.4966 1.5034
20 0.9869 0.6797 0.5102 1.4898
21 0.9876 0.6629 0.5228 1.4772
22 0.9882 0.6473 0.5344 1.4656
23 0.9887 0.6327 0.5452 1.4548
24 0.9892 0.6191 0.5553 1.4447
25 0.9896 0.6063 0.5648 1.4352
26 0.9901 0.5943 0.5737 1.4263
27 0.9904 0.5829 0.5820 1.4180
28 0.9908 0.5722 0.5899 1.4101
29 0.9911 0.5621 0.5974 1.4026
30 0.9914 0.5525 0.6044 1.3956

XbarS Chart Calculation Reference

  1. Determine the sub-group size:
    n
  2. Calculate the mean of each sub-group:
    X = mean(each sub-group)
  3. Find the center line by calculating the mean of all sub-group means:
    X̿ = mean(mean(each sub-group))
  4. Determine the standard deviation for each sub-group:
    S = sd(each sub-group)
  5. Calculate the mean of all sub-group standard deviations:
    S = mean(sd(each sub-group))
  6. Convert mean sub-group standard deviation to within deviation, Wd:
    Wd = S / c4n
    1. Example 1: If n = 3 then Wd = S / 0.8862
    2. Example 2: If n = 10 then Wd = S / 0.9727
  7. Determine your Upper and Lower Control Limits: Natural or Studentized
    1. Natural Control Limits will give you the window for the individual measurements in your process.
      1. Lower XbarS Natural Control Limit:
        LNCLx = X̿ – (3 ⋅ Wd) / √ 1 
      2. Upper XbarS Natural Control Limit:
        UNCLx = X̿ + (3 ⋅ Wd) / √ 1 

      Note: The that natural limits use the √ 1  and studentized limits use √ n  (see below). It's akin to the difference between standard deviation(SD) and standard error (SD / √ n )

    2. Studentized Control Limits (method 1) will give you the window for sub-group means.
      1. Lower XbarS Studentized Control Limit:
        LCLx = X̿ – (3 ⋅ Wd) / √ n 
      2. Upper XbarS Studentized Control Limit:
        UCLx = X̿ + (3 ⋅ Wd) / √ n 
    3. Studentized Control Limits (method 2) will give you the window for sub-group means using the control constant A3.
      1. A3n = 3 / (c4n ⋅ √ n )
      2. Lower XbarS Studentized Control Limit:
        LCLx = X̿ S ⋅ A3n
      3. Upper XbarS Studentized Control Limit:
        UCLx = X̿ + S ⋅ A3n

    Quick Demonstration: Let's show that method 1 and 2 for calculating the control limits yields the same result.

    Suppose n = 3; X̿ = 5, S = 2.

    Method 1:
    For n = 3, c4 = 0.8862, Wd = 2 / 0.8862 = 2.2568
    LCLx = 5 – 3 ⋅ 2.2568 / √ 3  = 1.091
    UCLx = 5 + 3 ⋅ 2.2568 / √ 3  = 8.909

    Method 2:
    For n = 3, A3 = 1.954,
    LCLx = 5 – 2 ⋅ 1.0233 = 1.092
    LCLx = 5 + 2 ⋅ 1.0233 = 8.908

    The Point:
    For a given sub-group size = n:
    A3n = 3 / (c4n ⋅ √ n )

S Chart Calculations

  1. Determine the sub-group size:
    n
  2. Determine the standard deviation for each sub-group:
    S = sd(each sub-group)
  3. Calculate the mean of all sub-group standard deviations:
    S = mean(sd(each sub-group))
  4. Find S chart control limits:
    1. S Lower Control Limit:
      LCLS = B3 ⋅ S
    2. S Upper Control Limit:
      UCLS = B4 ⋅ S

Additional S Chart Constant Information

  • The B3 constant is a function of c4 and n.
    If n = 5 then
    B3n=5 = 1 – 3 / c4n=5 ⋅ (√ 1 – (c4)² ) = -0.0889  →  0
  • The B4 constant is a function of c4 and n.
    If n = 5 then
    B4n=5 = 1 + 3 / c4n=5 ⋅ (√ 1 – (c4)² ) = 2.0889

Summary

Tables of control chart constants and a brief explanation of how control chart constants are used in different contexts has been presented. XmR, XbarR, XbarS, mR, R, and S type control charts all require these constants to determine control limits appropriately. For XmR charts, there is only one constant needed to determine the control limits for individual observations, 1.128. However for XbarR and XbarS charts, the control constant changes as a function of sub-group size. In addition when you are calculating limits for XbarR or XbarS charts, you need to know if you are calculating natural control limits for individual measurements or studentized control limits for sub-group means. If you doing the calculations by hand, use method 1 described above to help keep the difference between individual and studentized straight.

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *