### Control Limits for XBAR & R Chart

Control limits for XBar & R Charts are calculated as follows:

1. The subgroup average and the range for each subgroup are calculated by using the equations below, where n is the subgroup size:
   `R=X_(high)- Y_(low)`
   `barX = (X_1 + X_2 + . . . X_n) / n`

2. The average range and the process average (the process average is the average of all subgroup averages) are calculated by using the equations below, where k is the total number of complete subgroups:
   `barR = (R_1 + R_2 + . . . R_k) / k`
   `barbarX = (barX_1 + barX_2 + . . . barX_k) / k`

3. The control limits are calculated based on constants:
   `barXUCL = barX + A_2barR`
   `RUCL = D_4barR`
   `barXLCL = barbarX - A_2barR`
   `RLCL = D_3barR`

Note: The values of the constants vary based on the subgroup size. Refer to the Table of Constants for the values of constants.

4. The process standard deviation is then:
   `sigma = barR / (d_2)`