| Library: | spc |
| See also: | spcewma2c spcewma1arl |
| Quantlet: | spcewma2arl | |
| Description: | Computes the Average Run Lengths of a two-sided EWMA chart for a given critical value and for various expected values mu. The data is normally distributed with variance 1. |
| Usage: | arl = spcewma2arl (mu, lambda, c, r) | |
| Input: | ||
| mu | n x 1 vector representing the expected values of the user-defined random variable | |
| lambda | scalar representing the smoothing parameter | |
| c | scalar, critical value | |
| r | scalar, matrix dimension of the approximating two-dimensional Markov chain | |
| Output: | ||
| arl | n x 1 vector of scalars representing the Average Run Lengths of a two-sided EWMA chart | |
; ARLs of a two-sided EWMA chart for different expected values
; mu, smoothing parameters lambda = 0.5 and matrix dimension 50
;(of the approximating two-dimensional Markov chain):
library("spc")
mu =(0:4)/4
c = spcewma2c(100,0.5,50)
arl = spcewma2arl(mu,0.5,c,50)
mu~arl
Contents of _tmp [1,] 0 99.999 [2,] 0.25 63.156 [3,] 0.5 28.91 [4,] 0.75 14.664 [5,] 1 8.6018