R/prob_detection_heterogeneous.R
prob_detection_heterogeneous.Rd
prob_detection_heterogeneous
provides a probability of detection in the original sample when samples collected from a heterogeneous batch.
prob_detection_heterogeneous(mu, sd, a, b, f, u, USL, n_sim)
the mean concentration (on the log scale).
the standard deviation of the normal distribution (on the log scale).
lower domain of the number of cell counts.
upper domain of the number of cell counts.
final dilution factor.
amount put on the plate.
upper specification limit.
number of simulations (large simulations provide a more precise estimation).
Probability of detection when sample collected from a heterogeneous batch.
prob_detection_heterogeneous
provides a probability of detection when the diluted sample has heterogeneous contaminants. We define the random variable \(X_{i}\) is the number of colonies on the \(i^{th}\) plate.
In practice, the acceptance for countable numbers of colonies on a plate must be between 30 and 300. Therefore, we can utilise bounded distributions to model the number of colonies on a plate. In the heterogeneous case, we employed truncated Poisson lognormal distribution to model (this section will be updated later on).
mu <- 2
sd <- 0.2
a <- 0
b <- 300
f <- 0.01
u <- 0.1
USL <- 1000
n_sim <- 50000
prob_detection_heterogeneous(mu, sd, a, b, f, u, USL, n_sim)
#> [1] 0.00376