Chapter 9 Time-Weighted Control Charts 許湘伶 Statistical Quality Control (D. C. Montgomery)
Introduction I Shewhart control chart: Chap. 5 7: basic SPC methods Useful in phase I implementation( 完成 ) of SPC
Introduction II Disadvantage: use only the information about the process contained in the last sample observation ignores any information given by the entire sequence of points insensitive( 不敏感 ) to small process shift (ex: µ 1 µ 0 1.5σ) less useful in phase II monitoring problems
Introduction III Two effective approaches: small process shift cumulative sum (CUSUM) control chart ( 累積和管制圖 ) exponentially weighted moving average (EWMA) control chart ( 指數加權移動平均管制圖 ) Sometimes called time-weighted control chart
The Cumulative Sum Control Chart I Monitoring the process mean: x 1,..., x 20 N (10, 1 2 ) x 21,..., x 30 N (11, 1 2 ) µ 0 = 10, µ 1 = 11, σ = 1
The Cumulative Sum Control Chart II Table 9.1: small shift; no strong evidence that the process is out of control Shewhart control chart has failed to detect the shift relative small magnitude( 量 ) of the shift Shewhart chart: effective if the shift is 1.5σ to 2σ or larger
The Cumulative Sum Control Chart III CUSUM chart: incorporate( 包含 ) all the information in the sequence of sample values plotting the cumulative sums of the deviations of the sample values from a target value n 1 µ 0 : the target for the process mean C i : the cumulatice sum up to and including the ith sample i i 1 C i = ( x j µ 0 ) = ( x i µ 0 )+ ( x j µ 0 ) = ( x i µ 0 )+C i 1 j=1 j=1 combing information from several samples
The Cumulative Sum Control Chart IV More effective than Shewhart charts for detecting small process shifts; particular with n = 1 In control at µ 0 : C i is a random walk with mean zero µ 0 µ 1 : µ 0 < µ 1 C i 向上趨勢 µ 0 µ 1 : µ 0 > µ 1 C i 向下趨勢
The Cumulative Sum Control Chart V n = 1 x i = x i ; µ 0 = 10 not a control chart; lack of limits
The Cumulative Sum Control Chart VI Two ways to represent CUSUMs: 1. tabular (or algorithmic( 規則系統的 )) CUSUM: preferable 2. V-mask form of the CUSUM: not the best representation of a CUSUM
Tabular CUSUM for µ I CUSUMs: for individual observations; for the average of rational subgroups x i : the ith observation on the process In control: x i N (µ 0, σ 2 ) (σ: known or a reliable estimate is available) Upper-sided CUSUM: C + i = max [ 0, x i (µ 0 + K) + C i 1 + ] Lower-sided CUSUM: C i = max [ 0, (µ 0 K) x i + Ci 1 ] (Minitab: Ci = min(0, x i µ 0 + k + Ci 1 ) C i 0) C + 0 = C0 = 0 µ 1 = µ 0 + δσ Reference value(slack value 寬鬆變數值 ): K = δ 2 σ = µ 1 µ 0 2
Tabular CUSUM for µ II C + i (or C i ) > H the process is out of control H : decision interval K, H : two important parameters for CUSUM 一般取 : K = µ 1 µ 0, H = 5σ 2 Using ARL to choose (K, H )
Tabular CUSUM for µ III
Tabular CUSUM for µ IV require(qcc) data = read.table("table9_1.csv",sep=",",header=t) q = cusum(data,sizes=1,center=10,std.dev=1) summary(q) plot(q, chart.all=false)
Tabular CUSUM for µ V
Tabular CUSUM for µ VI vertical bar: the value of C i +, Ci solid dot: x i =the value of the observations
Tabular CUSUM for µ VII Sample 29: C + 29 = 5.28 > H = 5 且 N + = 7 (the first period) the shift occurred between periods 22-23 (29-7=22)
Tabular CUSUM for µ VIII helpful in determining when the assignable cause has occurred count backward from the out-of-control signal to the time period process shift: adjustment back to the target value µ 0 ˆµ = µ 0 + K + C + i, if C + N + i > H µ 0 K C i N, if C i > H Table 9.2: ˆµ = µ 0 + K + C + i N + = 10 + 0.5 + 5.28 7 = 11.25
Tabular CUSUM for µ IX successive values of C i +, Ci are not independent: sensitizing rules; zone rules; run tests Choosing of K, H : ARL Define K = kσ, H = hσ Using h = 4 or h = 5, k = 1/2: generally provide a CUSUM that has good ARL properties against a shift about 1σ in the process mean
Tabular CUSUM for µ X a 1σ shift: require 43.96 samples to detect the shift for a Shewhart charts
Tabular CUSUM for µ XI h = 4.77 ARL 0 = 370 samples (matches for a Shewhart charts with 3σ limits)
Tabular CUSUM for µ XII Siegmund s approximation: (one-sided CUSUM) ARL = exp( 2 b) + 2 b 1 2 2 0 Upper one-sided CUSUM: = δ k Lower one-sided CUSUM: = δ k δ = (µ 1 µ 0 )/σ (shift in the mean, in the units of σ) b = h + 1.166 if = 0 ARL = b 2 δ = 0 approximate ARL 0 δ 0 approximate ARL 1
Tabular CUSUM for µ XIII ARL +, ARL : ARL of the two one-sided statistics ARL of the two-sided CUSUM: 1 ARL = 1 ARL + + 1 ARL Ex: k = 1/2, h = 5, δ = 0; = δ k = 1/2; b = h + 1.166 = 6.166 ARL + 0 exp [ 2( 1/2)(6.166)] + 2( 1/2)6.166 1 2( 1/2) 2 = 938.2 ARL + 0 = ARL 0 (symmetric) 1 ARL 0 = 1 ARL + 0 + 1 ARL 0 (In Table 9.3: ARL 0 = 465) ARL 0 = 469.1
Tabular CUSUM for µ XIV Ex: the mean shift by 2σ δ = 2 = 1.5(upper), = 2.5(lower) ARL 1 = 3.89
Standardized CUSUM I standardize x i : y i = x i µ 0 σ Standardized Two-Sided CUSUM [ ] C i + = max 0, y i k + C i 1 + [ ] Ci = max 0, k y i + Ci 1 h, k: the choices do not depend on σ Standardized CUSUM: for controlling variability
Improving CUSUM for Large Shifts I CUSUM: effective in detecting small shift; not as effective as the Shewhart chart in detecting large shift Approach for improving the ability to detect large process shifts: combined CUSUM-Shewhart procedure for on-line control Shewhart control limits: ±3.5σ from CL or the target µ0 An out-of-control signal on either (or both) charts: an action signal
Improving CUSUM for Large Shifts II FIR(Fast Initial Response 快速起始反應 or Headstart( 有利的開端 ) Feature): improve the sensitivity of a CUSUM at process start-up C + 0, C 0 : some nonzero value: 一般取 H /2 (50% headstart)
Improving CUSUM for Large Shifts III decline( 下降 ) rapidly to zero from the starting value Period 2 for C i + headstart or Period 3 for C i : unaffected by the
Improving CUSUM for Large Shifts IV Benefit: quickly drop to zero if in control (little effect by the headstart) detect the shift more quickly shorter out-of-control ARL values
Improving CUSUM for Large Shifts V If the process is in control when the CUSUM is reset but shifts out of control later, the more appropriate ARL is Column (a) in Table 9.5
CUSUM for process variability I Hawkins (1981, 1993a): a new standardized quantity v i = yi 0.822 0.349 (H.W.), y i = x i µ 0 σ sensitive to variance changes rather than mean changes approx. In control: v i N (0, 1) (in control distribution) CUSUM for v i : (S + 0 = S 0 = 0 unless a FIR feature is used) S + i = max[0, v i k + S + i 1 ] S i = max[0, k v i + S i 1 ] choose h, k and interpretation is similar to the CUSUM of the mean
Self-Starting CUSUM I Hawkins (1987): easy to implement( 執行 ) x n : the average of the first n observations w n : the sum of squared deviations from x n w n = Recursive form n (x i x n ) 2 i=1 x n = x n 1 + x n x n 1 n w n = w n 1 + (n 1)(x n x n 1 ) 2 n
Self-Starting CUSUM II s 2 n = w n /(n 1): sample variance of the first n observations Standardize new process observation: (n 3) T n = x n x n 1 s n 1 n 1 n T n T n 1 F( ): the cumulative t distribution with n 1 d.f. ( ) n 1 n 1 n 1 P(T n t) = P( n T n t n ) = F t n Φ 1 : the inverse normal cumulative distribution n 1 U n = Φ 1 [F(a n T n )], a n = n plot all values of U n, n 3 on a N(0,1) CUSUM
Self-Starting CUSUM III The users of a self-starting CUSUM should take investigative and corrective action immediately following an out-of-control signal. If the process is not adjusted and the CUSUM reset, the self-starting CUSUM will turn back downward( 往後推移地 ).
EWMA I Exponentially Weighted Moving Average Control Chart Exponentially weighted moving average: z i = λx i + (1 λ)z i 1, 0 < λ 1 z 0 = µ 0 (target value) Sometimes: z 0 = x z i : a weighted average of all previous sample means
EWMA II z i = λx i + (1 λ)[λx i 1 + (1 λ)z i 2 ] = λx i + λ(1 λ)x i 1 + (1 λ) 2 z i 2 i 1 z i = λ (1 λ) j x i j + (1 λ) i z 0 j=0 weights λ(1 λ) j : decreasing geometrically with the age of the sample mean a weighted average of all past and current observations insensitive to the normality assumption
EWMA III i 1 λ j=0 (1 λ) j = 1 (1 λ) i EWMA also called a geometric moving average (GMA) If x i are independent r.v. with variance σ 2 ( ) λ [ σz 2 i = σ 2 1 (1 λ) 2i] 2 λ
EWMA IV EWMA control chart UCL = µ 0 + Lσ Central Line = µ 0 LCL = µ 0 Lσ ( ) λ [1 (1 λ) 2 λ 2i ] ( ) λ [1 (1 λ) 2 λ 2i ] [1 (1 λ) 2i ] i gets large 1: approach steady-state ( ) λ UCL = µ 0 + Lσ 2 λ ( ) λ LCL = µ 0 Lσ 2 λ
EWMA V Example 9.2 λ = 0.10; L = 2.7 µ 0 = 10; σ = 1 z 1 = λx 1 + (1 λ)z 0 = 0.1(9.45) + 0.9(10) = 9.945
EWMA VI i = 1 UCL = µ 0 + Lσ = 10.27 CL = µ 0 = 10 ( LCL = µ 0 Lσ = 9.37 i = 2 UCL = 10.36 CL = µ 0 = 10 LCL = 9.64 ( ) λ [1 (1 λ) 2i ] 2 λ λ 2 λ ) [1 (1 λ) 2i ]
EWMA VII effective against small process shifts L, λ: choose to give ARL performance for the EWMA control chart that closely approximates CUSUM ARL performances for detecting small shifts General: λ [0.05, 0.25] work well in practice ( 通常取 λ = 0.05, 0.10, 0.20) a good rule of thumb( 經驗法則 ): use small values of λ to detect small shifts { L = 3 :works well, when the larger value of λ 2.6 L 2.8 :when λ is small (λ 0.1) λ = 0.1, L = 2.7 ARL 0 500; ARL 1 = 10.3 (detecting a shift of σ, 約與 h = 5, k = 1/2 的 cusum 相同 )
EWMA VIII
EWMA for Variability I Monitoring Variability: exponentially weighted mean square error(ewms) x i N (µ, σ 2 ) S 2 i = λ(x i µ) 2 + (1 λ)s 2 i 1 E(S 2 i ) = σ 2 (for large i) if x i are independent and normally distributed σ 0 : in-control or target value S 2 i σ 2 approx. χ 2 v, v = (2 λ)/λ
EWMA for Variability II EWRMS: exponentially weighted root mean square χ 2 v,α/2 UCL = σ 0 v χ 2 v,1 α/2 LCL = σ 0 v MacGregor and Harris (1993): the EWMS can be sensitive to shifts in both the process mean and the standard deviation Replace µ with ˆµ i at each point in time; a logical estimate of µ: the ordinary EWMA z i S 2 i = λ(x i z i ) 2 + (1 λ)s 2 i 1
Moving average control chart I The moving average of span w at time i: M i = x i + x i 1 + + x i w+1 w V (M i ) = 1 i w 2 V (x j ) = 1 w 2 j=i w+1 The three-sigma control limit for M i UCL = µ 0 + 3σ w LCL = µ 0 3σ 2 i j=i w+1 σ 2 = σ2 w
Moving average control chart II Example 9.3: w = 5