Processing math: 100%

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.

prob_contaminant(l, r, t, d, p, N, method)

Arguments

l

number of contaminated in t selected samples

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 'systematic' or 'random' selection methods

Value

Probability of contaminated

Details

Let St be the number of contaminated samples and St=Xt where Xt=1 or 0 depending on the presence or absence of contamination, then P(St=l) formula given in Bhat and Lal (1988), also we can use following recurrence relation formula, P(St=l)=P(Xt=1;St1=l1)+P(Xt=0;St1=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).

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.

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)
#> [1] 0.1499949