prob_accept {grabsampling}R Documentation

Probability of acceptance for grab sampling scheme

Description

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

Usage

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)

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, pd=P(X>m)=1Pdistribution(Xmμ,σ)p_d=P(X > m)=1-P_{distribution}(X \le m|\mu ,\sigma) and acceptance probability in t selected sample is given by Pa=Pbinomial(Xct,pd)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 μy\mu_y, standard deviation σy\sigma_y (see Mehta et al (2006)) where E(Y)=mE(X)E(Y)=mE(X) and V(Y)=mV(X)+cov(Xi,Xj)V(Y)=mV(X)+cov(X_i,X_j) for all ij=1ri \ne j =1 \cdots r.

The parameters μy\mu_y and σy\sigma_y of the grab sample unit Y is given by,

μy=log10(E[Y])σy2/2loge(10)\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 σy\sigma_y value with default value 0.8.

Value

Probability of acceptance

References

Examples

  c <-  0
  r <-  25
  t <-  30
  mu <-  -3
  distribution <- 'Poisson lognormal'
  prob_accept(c, r, t, mu, distribution)

[Package grabsampling version 1.0.0 Index]