This function calculates the overall probability of acceptance for given microbiological distribution such as lognormal.

prob_accept(c, r, t, mu, distribution, K, m, sd)

Arguments

c

acceptance number

r

number of primary increments in a grab sample or grab sample size

t

number of grab samples

mu

location parameter (mean log) of the Lognormal and Poisson-lognormal distributions on the log10 scale

distribution

what suitable microbiological distribution we have used such as 'Poisson gamma' or 'Lognormal'or 'Poisson lognormal'

K

dispersion parameter of the Poisson gamma distribution (default value 0.25)

m

microbiological limit with default value zero, generally expressed as number of microorganisms in specific sample weight

sd

standard deviation of the lognormal and Poisson-lognormal distributions on the log10 scale (default value 0.8)

Value

Probability of acceptance

Details

Based on the food safety literature, for given values of c, r and t, the probability of detection in a primary increment is given by, \(p_d=P(X > m)=1-P_{distribution}(X \le m|\mu ,\sigma)\) and acceptance probability in t selected sample is given by \(P_a=P_{binomial}(X \le c|t,p_d)\).

If Y be the sum of correlated and identically distributed lognormal random variables X, then the approximate distribution of Y is lognormal distribution with mean \(\mu_y\), standard deviation \(\sigma_y\) (see Mehta et al (2006)) where \(E(Y)=mE(X)\) and \(V(Y)=mV(X)+cov(X_i,X_j)\) for all \(i \ne j =1 \cdots r\).

The parameters \(\mu_y\) and \(\sigma_y\) of the grab sample unit Y is given by, $$\mu_y =\log_{10}{(E[Y])} - {{\sigma_y}^2}/2 \log_e(10) $$ (see Mussida et al (2013)). For this package development, we have used fixed \(\sigma_y\) value with default value 0.8.

References

  • Mussida, A., Vose, D. & Butler, F. Efficiency of the sampling plan for Cronobacter spp. assuming a Poisson lognormal distribution of the bacteria in powder infant formula and the implications of assuming a fixed within and between-lot variability, Food Control, Elsevier, 2013 , 33 , 174-185.

  • Mehta, N.B, Molisch, A.F, Wu, J, & Zhang, J., 'Approximating the Sum of Correlated Lognormal or, Lognormal-Rice Random Variables,' 2006 IEEE International Conference on Communications, Istanbul, 2006, pp. 1605-1610.

Examples

  c <-  0
  r <-  25
  t <-  30
  mu <-  -3
  distribution <- 'Poisson lognormal'
  prob_accept(c, r, t, mu, distribution)
#> [1] 0.2637941