p | R Documentation |
The p() function calculates the probability of a single sample unit, with weight w, and postulated contamination, C, being contaminated above a target level, G.
p( C, w, G, Sens, D = c("homogeneous", "heterogeneous", "localized"), r = NULL, f = NULL )
C |
suspected lot contamination (CFU/g) |
w |
weight of single sample unit (g) |
G |
target value to detect (CFU/g) |
Sens |
sensitivity of the analytical test (%) |
D |
distribution of the bacteria in the product lot: "homogeneous", "heterogeneous", or "localized" |
r |
for the heterogeneous case only, the degree of heterogeneity. r > 0 |
f |
for the localized case, r is further specified. 0 < f < 1 |
Refer to vignette for details.
A numeric value: the probability of a single sample unit being contaminated above target level.
#A sample of 25 grams (w=25) is collected and analyzed using an analytical #test with sensitivity of 90% (Sens=.9), to detect at least 5 CFU's/g (G=5). #The suspected or postulated level of contamination in the lot is 4 CFU's/g (C=4) #homogeneous case p(C=4,w=25,G=5,Sens=.9,D="homogeneous",r=NULL,f=NULL) # 0.006117884 #heterogeneous case-- dispersion, r, is postulated as 2 p(C=4,w=25,G=5,Sens=.9,D="heterogeneous",r=2,f=NULL) # 0.2576463 #localized case -- 30% of the lot is postulated to be contaminated p(C=4,w=25,G=5,Sens=.9,D="localized",r=NULL,f=.3) # 0.001835365
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.