prob_contaminant {grabsampling} | R Documentation |
Probability of contaminated sample
Description
This function calculates the probability of exactly l
contaminated samples out of t
selected grab samples for given gram sample size r
and serial correlation d
at the process contamination level p
for a production length of N
.
Usage
prob_contaminant(l, r, t, d, p, N, method)
Arguments
l |
number of contaminated in |
r |
number of primary increments in a grab sample or grab sample size |
t |
number of grab samples |
d |
serial correlation of contamination between the primary increments |
p |
limiting fraction or proportion of contaminated increments |
N |
length of the production |
method |
what sampling method we have applied such as |
Details
Let S_t
be the number of contaminated samples and S_t=\sum X_t
where X_t=1
or 0
depending on the presence or absence of contamination, then P(S_t=l)
formula given in Bhat and Lal (1988), also we can use following recurrence relation formula,
P(S_t=l)=P(X_t=1;S_{t-1}=l-1) + P(X_t=0;S_{t-1}=l)
which is given in Vellaisamy and Sankar (2001). Both methods will be produced the same results. For this package development, we directly applied formula which is from Bhat and Lal (1988).
Value
Probability of contaminated
References
Bhat, U., & Lal, R. (1988). Number of successes in Markov trials. Advances in Applied Probability, 20(3), 677-680.
Vellaisamy, P., Sankar, S., (2001). Sequential and systematic sampling plans for the Markov-dependent production process. Naval Research Logistics 48, 451-467.
See Also
prob_detect_single_grab, correlation_grab
Examples
l <- 1
r <- 25
t <- 30
d <- 0.99
p <- 0.005
N <- 1e9
method <- 'systematic'
prob_contaminant(l, r, t, d, p, N, method)