Library: | spc |
See also: | spcewma1arl spcewma1c spcewma1pmf |
Quantlet: | spcewma1pmfm | |
Description: | Computes the probability mass function (PMF, P(L=i)) and the cumulative distribution function (CDF, P(L<=i)) of the one-sided EWMA chart run length up to a given i. The data are normally distributed with variance 1. |
Usage: | pLi = spcewma2pmfm (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 point 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 up to a defined point 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=1 to i=10: library("spc") c = spcewma1c(100, 0.5, -4, 50) pLi = spcewma1pmfm(0,0.5,c,10,-4,50) pLi
Contents of pLi [ 1,] 0.0045538 0.0045538 [ 2,] 0.0092508 0.013805 [ 3,] 0.0099489 0.023753 [ 4,] 0.0099059 0.033659 [ 5,] 0.0097755 0.043435 [ 6,] 0.0096515 0.053086 [ 7,] 0.0095402 0.062627 [ 8,] 0.009437 0.072064 [ 9,] 0.0093387 0.081402 [10,] 0.0092431 0.090645