1-Stage Freedom analysis
# Population level (or herd, flock, cluster, or other grouping) sensitivity

### Inputs are:

### Outputs are:

This utility calculates a population or cluster level sensitivity for a survey. This is the probability (or level of confidence) that one or more positive units would be detected if the disease was present at a prevalence greater than or equal to the specified design prevalence.

For these calculations unit specificity is assumed to be 100%. For calculating cluster (herd, flock, etc) sensitivity, enter test sensitivity and unit-level design prevalence or for population level sensitivity enter cluster-level (herd) sensitivity and design prevalence.

Calculations use the hypergeometric approximation if population size is provided, or binomial method if population size is not specified.

- Design prevalence as either a proportion or an integer number of units (animals for cluster level sensitivity and clusters for population-level sensitivity);
- Unit sensitivity (test sensitivity to calculate cluster (herd) sensitivity or cluster (herd) sensitivity to calculate population sensitivity;
- Sample size - the number of units sampled (animals or clusters); and
- Population size (optional if design prevalence is specified as a proportion, required if design prevalence is a number of units). Leave population size blank if not known.

- Population-level sensitivity for the given sample size, design prevalence and unit sensitivity; and
- A table and graph of population-level sensitivity values for varying population and sample sizes and the given design prevalence and unit sensitivity.