Library: | spc |
See also: | spcewma2arl spcewma2c spcewma2pmf |
Quantlet: | spcewma2pmfm | |
Description: | Computes the probability mass function (PMF, P(L=i)) and the cumulative distribution function (CDF, P(L<=i)) of the two-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, 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 | |
r | scalar, matrix dimension of the approximated two-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 two-sided EWMA run length with ; in-control ARL = 100, smoothing parameter lambda = 0.5 and ; matrix dimension 50(of the approximating two-dimensional ; Markov chain) i=1 to i=10: library("spc") c = spcewma2c(100, 0.5, 50) pLi = spcewma2pmfm(0,0.5,c,10,50) pLi
Contents of pLi [ 1,] 0.0034322 0.0034322 [ 2,] 0.0085387 0.011971 [ 3,] 0.0096811 0.021652 [ 4,] 0.0098146 0.031467 [ 5,] 0.0097582 0.041225 [ 6,] 0.0096677 0.050892 [ 7,] 0.0095716 0.060464 [ 8,] 0.0094753 0.069939 [ 9,] 0.0093798 0.079319 [10,] 0.0092852 0.088604