### Control Limits for XBAR & S Chart

Control limits for XBar & S 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 standard deviation of each subgroup is calculated using the following formula, where n is the subgroup size:

4. The average standard deviation is calculated:
   `barS = (S_1 + S_2 + . . . S_k) / k`

5. Then, the control limits are calculated based on constants:
   `barXUCL = X + A_(3barS)` `SUCL = B_(4barS)`
   `barXLCL = X - A_(3barS)` `SLCL = B_(3barS)`

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

6. The process standard deviation is then:
   `sigma = barS/C_4`