Description Usage Arguments Details Value References See Also Examples

View source: R/prob_contaminant.R

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`

.

1 | ```
prob_contaminant(l, r, t, d, p, N, method)
``` |

`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 |

Let *S_t* be the number of contaminated samples and *S_t=∑ 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).

Probability of contaminated

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.

prob_detect_single_grab, correlation_grab

1 2 3 4 5 6 7 8 | ```
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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.