2.75.5.2 Algorithm for Control Charts
Contents
Tests for Special Causes
- Test 1: One Point More Than 3 \(\sigma\) From Center Line
- Test if the point (subgroup) is out of the center line more than 3 \(\sigma\).
- Test 2: Nine Points in a Row on The Same Side of The Center Line
- Test if there are nine consecutive points (subgroups) on the same side (all above or all below) the center line.
- Test 3: Six Points in a Row, All Increasing or All Decreasing
- Test if there are six consecutive points (subgroups) strictly monotonous.
- Test 4: Fourteen Points in a Row, Alternating Up and Down
- Test if there are fourteen consecutive points (subgroups) alternating up and down, that is one point is bigger than the previous point, and then the next point is smaller this one, alternately.
- Test 5: Two Out of Three Points More Than 2 \(\sigma\) From The Center Line (Same Side)
- Test if in 3 consecutive points (subgroups), there are 2 points out of the center line more than 2 \(\sigma\) on the same side, that is all points are above or below the center line.
- Test 6: Four Out of Five Points More Than 1 \(\sigma\) From Center Line (Same Side)
- Test if in 5 consecutive points (subgroups), there are 4 points out of the center line more than 1 \(\sigma\) on the same side, that is all points are above or below the center line.
- Test 7: Fifteen Points in a Row Within 1 \(\sigma\) of Center Line (Either Side)
- Test if there are 15 consecutive points (subgroups) within 1 \(\sigma\) of the center line, that is, the ranges of all points to the center line are less than 1 \(\sigma\).
- Test 8: Eight Points in a Row More Than 1 \(\sigma\) From Center Line (Either Side)
- Test if there are 8 consecutive points (subgroups) out of the center line more than 1 \(\sigma\), that is, the ranges of all points to the center line are more than 1 \(\sigma\).
Variables Charts for Subgroups
Charts include Xbar-R, Xbar-S, I-MR-R/S (Between/Within), Xbar, R, S, and Zone charts.
Xbar-R
- Sigma Estimation: If the historical value is specified, this historical value is used, otherwise, estimated from data.
- Rbar: Please refer to Average of Subgroup Ranges (Rbar) in Standard Deviation Estimation section for more details about the formula.
- Pooled Standard Deviation: Please refer to Pooled Standard Deviation in Standard Deviation Estimation section for more details about the formula.
- Xbar Chart
- Plotted Points: The mean of the observations for each subgroup.
- \[\bar{X_i}=\frac{\sum_{j=1}^{n_i}X_{ij}}{n_i}\]
- where \(X_{ij}\) is the \(j^{th}\) observation in the \(i^{th}\) subgroup, and \(n_i\) is the number of observations in subgroup \(i\).
- Center Line: Represents the process mean, the historical value is used if specified, otherwise, uses the mean of data calculated as follows:
- \(\bar{X}=\frac{\sum_{i=1}^NX_i}{N}\), where \(N\) is the total number of observations.
- Control Limits
- For each subgroup \(i\), lower control limit (LCL) is calculated by \(LCL_i=\mu-\frac{k\sigma}{\sqrt{n_i}}\)
- For each subgroup \(i\), upper control limit (UCL) is calculated by \(UCL_i=\mu+\frac{k\sigma}{\sqrt{n_i}}\)
- where \(\mu\) is the process mean, \(k\) is the parameter for Test 1, \(\sigma\) is the process standard deviation, and \(n_i\) is the number of observations in subgroup \(i\).
- Plotted Points: The mean of the observations for each subgroup.
- R Chart
- Plotted Points: The range for each subgroup.
- \[r_i=\max(Subgroup_i)-\min(Subgroup_i)\]
- Center Line
- \(\bar{R_i}=d_2(n_i)*\sigma\), where \(n_i\) is the number of observations in subgroup \(i\), \(d_2(\cdot)\) is the value of unbiasing constant \(d_2()\), and \(\sigma\) is the process standard deviation.
- Control Limits
- For each subgroup \(i\), lower control limit (LCL) is calculated by \(LCL_i=\max(0, d_2(n_i)*\sigma-k*\sigma*d_3(n_i))\)
- For each subgroup \(i\), upper control limit (UCL) is calculated by \(UCL_i=d_2(n_i)*\sigma+k*\sigma*d_3(n_i)\)
- where \(k\) is the parameter for Test 1, \(\sigma\) is the process standard deviation, \(n_i\) is the number of observations in subgroup \(i\), \(d_2(\cdot)\) is the value of unbiasing constant \(d_2()\), and \(d_3(\cdot)\) is the value of unbiasing constant \(d_3()\).
- Plotted Points: The range for each subgroup.
- Sigma Estimation: If the historical value is specified, this historical value is used, otherwise, estimated from data.
Xbar-S
- Sigma Estimation: If the historical value is specified, this historical value is used, otherwise, estimated from data.
- Sbar: Please refer to Average of Subgroup Standard Deviations (Sbar) in Standard Deviation Estimation section for more details about the formula.
- Pooled Standard Deviation: Please refer to Pooled Standard Deviation in Standard Deviation Estimation section for more details about the formula.
- Xbar Chart: Please refere to Xbar Chart in Xbar-R section above.
- S Chart
- Plotted Points: The standard deviation for each subgroup, \(s_i\).
- Center Line
- Not use unabiasing constant: \(\bar{S_i}=\sigma\)
- Use unabiasing constant: \(\bar{S_i}=c_4(n_i)*\sigma\)
- where \(n_i\) is the number of observations in subgroup \(i\), \(c_4(\cdot)\) is the value of unbiasing constant \(c_4()\), and \(\sigma\) is the process standard deviation.
- Control Limits
- For each subgroup \(i\), lower control limit (LCL) is calculated by:
- Not use unabiasing constant: \(LCL_i=\sigma-\frac{c_5(n_i)}{c_4(n_i)}k\sigma\)
- Use unabiasing constant: \(LCL_i=c_4(n_i)\sigma-c_5(n_i)k\sigma\)
- For each subgroup \(i\), upper control limit (UCL) is calculated by:
- Not use unabiasing constant: \(LCL_i=\sigma+\frac{c_5(n_i)}{c_4(n_i)}k\sigma\)
- Use unabiasing constant: \(LCL_i=c_4(n_i)\sigma+c_5(n_i)k\sigma\)
- where \(k\) is the parameter for Test 1, \(\sigma\) is the process standard deviation, \(n_i\) is the number of observations in subgroup \(i\), \(c_4(\cdot)\) is the value of unbiasing constant \(c_4(n_i)=\frac{\Gamma(\frac{n_i}{2})}{\Gamma(\frac{n_i-1}{2})}\sqrt{\frac{2}{n_i-1}}\), and \(c_5(\cdot)\) is the value of unbiasing constant \(c_5(n_i)=\sqrt{1-c_4(n_i)^2}\).
- For each subgroup \(i\), lower control limit (LCL) is calculated by:
- Sigma Estimation: If the historical value is specified, this historical value is used, otherwise, estimated from data.
I-MR-R/S (Between/Within)
- Sigma Estimation: Please refer to Standard Deviation Estimation for the details. And please note, if the historical between standard deviation is specified, \(\sigma_{xbar}\) is calculated by:
- \[\sigma_{xbar}=\sqrt{\sigma_{between}^2+\frac{\sigma_{within}^2}{SubgroupSize}}\]
- I Chart
- Plotted Points: For each data point, plot the mean of each subgroup.
- Center Line: The process mean, \(\mu\). If a historical value is specified, use this historical value, otherwise, estimate the mean of the data.
- Control Limits
- Lower control limit (LCL) is calculated by \(LCL=\mu-k\sigma\)
- Upper control limit (UCL) is calculated by \(UCL=\mu+k\sigma\)
- where \(k\) is the parameter for Test 1, \(\sigma\) is the process standard deviation, and \(\mu\) is the process mean.
- MR Chart
- Plotted Points: For each data point, plot the moving range (\(MR\)) of the means of subgroups.
- Center Line: Estimate the unbiased average of the moving range by:
- \[CenterLine=MR*d_2(w)\]
- where \(MR\) is moving range of the means of subgroups, \(d_2(w)\) is the unbiasing constant, and \(w\) is the number of points in the moving range.
- Control Limits
- Lower control limit (LCL) is calculated by \(LCL=\max(0, d_2(w)*\sigma-k*\sigma*d_3(w))\)
- Upper control limit (UCL) is calculated by \(UCL=d_2(w)*\sigma+k*\sigma*d_3(w)\)
- where \(k\) is the parameter for Test 1, \(\sigma\) is the process standard deviation, \(w\) is the number of points in the moving range, \(d_2(\cdot)\) is the value of unbiasing constant \(d_2()\), and \(d_3(\cdot)\) is the value of unbiasing constant \(d_3()\).
- R Chart: Please refer to R Chart in Xbar-R section above.
- S Chart: Please refer to S Chart in Xbar-S section above.
- Sigma Estimation: Please refer to Standard Deviation Estimation for the details. And please note, if the historical between standard deviation is specified, \(\sigma_{xbar}\) is calculated by:
Xbar
Please refer to Xbar Chart in Xbar-R section above.
R
Please refer to R Chart in Xbar-R section above.
S
Please refer to S Chart in Xbar-S section above.
Zone
- Sigma Estimation: Please refer to Standard Deviation Estimation section for more details about the formula.
- Plotted Points: Cumulative scores based on zones at 1, 2, and 3 standard deviations from center line. For the first point, it is plotted zone score or weight of \(\bar{X_i}\), and then the subsequent plotted point is sum of sequential weights. If the point crosses the center line, the sum is reset to 0.
- Center Line: Overall average of the individual observations or subgroup means.
- Zone Score: There are 4 zones, and different zone has different weight.
- Zone 1: Between center line and \(1\sigma\), weight of 0
- Zone 2: Between \(1\sigma\) and \(2\sigma\), weight of 2
- Zone 3: Between \(2\sigma\) and \(3\sigma\), weight of 4
- Zone 4: Beyond \(3\sigma\), weight of 8
Variables Charts for Individuals
Charts include I-MR, Z-MR, Individuals, and Moving Range charts.
I-MR
- Please refer to I Chart and MR Chart in I-MR-R/S(Between/Within) section above.
Z-MR
- Sigma Estimation: Please refer to Standard Deviation Estimation section for more details about the formula. And there are 4 methods for estimating \(\sigma\):
- By Runs: \(\sigma\) is estimated for each run independently.
- By Parts (Combine All Observations for Same Part): All runs data of the same part are used to estimate \(\sigma\).
- Constant (Combine All Observations): All the data across runs and parts are used for \(\sigma\) estimation.
- Relative to Size (Combine All Observations, Use ln): First transform the data by natural log, and then use the transformed data across all runs and all parts for \(\sigma\) estimation.
- Process Mean: For different part, process mean is calculated separately. Historical values can be specified as process means too.
- Z Chart
- Plotted Points: Plot Z Chart by the data point calculated as follows:
- \[z_{i}=\frac{X_i-\mu_i}{\sigma}\]
- where \(X_i\) is observation, \(\mu\) is mean of group, \(\sigma\) is the standard deviation of group, and \(w\) is the width of moving range.
- Center Line: It is always 0 because the data are standardized already.
- Control Limits: Because of the standarization of data, lower and upper control limits are always -3 and 3 respectively.
- Plotted Points: Plot Z Chart by the data point calculated as follows:
- MR Chart
- Plotted Points: Plot the moving range of the \(z\) values in each group.
- Center Line: It is always 1.128 because the data are standardized already.
- Control Limits: Because of the standarization of data, lower control limit is always 0. And upper control limit is different for different estimation method. For average moving range, upper control limit is always 3.686, and for median moving range, it is 3.12.
- Sigma Estimation: Please refer to Standard Deviation Estimation section for more details about the formula. And there are 4 methods for estimating \(\sigma\):
Individuals
- Please refer to I Chart in I-MR-R/S(Between/Within) section above.
Moving Range
- Please refer to MR Chart in I-MR-R/S(Between/Within) section above.
Attributes Charts
Charts include P Chart Diagnostic, P, Laney P', NP, U Chart Diagnostic, U, Laney U', and C charts.
P Chart Diagnostic
- Plotted Points
- X Data
- Adjusted Counts: First of all, compute the adjusted defective counts (\(a_i\)) as follows:
- \(a_i=\frac{d_i}{n_i}\bar{n}\), where \(d_i\) is the count of defectives for subgroup \(i\), \(n_i\) is the size of subgroup \(i\), and \(\bar{n}\) is the mean of subgroup size.
- Transformed Counts: Then transform the adjusted counts using the formula below to get the X data:
- \[X_i=\arcsin\left(\sqrt{\frac{a_i+0.375}{\bar{n}+0.75}}\right)\]
- Y Data
- Four methods aer provided for Y data calculation, including Median Rank (Benard), Mean Rank (Herd-Johnson), Modified Kaplan-Meier, and Kaplan-Meier. And formulas for these for methods are:
- \[Y_i=\left\{\begin{array}{ll}\frac{i-0.3}{N+0.4}&Median\;Rank\;(Benard)\cr\frac{i}{N+1}&Mean\;Rank\;(Herd-Johnson)\cr\frac{i-0.5}{N}&Modified\;Kaplan-Meier\cr\frac{i}{N}&Kaplan-Meier\end{array}\right.\]
- where \(i=1, 2, 3,...,N\), and \(N\) is the number of data points.
- Y Data Types: There are three data types for Y data available, including Percent, Probability, and Normal Score. The function calculation above for Y data is the Probability, and Percent and Normal Score are computed as:
- \[Y_i(Percent)=Y_i*100\]
- \(Y_i(NormalScore)=\Phi^{-1}(Y_i)\), where \(\Phi^{-1}\) is the inverse standard normal distitribution function.
- X Data
- Ratio of Observed Variation to Expected Variation
- Expected Variation
- \(ExpectedVariation=\frac{1}{\sqrt{4\bar{n}}}\), where \(\bar{n}\) is the mean of subgroup size.
- Observed Variation
- First of all, calcuate the normal scores of transformed counts (see \(X_i\) above). Note, this normal score is different from the one for Y data above. Here is the procedure:
- From the first point of transformed counts to the last point, find out each subsequence points, which are all the same value. For each subsequence, compute normal scores by:
- \(NormalScores_i=\Phi^{-1}(\frac{Mean-0.375}{N+0.25})\), where \(i\) is the \(i^{th}\) data point, \(Mean\) is the mean of the corresponding subsequence, and \(N\) is the total number of data points.
- Then get the middle 50% (excluding those less than the 25th percentile or greater than the 75th percentile) of the \(X_i\) data for use, along with the corresponding \(NormalScores\), and then perform the linear fit by the following equation:
- \(NormalScores=\beta_0+\beta_1X\), then get observed variation:
- \[ObservedVariation=\frac{1}{\beta_1}\]
- Ratio
- \[Ratio=\frac{ObservedVariation}{ExpectedVariation}*100\]
- Expected Variation
- 95% Confidence Limits for Ratio
- \[UpperLimit=\exp(0.185+\frac{5.62}{m}+\frac{0.274}{\bar{n}*\bar{p}})*100\]
- where \(m\) is the number of subgroups, \(\bar{n}\) is the mean of subgroup size, \(\bar{p}=\frac{\sum d_i}{\sum n_i}\), \(d_i\) is the count of defectives for subgroup \(i\), \(n_i\) is the size of subgroup \(i\).
- \(LowerLimit=60\), that is to fix the lower confidence limit for the ratio to 60%.
- Decision
- Compare the ratio to the 95% upper/lower confidence limit.
- Ratio > Upper Confidence Limit: Traditional P chart may result in an elevated false alarm rate, and Laney P' chart is recommended.
- Ratio < Lower Confidence Limit: Traditional P chart may result in control limits that are too wide and Laney P' chart is recommended.
- Compare the ratio to the 95% upper/lower confidence limit.
- Plotted Points
P
- Plotted Points
- \(p_i=\frac{x_i}{n_i}\), where \(x_i\) is the number of defectives for subgroup \(i\), and \(n_i\) is the size of subgroup \(i\).
- Center Line
- If a historical value is specified, use this historical value, otherwise, use the mean proportion of defectives from data, calculated by:
- \(\bar{p}=\frac{\sum x_i}{\sum n_i}\), where \(x_i\) is the number of defectives for subgroup \(i\), and \(n_i\) is the size of subgroup \(i\).
- Control Limits
- \[LCL=\max(0, p-k\sqrt{\frac{p(1-p)}{n_i}})\]
- \[UCL=\min(1, p+k\sqrt{\frac{p(1-p)}{n_i}})\]
- where \(p\) is the process proportion, \(k\) is the parameter for Test 1, and \(n_i\) is the size of subgroup \(i\).
- Plotted Points
Laney P'
- Plotted Points: The proportion of defectives for each subgroup:
- \(p_i=\frac{x_i}{n_i}\), where \(x_i\) is the number of defectives for subgroup \(i\), and \(n_i\) is the size of subgroup \(i\).
- Center Line
- If a historical value is specified, use this historical value, otherwise, use the mean proportion of defectives from data, calculated by:
- \(\bar{p}=\frac{\sum x_i}{\sum n_i}\), where \(x_i\) is the number of defectives for subgroup \(i\), and \(n_i\) is the size of subgroup \(i\).
- Sigma Z
- Firstly, convert each subgroup proportion \(p_i\) to z-score: \(z_i=\frac{p_i-p}{\sqrt{\frac{p(1-p)}{n_i}}}\)
- Then, apply moving range of length 2 to z-score, and get sigma Z as:
- \[\sigma_z=\overline{MR}/1.128\]
- where \(p_i\) is proportion of defectives for subgroup \(i\), \(p\) is the process proportion, \(n_i\) is the size subgroup \(i\), and \(\overline{MR}\) is the moving range of length 2.
- Control Limits
- \[LCL=\max(0, p-k\sqrt{\frac{p(1-p)}{n_i}}*\sigma_z)\]
- \[UCL=\min(1, p+k\sqrt{\frac{p(1-p)}{n_i}}*\sigma_z)\]
- where \(p\) is the process proportion, \(k\) is the parameter for Test 1, \(n_i\) is the size of subgroup \(i\), and \(\sigma_z\) is the Sigma Z calculated above.
- Plotted Points: The proportion of defectives for each subgroup:
NP
- Plotted Points: The number of defectives in each subgroup (\(x_i\)) is plotted.
- Center Line
- If a historical value is specified, use this historical value, otherwise, use the mean proportion of defectives from data, calculated by:
- \(p=\bar{p}=\frac{\sum x_i}{\sum n_i}\), where \(x_i\) is the number of defectives for subgroup \(i\), and \(n_i\) is the size of subgroup \(i\).
- Then center line for each subgroup is computed as follows:
- \[CenterLine_i=n_ip\]
- Control Limits
- \[LCL=\max(0, n_ip-k\sqrt{n_ip(1-p)})\]
- \[UCL=\min(n_i, n_ip+k\sqrt{n_ip(1-p)})\]
- where \(p\) is the process proportion, \(k\) is the parameter for Test 1, and \(n_i\) is the size of subgroup \(i\).
U Chart Diagnostic
- Please refer to P Chart Diagnostic section above for the similar procedure, but with the different calculations summaried below:
- Plotted Points
- X Data
- Transformed Counts
- \[X_i=\sqrt{a_i}+\sqrt{a_i+1}\]
- X Data
- Ratio of Observed Variation to Expected Variation
- Expected Variation
- \[ExpectedVariation=1\]
- Expected Variation
- 95% Confidence Limits for Ratio
- \[UpperLimit=\exp(0.182+\frac{5.75}{m}+\frac{0.195}{\bar{n}*\bar{u}})*100\]
- where \(m\) is the number of subgroups, \(\bar{n}\) is the mean of subgroup size, \(\bar{u}=\frac{\sum d_i}{\sum n_i}\), \(d_i\) is the defect count for subgroup \(i\), \(n_i\) is the size of subgroup \(i\).
- Decision
- Compare the ratio to the 95% upper/lower confidence limit.
- Ratio > Upper Confidence Limit: Traditional U chart may result in an elevated false alarm rate, and Laney U' chart is recommended.
- Ratio < Lower Confidence Limit: Traditional U chart may result in control limits that are too wide and Laney U' chart is recommended.
- Compare the ratio to the 95% upper/lower confidence limit.
- Plotted Points
U
- Plotted Points: The defect rate for each subgroup:
- \(u_i=\frac{x_i}{n_i}\), where \(x_i\) is the number of defects for subgroup \(i\), and \(n_i\) is the size of subgroup \(i\).
- Center Line
- If a historical value is specified, use this historical value, otherwise, use the mean of the data, calculated by:
- \(\bar{u}=\frac{\sum x_i}{\sum n_i}\), where \(x_i\) is the number of defectives for subgroup \(i\), and \(n_i\) is the size of subgroup \(i\).
- Control Limits
- \[LCL=\max(0, u-k\sqrt{\frac{u}{n_i}})\]
- \[UCL=u+k\sqrt{\frac{u}{n_i}}\]
- where \(u\) is the process mean, \(k\) is the parameter for Test 1, and \(n_i\) is the size of subgroup \(i\).
- Plotted Points: The defect rate for each subgroup:
Laney U'
- Plotted Points: The defect rate for each subgroup:
- \(u_i=\frac{x_i}{n_i}\), where \(x_i\) is the number of defects for subgroup \(i\), and \(n_i\) is the size of subgroup \(i\).
- Center Line
- If a historical value is specified, use this historical value, otherwise, use the mean of the data, calculated by:
- \(\bar{u}=\frac{\sum x_i}{\sum n_i}\), where \(x_i\) is the number of defectives for subgroup \(i\), and \(n_i\) is the size of subgroup \(i\).
- Sigma Z
- Firstly, convert each subgroup rate \(u_i\) to z-score: \(z_i=\frac{u_i-u}{\sqrt{\frac{u}{n_i}}}\)
- Then, apply moving range of length 2 to z-score, and get sigma Z as:
- \[\sigma_z=\overline{MR}/1.128\]
- where \(u_i\) is defect rate for subgroup \(i\), \(u\) is the process mean, \(n_i\) is the size subgroup \(i\), and \(\overline{MR}\) is the moving range of length 2.
- Control Limits
- \[LCL=\max(0, u-k\sqrt{\frac{u}{n_i}}*\sigma_z)\]
- \[UCL=u+k\sqrt{\frac{u}{n_i}}*\sigma_z\]
- where \(u\) is the process mean, \(k\) is the parameter for Test 1, \(n_i\) is the size of subgroup \(i\), and \(\sigma_z\) is calculated above.
- Plotted Points: The defect rate for each subgroup:
C
- Plotted Points: The number of defects in each subgroup (\(x_i\)) is plotted.
- Center Line
- If a historical value is specified, use this historical value, otherwise, use the process mean is estimated by data:
- \(\bar{c}=\frac{\sum x_i}{m}\), where \(x_i\) is the number of defects in subgroup \(i\), and \(m\) is the number of subgroups.
- Control Limits
- \[LCL=\max(0, c-k\sqrt{c})\]
- \[UCL=c+k\sqrt{c}\]
- where \(c\) is the process mean, and \(k\) is the parameter for Test 1.
Time-Weighted Charts
Charts include Moving Average, EWMA, and CUSUM charts.
Moving Average
- Plotted Points
- \[MA_i=\left\{\begin{array}{ll}\frac{\overline{X}_1+\overline{X}_2+\cdots+\overline{X}_i}{i}&i\le v\cr \frac{\overline{X}_{i-v+1}+\overline{X}_{i-v+2}+\cdots+\overline{X}_i}{v}&i>v\end{array}\right.\]
- where \(\overline{X}_i\) is the mean of the \(i^{th}\) subgroup, and \(v\) is the moving number for average.
- Center Line
- If a historical value is specified, use this historical value, otherwise, use the process mean is estimated by data:
- \(\mu=\frac{\sum x_i}{m}\), where \(x_i\) is the observation, and \(m\) is the number of observations.
- Control Limits
- \[LCL_i=\left\{\begin{array}{ll}\mu-k\sigma\frac{\sqrt{\frac{1}{n_1}+\frac{1}{n_2}+\cdots+\frac{1}{n_i}}}{i}&i\le v\cr \mu-k\sigma\frac{\sqrt{\frac{1}{n_{i-v+1}}+\frac{1}{n_{i-v+2}}+\cdots+\frac{1}{n_i}}}{v}&i>v\end{array}\right.\]
- \[UCL_i=\left\{\begin{array}{ll}\mu+k\sigma\frac{\sqrt{\frac{1}{n_1}+\frac{1}{n_2}+\cdots+\frac{1}{n_i}}}{i}&i\le v\cr \mu+k\sigma\frac{\sqrt{\frac{1}{n_{i-v+1}}+\frac{1}{n_{i-v+2}}+\cdots+\frac{1}{n_i}}}{v}&i>v\end{array}\right.\]
- where \(\mu\) is the process mean, \(k\) is the parameter for Test 1, \(\sigma\) is the standard deviation, \(v\) is the moving number for average, and \(n_i\) is the \(i^{th}\) subgroup size.
- Plotted Points
EWMA
- Plotted Points
- \[z_i=\left\{\begin{array}{ll}w\overline{X}_i+(1-w)\mu&i=1\cr w\overline{X}_i+(1-w)z_{i-1}&i>1\end{array}\right.\]
- where \(\mu\) is the process mean, \(\overline{X}_i\) is the mean of the \(i^{th}\) subgroup, and \(w\) is the weight.
- Center Line
- If a historical mean is specified, use this historical mean, otherwise, use the process mean is estimated by data:
- \(\mu=\frac{\sum x_i}{m}\), where \(x_i\) is the observation, and \(m\) is the number of observations.
- Control Limits
- The standard deviation of the plotted points is calcuated by:
- \[\sigma_z(i)=\left\{\begin{array}{ll}\frac{w\sigma}{\sqrt{n_i}}&i=1\cr w\sigma\sqrt{\sum_{j=1}^{i}{\frac{(1-w)^{2*(i-j)}}{n_j}}}&i>1\end{array}\right.\]
- And then control limits are computed by:
- \[LCL_i=\mu-k\sigma_z(i)\]
- \[UCL_i=\mu+k\sigma_z(i)\]
- where \(\mu\) is the process mean, \(k\) is the parameter for Test 1, \(\sigma\) is the standard deviation, can be the specified historical value, or calculated from data, \(w\) is the weight, and \(n_i\) is the \(i^{th}\) subgroup size.
- Plotted Points
CUSUM
Tabular CUSUM
- Plotted Points
- The data plotted in a tabular CUSUM chart are \(CL_i\) and \(CU_i\). Normally, they are initialized at 0, but if the process is out of control at startup, FIR (fast initial response) method can be used for initialization, that is
- \[CL_0=\left\{\begin{array}{ll}0&No\;FIR\cr -f\frac{\sigma}{\sqrt{n_1}}&Use\;FIR\end{array}\right.\]
- \[CU_0=\left\{\begin{array}{ll}0&No\;FIR\cr f\frac{\sigma}{\sqrt{n_1}}&Use\;FIR\end{array}\right.\]
- Then the lower and upper tabular CUSUM plotted points are:
- \[CL_i=\min(0, CL_{i-1}+\overline{X}_i-(T-k\frac{\sigma}{\sqrt{n_i}}))\]
- \[CU_i=\max(0, CU_{i-1}+\overline{X}_i-(T+k\frac{\sigma}{\sqrt{n_i}}))\]
- where \(f\) is the number of standard deviation for FIR, \(\sigma\) is the process standard deviation,\(n_i\) is the \(i^{th}\) subgroup size, \(\overline{X}_i\) is the mean of the \(i^{th}\) subgroup, \(T\) is the target, and \(k\) is the size of the shift to detect.
- If the previous lower point is smaller than the lower control limit, or the previous upper point is larger than the upper control limit, and you want to reset the signal, then the calculation for \(CL_{i-1}\) and \(CU_{i-1}\) will use \(CL_0\) and \(CU_0\) instead respectively.
- Center Line
- The center line is 0.
- Control Limits
- \[LCL_i=-h\frac{\sigma}{\sqrt{n_i}}\]
- \[UCL_i=h\frac{\sigma}{\sqrt{n_i}}\]
- where \(h\) is the decision interval, \(\sigma\) is the process standard deviation, and \(n_i\) is the \(i^{th}\) subgroup size.
- Plotted Points
V-mask CUSUM
- Plotted Points
- The data plotted in a V-mask CUSUM chart are \(C_i\):
- \[C_i=C_{i-1}+\overline{X}_i-T\]
- where \(\overline{X}_i\) is the mean of the \(i^{th}\) subgroup, \(T\) is the target, and \(C_0=0\).
- V-mask Slope
- \[Slope_i = k\frac{\sigma}{\sqrt{n_i}}\]
- where \(k\) is the slope of the V-mask arm, \(\sigma\) is the process standard deviation, and \(n_i\) is the \(i^{th}\) subgroup size.
- V-mask Width at Origin
- \[Width_i=2h\frac{\sigma}{\sqrt{n_i}}\]
- where \(h\) is the decision interval, \(\sigma\) is the process standard deviation, and \(n_i\) is the \(i^{th}\) subgroup size.
- V-mask Origin
- By default, origin is estimated by number of subgroups.
- Plotted Points
Multivariate Charts
Charts include T^2-Generalized Variance, T^2, Generalized Variance and Multivariate EWMA charts.
T^2-Generalized Variance
Please refer to T^2 and Generalized Variance Charts in the following T^2 and Generalized Variance sections respectively.
T^2
There are \(p\) variables, and \(n\) subgroups (or \(n\) individual observations). Denote \(x_{ij}\) as the mean of the \(i^{th}\) subgroup (individual observation) for the \(j^{th}\) variable, and \(x_j\) as the mean of subgroup means (individual observations) for the \(j^{th}\) variable. First of all, calculate a \(n \times p\) matrix as the following:
- \[A=\begin{bmatrix} x_{11}-x_1 &x_{12}-x_2 & \cdots & x_{1p}-x_p \\ x_{21}-x_1 &x_{22}-x_2 & \cdots & x_{2p}-x_p \\ \vdots & \vdots & \ddots & \vdots \\ x_{n1}-x_1 &x_{n2}-x_2 & \cdots & x_{np}-x_p \end{bmatrix}\]
And transposed matrix of \(A\) is \(A^T\). Sample covariance matrix is \(S\), with inversed matrix as \(S^{-1}\). \(S\) is calculated by:
- \(S=\begin{bmatrix} S_{11} &S_{12} & \cdots & S_{1p} \\ S_{21} &S_{22} & \cdots & S_{2p} \\ \vdots & \vdots & \ddots & \vdots \\ S_{p1} &S_{p2} & \cdots & S_{pp} \end{bmatrix}\), where \(S\) is symmetric matrix by \(p \times p\), and \(S_{jk}=S_{kj}\).
For subgroup data,
- Assume the original data for the \(i^{th}\) subgroup of the \(j^{th}\) and \(k^{th}\) variables are \(a_{ijm}\) and \(a_{ikm}\) respectively, where \(m=1, 2, \cdots, s_i\), \(s_i\) is the size of the \(i^{th}\) subgroup. The covariance between variable \(j\) and \(k\) for the \(i^{th}\) subgroup is calculated as:
- \[Cov_{ijk}=\frac{1}{s_i-1}\sum_m^{s_i} (a_{ijm}-x_{ij})(a_{ikm}-x_{ik})\]
- Then \(S_{jk} = \frac{1}{n}\sum_i^n Cov_{ijk}\)
For individual data, there are \(n\) individual observations,
- \(S_{jk} = \frac{1}{2(n-1)}\sum_i^{n-1}d_{ij}d_{ik}\), where \(d_{ij}\) is the difference between two adjacent data for the \(j^{th}\) variable, calculated by \(d_{ij} = a_{(i+1)j}-a_{ij}\), \(a_{ij}\) is the \(i^{th}\) original data in the \(j^{th}\) variable.
- Plotted Points
- Calculate matrix \(Mat_{T^2} = AS^{-1}A^{T}\), and get diagonal values from this matrix as \(Diagonal(Mat_{T^2})\), and then the \(i^{th}\) plotted point is
- \(T^2_i = s_i * Diagonal(Mat_{T^2})_i\), where \(s_i\) is the size of the \(i^{th}\) subgroup (for individual observation, it is 1).
- Center Line
- The center line for \(T^2\) chart is calculated by \(K \times X\). \(K\) and \(X\) are calculated using different formulas for different data types and different covariance matrix sources. There are \(p\) variables, \(n\) subgroups (observations), and \(s_i\) is the size of the \(i^{th}\) subgroup. \(F^{-1}\) is the inverse cumulative \(F\) distribution. \(B^{-1}\) is the inverse cumulative \(Beta\) distribution.
- Subgroup Data
- Covariance matrix is specified
- \[K_i=\frac{p(n+1)(s_i-1)}{ns_i-n-p+1}\]
- \[X_i=F_{p, ns_i-n-p+1}^{-1}(0.5)\]
- Covariance matrix is estimated
- \[K_i=\frac{p(n-1)(s_i-1)}{ns_i-n-p+1}\]
- \[X_i=F_{p, ns_i-n-p+1}^{-1}(0.5)\]
- Individual Data
- Covariance matrix is specified
- \[K_i=\frac{p(n+1)(n-1)}{n(n-p)}\]
- \[X_i=F_{p, n-p}^{-1}(0.5)\]
- Covariance matrix is estimated
- \[K_i=\frac{(n-1)^2}{n}\]
- \(X_i=B_{p/2, Q}^{-1}(0.5)\), where \(Q = \frac{1}{2}\left[\frac{2(n-1)^2}{3n-4}-p-1\right]\)
- Control Limits
- Upper control limit (UCL) is calculated using different formulas for different data types and different covariance matrix sources. There are \(p\) variables, \(n\) subgroups (observations for individual data), and \(s_i\) is the size of the \(i^{th}\) subgroup. \(F^{-1}\) is the inverse cumulative \(F\) distribution. \(B^{-1}\) is the inverse cumulative \(Beta\) distribution. \(\alpha=0.00134989803156746\).
- Subgroup Data
- Covariance matrix is specified
- \[UCL_i=\frac{p(n+1)(s_i-1)}{ns_i-n-p+1}*F_{p, ns_i-n-p+1}^{-1}(1-\alpha)\]
- Covariance matrix is estimated
- \[UCL_i=\frac{p(n-1)(s_i-1)}{ns_i-n-p+1}*F_{p, ns_i-n-p+1}^{-1}(1-\alpha)\]
- Individual Data
- Covariance matrix is specified
- \[UCL_i=\frac{p(n+1)(n-1)}{n(n-p)}*F_{p, n-p}^{-1}(1-\alpha)\]
- Covariance matrix is estimated
- \(UCL_i=\frac{(n-1)^2}{n}*B_{p/2, Q}^{-1}(0.5)\), where \(Q = \frac{1}{2}\left[\frac{2(n-1)^2}{3n-4}-p-1\right]\)
- Decomposed T^2 Statistic
- There are \(m\) samples (subgroups) out of control points.
- Calculate unconditional \(T^2\) values, denote as \(UT^2\).
- For the \(j^{th}\) variable, extract the principal submatrix of \(S\), as \(S_{xxj}=\begin{bmatrix} S_{11} &S_{12} & \cdots &S_{1(j-1)} &S_{1(j+1)} &\cdots & S_{1p} \\ S_{21} &S_{22} & \cdots &S_{2(j-1)} &S_{2(j+1)} &\cdots & S_{2p} \\ \vdots & \vdots & \ddots & \vdots & \vdots &\ddots & \vdots\\ S_{(j-1)1} &S_{(j-1)2} & \cdots &S_{(j-1)(j-1)} &S_{(j-1)(j+1)} &\cdots & S_{(j-1)p} \\ S_{(j+1)1} &S_{(j+1)2} & \cdots &S_{(j+1)(j-1)} &S_{(j+1)(j+1)} &\cdots & S_{(j+1)p} \\ \vdots & \vdots & \ddots & \vdots & \vdots & \ddots & \vdots\\ S_{p1} &S_{p2} & \cdots &S_{p(j-1)} &S_{p(j+1)} &\cdots & S_{pp} \end{bmatrix}\)
- Denote the inversed matrix of \(S_{xxj}\) as \(S_{xxj}^{-1}\).
- For the \(j^{th}\) variable of the \(i^{th}\) out of control point, calculate a one-row-matrix:
- \(M_{ij}=\begin{bmatrix} x_{i1}-x_1 &x_{i2}-x_2 &\cdots &x_{i(j-1)}-x_{j-1} &\cdots &x_{i(j+1)}-x_{j+1} & \cdots & x_{ip}-x_p \end{bmatrix}\), and denote its transposed matrix as \(M_{ij}^T\).
- Then the unconditional \(T^2\) value for the \(j^{th}\) variable of the \(i^{th}\) out of control point is \(UT_{ij}^2 = s_iM_{ij}S_{xxj}^{-1}M_{ij}^T\), where \(s_i\) is the size of subgroup out of control.
- Calculate decomposed \(T^2\) statistic, denote as \(DT^2\)
- \[DT^2=\begin{bmatrix} T_1^2-UT_{11}^2 &T_1^2-UT_{12}^2 &\cdots &T_1^2-UT_{ip}^2\\ \vdots &\vdots &\ddots &\vdots \\ T_i^2-UT_{i1}^2 &T_i^2-UT_{i2}^2 &\cdots &T_i^2-UT_{ip}^2\\ \vdots &\vdots &\ddots &\vdots \\ T_m^2-UT_{m1}^2 &T_m^2-UT_{m2}^2 &\cdots &T_m^2-UT_{mp}^2 \end{bmatrix}\]
- Calculate \(P\) value of decomposed \(T^2\).
- \(n\) is the number of subgroups (observations for individual data). \(F\) is the cumulative distribution function of \(F\) distribution, and \(B\) is the cumulative distribution function of \(Beta\) distribution.
- Subgroup Data
- If covariance matrix is specified, \(P_{ij} = 1-F_{1, n(s_i-1)}(\frac{DT_{ij}^2*n}{n+1})\)
- If covariance matrix is estimated, \(P_{ij} = 1-F_{1, n(s_i-1)}(\frac{DT_{ij}^2*n}{n-1})\)
- Individual Data
- If covariance matrix is specified, \(P_{ij} = 1-F_{1, n-1}(\frac{DT_{ij}^2*n}{n+1})\)
- If covariance matrix is estimated, \(P_{ij} = 1-B_{0.5, \frac{n-2}{2}}(\frac{DT_{ij}^2*n}{(n-1)^2})\)
- Calculate unconditional \(T^2\) values, denote as \(UT^2\).
Generalized Variance
There are \(p\) variables, and \(n\) subgroups (or \(n\) individual observations). Denote \(x_{ij}\) as the mean of the \(i^{th}\) subgroup (individual observation) for the \(j^{th}\) variable, and \(x_j\) as the mean of subgroup means (individual observations) for the \(j^{th}\) variable.
For subgroup data,
- Assume the original data for the \(i^{th}\) subgroup of the \(j^{th}\) and \(k^{th}\) variables are \(a_{ijm}\) and \(a_{ikm}\) respectively, where \(m=1, 2, \cdots, s_i\), \(s_i\) is the size of the \(i^{th}\) subgroup. The covariance between variable \(j\) and \(k\) for the \(i^{th}\) subgroup is calculated as:
- \[Cov_{ijk}=\frac{1}{s_i-1}\sum_m^{s_i} (a_{ijm}-x_{ij})(a_{ikm}-x_{ik})\]
- Then the sample covariance matrix for the \(i^{th}\) subgroup is
- \[Cov_i = \begin{bmatrix} Cov_{i11} &Cov_{i12} & \cdots & Cov_{i1p} \\ Cov_{i21} &Cov_{i22} & \cdots & Cov_{i2p} \\ \vdots & \vdots & \ddots & \vdots \\ Cov_{ip1} &Cov_{ip2} & \cdots & Cov_{ipp} \end{bmatrix}\]
For individual data,
- \(S\) is the sample covariance matrix of all the data, which is calculated by the formula in T^2 section for individual data.
- Plotted Points
- For subgroup data, the plotted point is the determinant of the sample covariance matrix, \(|Cov_i|\).
- For individual data,
- Normalize the data by \(a'_{ij} = \frac{a_{ij}-\bar{a_j}}{\sqrt{S_{jj}}}\), where \(a_{ij}\) is the \(i^{th}\) observations for the \(j^{th}\) variable, \(\bar{a_j}\) is the mean of the \(j^{th}\) variable, and \(S_{jj}\) is the \(j^{th}\) value of diagonal of \(S\) matrix.
- Plotted point is the square root of variance of each \(i\) observation, that is \(\sqrt{\frac{1}{p-1}\sum_j^p(a'_{ij}-\bar{a'_i})^2}\), where \(p\) is number of variables, \(\bar{a'_i}\) is the mean of the \(i\) observation.
- Center Line
- Subgroup Data
- Center line is the determinant of the sample covariance matrix of all the data, \(|S|\), where \(S\) is calculated by the formula in T^2 section for subgroup data.
- Individual Data
- Center line is the mean of plotted points for individual data.
- Control Limits
- There are \(p\) variables, \(n\) subgroups (observations for individual data), and \(s_i\) is the size of the \(i^{th}\) subgroup. Lower control limit (LCL) and upper control limit are calculated as following.
- Subgroup Data
- \[LCL_i=max(0, \frac{|S|}{b_1}(b_1-3\sqrt{b_2}))\]
- \[UCL_i=\frac{|S|}{b_1}(b_1+3\sqrt{b_2})\]
- where \(b_1=\frac{1}{(s_i-1)^p}\prod_{j=1}^{p}(s_i-j)\)
- \[b_2=\frac{1}{(s_i-1)^{2p}}\prod_{j=1}^{p}(s_i-j)\left[\prod_{j=1}^{p}(s_i-j+2)-\prod_{j=1}^{p}(s_i-j)\right]\]
- Individual Data
- Calculate \(dr = \frac{p}{(p-0.12867704370081)\sqrt{2(p-1)}}\)
- Calculate \(ds = CL * 3 * dr\)
- Then \(LCL = max(0, CL-ds)\), \(UCL=CL+ds\)
- where \(CL\) is the center line value.
Multivariate EWMA
- Plotted Points
- There are \(p\) variables, and \(n\) subgroups. Denote \(x_{ij}\) as the mean of the \(i^{th}\) subgroup for the \(j^{th}\) variable, and \(x_j\) as the mean of subgroup means for the \(j^{th}\) variable. Weight is \(w\). \(S\) is the sample covariance matrix of all the data, which is calculated by the formula in T^2 section. For the \(i^{th}\) subgroup, plotted point is computed using the following sequence forumlas.
- \[x'_{ij} = x_{ij}-x_j, for j=1, 2, ..., p\]
- \[z_{ij} = wx'_{ij} + (1-w)z_{(i-1)j}, for j=1, 2, ..., p, and\ z_{0j}=0\]
- Form a matrix \(Z_i=\begin{bmatrix}z_{i1} & z_{i2} & \cdots & z_{ip}\end{bmatrix}\)
- Weighted covariance matrix \(\Sigma_{Z_i}=\frac{w(1-(1-w)^{2i})}{2-w}S, where\ i=1, 2, ..., n\)
- The \(i^{th}\) plotted point is \(s_iZ_i\Sigma_{Z_i}^{-1}Z_i^T, where\ Z_i^T\ is\ transposed\ matrix\ of\ Z_i, and\ \Sigma_{Z_i}^{-1} is\ inversed\ matrix\ of\ \Sigma_{Z_i}\)
- Control Limits
- The upper control limit for the MEWMA chart is computed by using the algorithm described in the following literature.
- K M. Bodden and S E. Rigdon (1999). A Program for Approximating the In-Control ARL for the MEWMA Chart. Journal of Quality Technology, 31,January, 120−123.