Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: spc
See also: spccusum2arl spccusum2c spccusum2pmf spccusum1pmfm

Quantlet: spccusum2pmfm
Description: Computes the probability mass function (PMF, P(L=i)) and the cumulative distribution function (CDF, P(L<=i)) of the two-sided CUSUM chart run length up to a given i. The data are normally distributed with variance 1.

Reference(s):

Usage: pLi = spccusum2pmfm (mu, k, c, Li, r)
Input:
mu scalar, 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 two-dimensional Markov chain.
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.

Note:

Example:
; PMF and CDF of the two-sided CUSUM run length with
; in-control ARL = 100, reference value k = 0.5 and
; matrix dimension 50 and 20(of the approximating two-dimensional
; Markov chain) for i=1 to i=10:
library("spc")
c = spccusum2c(100, 0.5, 50)
pLi = spccusum2pmfm(0,0.5,c,10,20)
pLi

Result:
Contents of pLi
[ 1,]  6.2646e-05  6.2646e-05
[ 2,]  0.001477  0.0015397
[ 3,]  0.0040532  0.0055929
[ 4,]  0.0062739  0.011867
[ 5,]  0.0077653  0.019632
[ 6,]  0.0086693  0.028301
[ 7,]  0.0091827  0.037484
[ 8,]  0.0094527  0.046937
[ 9,]  0.0095747  0.056511
[10,]  0.0096076  0.066119



Author: S. Knoth, 20011010 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006