Learn R Programming

eufmdis.adapt (version 0.1.0)

compute_p_value: Compute p value for freedom from disease sample

Description

Compute the probability of drawing no positives in a sample of n items from a Population of N containing n_dis positives.

Usage

compute_p_value(N, n, n_dis)

Value

Returns the probability of not finding any positives in the sample as a numeric between 0 and 1

Arguments

N

Integer; size of the population

n

Integer; size of the sample

n_dis

Integer; number of positives in the population

Author

Ian Kopacka

Details

The probability is computed using the hypergeometric distribution. This function is used in compute_sample_size.

See Also

compute_sample_size