prob_detect: Probability of detection under the grab sampling method

Description Usage Arguments Details Value See Also Examples

View source: R/prob_detect.R

Description

This function gives the detection probability for t grab samples and given acceptance number under systematic or random sampling methods. This function is also used to calculate the detection probability for primary increments selection by setting the number of primary increments as one.

Usage

1
prob_detect(c, r, t, d, p, N, method)

Arguments

c

acceptance number

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

Details

The detection probability of entire selected grab samples is given by,

P_D=1-[P(S_t=0)+P(S_t=1)+\cdots +P(S_t=c)]

Value

Probability of detection in all seleceted grab samples

See Also

prob_contaminant

Examples

1
2
3
4
5
6
7
8
  c <-  1
  r <-  25
  t <-  30
  d <-  0.99
  p <-  0.005
  N <-  1e9
  method <- 'systematic'
  prob_detect(c, r, t, d, p, N, method)

grabsampling documentation built on March 13, 2020, 5:07 p.m.