COMUTATION OF THE ERFORMANCE OF SHEWHART CONTROL CHARTS ieer Mulder, Julian Morris and Elaine B. Marin Cenre for rocess Analyics and Conrol Technology, School of Chemical Engineering and Advanced Maerials, Universiy of Newcasle, Newcasle upon Tyne, NE 7RU, UK Absrac: The performance of a conrol char in saisical process conrol is ofen quanified in erms of he Average Run Lengh (). The enables a comparison o be underaen beween various monioring sraegies. These are ofen deermined hrough Mone Carlo simulaion sudies. Mone Carlo simulaions are ime consuming and if oo few runs are performed hen he resuls will be inaccurae. An alernaive approach is proposed based on analyical compuaion. The analyical resuls are compared wih hose of he Mone Carlo simulaions for hree case sudies. Copyrigh 3 IFAC Keywords: Saisical rocess Conrol, Conrol chars, Serial correlaion, Mone Carlo simulaions. INTRODUCTION In Saisical rocess Conrol (SC), a variey of conrol chars have been applied including Shewhar, CUSUM and EWMA (e.g. Mongomery, 99; Weherill and Brown, 99). Each mehod has associaed advanages and disadvanages ha have been repored in he lieraure. Conrol char performance is radiionally quanified in erms of he Average Run Lengh (). Run lengh is defined as he number of observaions from he sar of he conrol char o he firs ou-of-conrol signal. Excep for simple cases (e.g. Broo and Evans, 97; Schmid, 995), Mone Carlo simulaions have been used o deermine he. This involves he realisaion of a vecor conaining a random signal and hen applying he conrol scheme and measuring he run lengh (ime o he firs alarm). This is repeaed many imes, each ime a differen random vecor is generaed, and finally he is compued. The main issue wih his mehod is he rade-off beween compuer ime and accuracy of he resuls. A large number of realisaions are necessary if he resuls are o be precise (Lowry e al, 99; Wardell e al, 994). Therefore i is believed ha an analyical mehod for he compuaion of he would be desirable. The densiy funcion of he run lengh of a conrol char is firs consruced based on he in-conrol probabiliy of an observaion. This approach is similar o ha of Weherill and Brown (99). They assumed ha he in-conrol probabiliy was consan for every observaion. In conras, in his wor, his consrain is relaxed. This allows he compuaion of he for more complicaed SC monioring sraegies, and ulimaely for correlaed daa. The is invesigaed in more deail for hree case sudies. The firs case sudy loos a he of a Shewhar conrol char based on independen daa and is derived for boh he in-conrol and ou-ofconrol siuaion. This example demonsraes he validiy of he approach. The impac of serial correlaion on he performance of conrol chars is well nown (Alwan and Robers, 988; Mongomery and Masralango, 99). One soluion is o esimae an ARMA model (Harris and Ross, 99) for univariae sysems, or a VAR model (Mulder e al, ) for mulivariae sysems, and o monior he residuals, which are free of serial correlaion. In he second case sudy, he focus is on he residuals of a
firs order AuoRegressive, AR(), ime series model as defined by Box e al, (994). E ( ) ( > UCL or < LCL) OC, IC, (5) For he hird case sudy, he of a correlaed ime series generaed by an AR() model is compued. Schmid (995) claimed ha an explici soluion does no exis for he of correlaed daa, and ha only general saemens abou he are possible. In his sudy i will be shown ha alhough here is no an explici soluion for he, here is a numerical approximaion. The analyical resuls are compared wih he resuls of Mone Carlo simulaions for each of he hree case sudies. Based on he following definiion ( UCL > LCL) Equaion is given as: > (6) ( UCL or < LCL) > (7) and equaion 5 is redefined as:. CONTROL CHARTS E ( OC ) ( ), j j (8) The run lengh of a conrol char is defined as he number of observaions unil he firs observaion moves ouside of he conrol limis. Afer his observaion, he conrol char is sopped and calculaion of he run lengh is recommenced from he nex in-conrol observaion. In his secion, he densiy funcion of he run lengh is consruced. The probabiliy ha an observaion, a ime poin,, is given by: ( UCL LCL), is in conrol > > () and he probabiliy ha a poin,, observaion, is ou-of-conrol is defined as: ( > UCL or < LCL) - ( UCL > > LCL), () Also i is assumed ha an observaion is eiher inconrol or ou-of-conrol. In a conrol char, an observaion is only recorded if he previous poin was in-conrol. Tha is an observaion can only be deemed o be in-conrol a ime poin if he observaions a,,, were in conrol: ( > > LCL) ( UCL > > LCL) ( > > LCL) ( UCL > > LCL) IC, UCL UCL (3) Also an observaion a ime poin in a conrol char is ou-of-conrol if: ( > > LCL) ( UCL > > LCL) ( > > LCL) ( > UCL or < LCL) UCL OC, UCL (4) Based on equaions 3 and 4, he Average Run Lengh is he expecaion of he ou-of-conrol run lengh and is given by: This is as described by Weherill and Brown (99), excep ha in equaion 8 can differ for each ime poin,.. Case - Independen Daa For independen daa, he value of an observaion is independen of is previous value, hus for,,,, and equaion 8 becomes: ( ) (9) This resul agrees wih ha of Weherill and Brown (99).. Case - Residuals from an AR() Model An AR() ime series model is given by: y ξ ξ αξ + η + e () where y is he observed daa, ξ is he underlying correlaed ime series, wih α as is auoregressive parameer, and e is a whie noise vecor wih variance σ e, which is assumed o have a Normal disribuion, and η is he mean shif applied o he daa vecor y (Kasavelis, ). The one-sep ahead predicion errors of an AR() model are: e ˆ y y () αξ e + η + e + η αη αξ αη When a process is in-conrol, η, for all, hen he probabiliy ha a ime poin, he process is in-
conrol is consan,,. Therefore he inconrol is given by: ( ) () From equaion and for he desired in-conrol, he conrol limis for he Shewhar conrol chars can be derived. For he ou-of-conrol case, i is assumed ha a consan mean shif is applied o y, η η for all. Thus according o equaion, a, he probabiliy ha, when a mean shif is applied o y, he process is in-conrol is and for,. The mean shif in he residuals for is differen o ha for. Apley and Shi (999) ermed his he faul signaure of a sep change in he residuals for univariae sysems. This issue was no considered by Harris and Ross (99) or Kasavelis (). They assumed ha he mean shif in he residuals is idenical for all. The probabiliy ha he conrol char will give an ou-of-conrol signal a some poin in he fuure is: ( ) + ( ) ( ) + ( ) since ( ) conrol is given by: ( ) for < ( ) + ( ) + ( ) ( ) (3). The ou-of (4) When, i can be seen ha equaion 4 is equivalen o equaion 9 and..3 Case 3 - Serially Correlaed Daa In his secion i will be shown how can be compued for AR() processes via he probabiliy disribuion funcion. I is assumed ha observaions are moniored using a Shewhar conrol char wih an Upper Conrol Limi (UCL) and a Lower Conrol Limi (LCL). The cumulaive disribuion funcion of observaion a ime poin is defined as (apoulis, 99): F x ( x) f ( z) dz (5) where f is he probabiliy densiy funcion of observaion a ime poin. The ime series srucure is defined as in equaion, where α has variance α. A condiion of he conrol char is ha an observaion a is only ploed if he observaion a is in-conrol: UCL > > LCL (6) oherwise he conrol char would have been erminaed a. The condiional disribuion funcion of a is given by: f, cond ( x) F, uncond f ( x) ( UCL) F ( LCL), uncond (7) The probabiliy disribuion funcion of he erm α is defined as (apoulis, 99): g (8) α ( x) f ( x), cond The whie noise erm e is normally disribued wih variance α so ha he uncondiional has uni variance. The probabiliy disribuion funcion of e is denoed as N ( x). Since α and e are independen, he probabiliy disribuion funcion of heir sum, he probabiliy disribuion funcion of, is given by he convoluion produc (apoulis, 99): f x ( x) g ( z) n ( z x) dz (9) The in-conrol probabiliy is hus he probabiliy ha observaion lies beween he conrol limis: F UCL ( UCL) F ( LCL) f ( z) LCL dz () A he sar of a conrol char, no oher observaions are nown. Therefore can be regarded as he uncondiional observaion of, and subsequenly is compued from equaion 5. For >, can be compued recursively by he procedure described above, equaions 7 o 9. 3. RESULTS In his secion, he heoreical relaionships derived in he previous secion are compared wih he resuls from Mone Carlo simulaions. For all Mone Carlo simulaions, realisaions of he conrol chars were compued. Each realisaion comprised, observaions and he firs observaion ouside he
conrol limis was aen o define he run lengh for ha realisaion. Since he is he mean value of he run lenghs of he realised conrol chars, he sandard error of he is: σ () N where N is he number of realisaions. Error bars will hus indicae he sandard error of he Mone Carlo simulaions. For he hree cases i is assumed ha he meric, he daa in case and 3, and he residuals in case, are moniored using a Shewhar conrol char. For each case i is assumed ha he meric used in he conrol char is normally disribued and ha he desired in-conrol is equal o 37. This corresponds o a Shewhar conrol char wih conrol limis a 3σ and + 3σ. heoreical resuls correspond wih hose from he Mone Carlo simulaions. 3. Case - Residuals from an AR() Model. The desired in-conrol is 37. I is assumed ha a sep funcion of size η is superimposed on he ime series y : η (4) η η > From equaion 4, for eˆ ~ N η, σ e and for, eˆ ~ N( η ( α), σ e ). Togeher wih Equaion 5, his allows he compuaion of for all. The is compued from equaion 4., ( ) 3. Case - Independen Daa The observaions,, are drawn from a populaion wih a normal disribuion ha are offse by a mean shif, η. The mean of he disribuion is equal o η and is variance is σ : (, σ ) ~ N η () α -.9 α -.5 α α.5 α.9 The probabiliy ha lies beween he conrol limis is given by: F UCL ( UCL) F( LCL) f ( ξ ) LCL dξ (3) where f is he probabiliy disribuion funcion of, he normal disribuion. Subsequenly he can be compued from equaion 5..5.5.5 3 3.5 4 4.5 5 Meanshif (σ y ) Fig.. erformance of Shewhar conrol char for he residuals of an AR() model. The as a funcion of he mean shif for several values of alpha is shown in Fig, ogeher wih he resuls from he Mone Carlo simulaions. The error bars indicae he resuls of he Mone Carlo simulaions wih 3/+3 sandard error of he mean. The solid line indicaes he heoreical calculaion. Again i can be seen ha he heoreical resuls correspond o hose from he Mone Carlo simulaions. 3.3 Case 3 - Serially Correlaed Daa..5.5.5 3 3.5 4 4.5 5 Meanshif (σ x ) Fig.. erformance of Shewhar conrol char for independen daa. The as a funcion of he mean shif is shown in Fig.. The dos represen he resuls of he Mone Carlo simulaion wih error bars ha indicae 3/+3 sandard error of he mean and he solid line is he heoreical compuaion. I can be seen ha he The as a funcion of he mean shif was deermined in he previous wo cases. In his case sudy, he influence of serial correlaion on he inconrol was invesigaed. In conras o cases and, here is no direc analyical relaionship for he. Therefore a numerical approach was used. I is assumed ha he probabiliy disribuion funcion of for he firs observaion is ha of he normal disribuion wih mean zero and uni variance. Based on equaions 7 o, he probabiliy disribuion funcion of he second observaion is compued. Then is compued from equaion 5. These seps are repeaed unil converges. The values of
are hen used in equaion 8 o compue he. 8 8 7 7 6 6 5 4 - -.8 -.6 -.4 -...4.6.8 α Fig. 3. The in-conrol of Shewhar conrol chars for serial correlaed daa. The as a funcion of α is given in Fig. 3, ogeher wih he resuls from he Mone Carlo simulaions. The dos represen he Mone Carlo simulaions and he error bars indicae 3/+3 sandard error of he mean and he solid line indicaes he heoreical calculaion. Again i can be seen ha he heoreical resuls correspond o hose from he Mone Carlo simulaions. 4 α α.7 α.9.5.5.5 3 Conrol Limi (σ y ) Fig. 4. The in-conrol as funcion of he conrol limi for a selecion of values for α. As can be observed in Fig. 3, he in-conrol only depends on he absolue value of α. I also can be seen ha for increasing α, he in-conrol increases. This means ha on average i aes longer o deec a false alarm. Alhough his migh appear advanageous, in pracice he in-conrol can be considered as a design parameer since i is implied by he choice of significance level δ. For independen and idenical daa, he in-conrol is /δ, bu for serially correlaed daa his relaionship is no valid. Kasavelis () proposed an alernaive philosophy which was o rea he in-conrol as an explici design parameer. The above mehod allows he rapid compuaion of he for a range of values for he conrol limis. In Fig. 4, he as a funcion of he conrol limi is shown for seleced values of α. The conrol limi is given in erms of he sandard deviaion of y. From his figure he conrol limis for an AR() process can be deermined. Table Conrol limis o guaranee an in-conrol of 37 for AR() process α Conrol Limi α Conrol Limi 3..5.98. 3..6.96. 3..7.93.3 3..8.86.4.99.9.7 Since he calculaions of he closely mach he resuls of he Mone Carlo simulaion, Fig. 5, he impac of he mean shif on he is invesigaed in greaer deail wihou furher comparisons being underaen wih simulaions. In Fig. 5 he solid line refers o he heoreical calculaions and he dos wih arrow bars are he Mone Carlo simulaions wih he associaed hree sandard errors of he mean No meanshif Meanshif Meanshif - -.8 -.6 -.4 -...4.6.8 α Fig. 5. The as a funcion of alpha wih adjused conrol limis, wih various mean shifs applied on he ime series y. The of a Shewhar conrol char wih he conrol limis as given in Table are shown in Fig. 5 where various mean shifs are applied o he ime series daa, y. In his siuaion, he conrol limi for negaive α is equal o ha of is posiive counerpar. The calculaions are in agreemen wih he Mone Carlo simulaions. When no mean shif is applied, which corresponds o he in-conrol siuaion, he calculaions do no give exacly 37, because of he rounding of he conrol limi o wo decimals in Table. Compared wih Fig 3, he in-conrol does no deviae from 37. In Fig. 6, he is shown as a funcion of he mean shif and α. I can be observed ha he is only dependen on he mean shif and no on α, excep for large posiive values of α. Thus a Shewhar conrol char wih conrol limis adjused o ensure he desired in-conrol will exhibi he same sensiiviy for equal sized mean shis regardless of he value of α. In pracice he auoregressive parameer, α, is deermined by eiher maching he auocorrelaion funcion (Kasavelis, ) or hrough esimaion of he auoregressive parameer of an AR() process from he daa.
5. ACKNOWLEDMENTS M acnowledges he EU projec ERFECT (Espri rojec 887) for supporing his hd sudies. 6. REFERENCES Fig. 6. The heoreically compued as a funcion of alpha and he mean shif. 4. CONCLUSIONS Wihin he paper, i is shown, based on he in-conrol probabiliy a individual poins in a conrol char, how he densiy funcion of he run lengh of conrol chars can be deermined. The densiy funcion can consequenly be used o calculae he Average Run Lengh () of a conrol char. The is a widely used meric for comparing beween monioring sraegies in SC. The proposed approach is more generic han ha described by Weherill and Brown (99). The heoreical for in-conrol daa and ou-of conrol daa wih sep changes in he mean were calculaed for hree cases, independen daa, he residuals of AR() models and serially correlaed daa. The heoreical resuls corresponded o he obained hrough Mone Carlo simulaions. I is also shown ha, in conras o he claim of Schmid (995), he of serial correlaed daa in-conrol chars can be compued. The in-conrol s were compued as a funcion of he magniude of he conrol limis. The conrol limis for Shewhar chars ha realise an in-conrol of 37 were deermined for various values of auoregressive parameer for an AR() process. The impac of mean shifs on he performance of he was subsequenly invesigaed. I was found ha he depends only on he mean shif and no on α, excep for large posiive values of α. The oucome of his wor is ha ime consuming Mone Carlo simulaions can now be replaced by he approach proposed for he assessmen of he performance of conrol chars. This wor can also be exended o more complicaed SC monioring schemes, such as mulivariae sysems. However for mulivariae problems, he problem is compounded by he fac ha he parameer space may be large maing he problem compuaionally inensive. Alwan, L.C. and H.V. Robers (988). Time series modeling for saisical process conrol. Journal of Business and Economic Saisics, 6, pp. 87-95. Apley, D.W. and Shi, J. (999). The GLRT for saisical process conrol of auocorrelaed processes. IIE Transacions, 3(), pp. 3-34. Box, G.E.., G.M. Jenins and G.C. Reinsel (994). Time series analysis: Forecasing and conrol, renice Hall, Englewood Cliffs, NJ, USA. Broo, D. and D.A. Evans (97). An approach o he probabiliy disribuion of CUSUM run lengh. Biomeria, 59(3), pp. 539-549. Harris, T. J., and Ross, W. H. (99). Saisical process-conrol procedures for correlaed observaions. Canadian Journal of Chemical Engineering, 69(), pp. 48-57. Kasavelis, E. (). Saisical monioring and predicion of perochemical processes. hd, Universiy of Newcasle, Newcasle upon Tyne, UK. Lowry, C. A., W.H. Woodall, C.W. Champ and S.E. Rigdon (99). A mulivariae exponenially weighed moving average conrol char. Technomerics, 34(), pp. 46-53. Mongomery, D.C. (99). Inroducion o saisical qualiy conrol, John Wiley & Sons, Singapore. Mongomery, D.C. and C.M. Masrangelo (99). Some saisical process-conrol mehods for auocorrelaed daa. Journal of Qualiy Technology, 3(3), pp. 79-93. Mulder,., E.B. Marin and A.J. Morris (). The monioring of dynamic processes using mulivariae ime series. Advances in rocess Conrol 6, Yor, UK, pp. 94-. apoulis, A. (99). robabiliy, random variables, and sochasic processes, McGraw-Hill, New Yor. Schmid, W. (995). On he run-lengh of a shewhar char for correlaed daa. Saisical apers, 36(), pp. -3. Wardell, D. G., H. Mosowiz and R.D. lane (994). Run-lengh disribuions of special-cause conrol chars for correlaed processes. Technomerics, 36(), pp. 3-7. Weherill, G.B. and D.W. Brown (99). Saisical process conrol: Theory and pracice, Chapman and Hall, London, UK.