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: spcewma2arl spcewma2c spcewma2pmfm spcewma1pmf

Quantlet: spcewma2pmf
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 for given i. The data are normally distributed with variance 1.

Reference(s):

Usage: pLi = spcewma2pmf (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 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.

Note:

Example:
; 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) 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 = spcewma2c(100, 0.5, 50)
pLi = spcewma2pmf(0,0.5,c,Li,50)
Li~pLi

Result:
Contents of _tmp
[ 1,]        1  0.0034322  0.0034322
[ 2,]       10  0.0092852  0.088604
[ 3,]       20  0.0083902  0.17646
[ 4,]       30  0.0075814  0.25585
[ 5,]       40  0.0068506  0.32758
[ 6,]       50  0.0061902   0.3924
[ 7,]       75  0.0048045  0.52841
[ 8,]      100  0.003729  0.63398
[ 9,]      150  0.0022464   0.7795
[10,]      200  0.0013533  0.86717



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