Library: | spc |
See also: | spccusumCarl spccusumCc spccusumCpmfm spccusum2pmf |
Quantlet: | spccusumCpmf | |
Description: | Computes the probability mass function (PMF, P(L=i)) and the cumulative distribution function (CDF, P(L<=i)) of the Crosier CUSUM chart run length for given i. The data are normally distributed with variance 1. |
Usage: | pLi = spccusumCpmf (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 points 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 at defined points Li. |
; PMF and CDF of the Crosier CUSUM run length with ; in-control ARL = 100, reference value k = 0.5 and ; matrix dimension 50(of the approximating two-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 = spccusumCc(100, 0.5, 50) pLi = spccusumCpmf(0,0.5,c,Li,50) Li~pLi
Contents of _tmp [ 1,] 1 0.00018148 0.00018148 [ 2,] 10 0.0095728 0.07348 [ 3,] 20 0.0086687 0.16429 [ 4,] 30 0.0078188 0.24623 [ 5,] 40 0.0070522 0.32014 [ 6,] 50 0.0063607 0.3868 [ 7,] 75 0.0049143 0.52624 [ 8,] 100 0.0037968 0.63397 [ 9,] 150 0.0022664 0.78151 [10,] 200 0.0013529 0.86958