Library: | spc |
See also: | spcewma1arl spcewma1c spcewma1pmfm spcewma2pmf |
Quantlet: | spcewma1pmf | |
Description: | Computes the probability mass function (PMF, P(L=i)) and the cumulative distribution function (CDF, P(L<=i)) of a one-sided EWMA chart run length for given i. The data are normally distributed with variance 1. |
Usage: | pLi = spcewma1pmf (mu, lambda, c, Li, zreflect, r) | |
Input: | ||
mu | scalar representing the expected value of the user-defined random variable | |
lambda | scalar representing the smoothing parameter | |
c | scalar, critical value | |
Li | scalar, ARL of a SPC scheme starting in points Li | |
zreflect | scalar representing a pre-defined border. It is usually less than zero. | |
r | scalar, matrix dimension of the approximating one-dimensional Markov chain. The larger r, the better is the approximation. | |
Output: | ||
pLi | n x 1 vector containing the values of the probability mass function and the corresponding cumulative distribution function at defined points Li. |
; PMF and CDF of the one-sided EWMA run length with ; in-control ARL = 100, smoothing parameter lambda = 0.5 ; and matrix dimension 50(of the approximating one-dimensional ; Markov chain), for i in {1,10,20,30,40,50,75,100,150,200}: library("spc") Li = #(1,10,20,30,40,50,75,100,150,200) c = spcewma1c(100, 0.5, -4, 50) pLi = spcewma1pmf(0,0.5,c,Li,-4,50) Li~pLi
Contents of _tmp [ 1,] 1 0.0045538 0.0045538 [ 2,] 10 0.0092431 0.090645 [ 3,] 20 0.0083528 0.1781 [ 4,] 30 0.0075495 0.25714 [ 5,] 40 0.0068235 0.32858 [ 6,] 50 0.0061673 0.39316 [ 7,] 75 0.0047897 0.5287 [ 8,] 100 0.0037198 0.63398 [ 9,] 150 0.0022436 0.77923 [10,] 200 0.0013533 0.86684