Library: | spc |
See also: | spccusumCarl spccusumCc spccusumCpmf |
Quantlet: | spccusumCpmfm | |
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 up to a given i. The data are normally distributed with a variance of 1. |
Usage: | pLi = spccusumCpmfm (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 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 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=1 to i=10: library("spc") c = spccusumCc(100, 0.5, 50) pLi = spccusumCpmfm(0,0.5,c,10,50) pLi
Contents of pLi [ 1,] 0.00018148 0.00018148 [ 2,] 0.0026908 0.0028723 [ 3,] 0.0058804 0.0087527 [ 4,] 0.0078955 0.016648 [ 5,] 0.0089343 0.025582 [ 6,] 0.0094177 0.035 [ 7,] 0.009612 0.044612 [ 8,] 0.00966 0.054272 [ 9,] 0.0096346 0.063907 [10,] 0.0095728 0.07348