Library: | spc |
See also: | spccusum1arl spccusum1c spccusum1pmfm |
Quantlet: | spccusum1pmf | |
Description: | Computes the probability mass function (PMF, P(L=i)) and the cumulative distribution function (CDF, P(L<=i)) of the one-sided CUSUM chart run length for given i. The data are normally distributed with variance 1. |
Usage: | pLi = spccusum1pmf (mu, k, c, Li, r) | |
Input: | ||
mu | scalar representing the expected value of the user-defined random variable | |
k | scalar, reference value. It must be positive and be expressed as a multiple of the standard error. | |
c | scalar, critical value | |
Li | scalar, ARL of a SPC scheme starting in point Li | |
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 CUSUM run length with ; in-control ARL = 100, reference value k = 0.5 and ; matrix dimension 50(of the approximating one-dimensional ; Markov chain) for Li 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 = spccusum1c(100, 0.5, 50) pLi = spccusum1pmf(0,0.5,c,Li,50) Li~pLi
Contents of _tmp [ 1,] 1 0.00040461 0.00040461 [ 2,] 10 0.0095429 0.07499 [ 3,] 20 0.0086407 0.1655 [ 4,] 30 0.007795 0.24718 [ 5,] 40 0.007032 0.32087 [ 6,] 50 0.0063436 0.38735 [ 7,] 75 0.0049034 0.52644 [ 8,] 100 0.0037901 0.63396 [ 9,] 150 0.0022645 0.7813 [10,] 200 0.0013529 0.86934