Analysis of simple 2-stage freedom survey

Input Values


Analyse data for a simple 2-stage survey for demonstrating disease freedom. This analysis calculates the overall system sensitivity for the survey and the resulting probability of population freedom from disease. It assumes that a random sample of herds (or all herds) has been selected for testing from the population and that a random sample of animals has been tested within each selected herd. It also assumes that the test system has a specificity of 100% (any positive results are further investigated to exclude false positives) and that no positive results were recorded. The analysis adjusts for imperfect sensitivity of the test used.

For this analysis, a fixed sample size per herd is assumed. If sample size varies between herds use the alternative option, which allows you to include individual herd testing data.

The analysis calculates both herd (the same for all herds) assuming binomial sampling (large herd size relative to sample size). System level sensitivity calculation depends on the available data:

  • where population size (number of herds) is unknown or not specified the binomial calculation (sampling with replacement) is used; or
  • where population size (number of herds) is specified the hypergeometric approximation (sampling without replacement) is used.

Design prevalence (specified level of disease to be detected) must be specified at both animal and herd levels. Animal-level design prevalence must be specified as a proportion. Herd-level design prevalence can be specified as either:

  • a proportion of the population infected; or
  • a specific (integer) number of herds or animals (within herds) infected.


Inputs required include:

  • animal-level design prevalence (as a proportion);
  • herd-level design prevalence and whether this is specified as a proportion or number of herds;
  • the number of herds in the population (if known);
  • the number of herds sampled;
  • the number of animals sampledper herd;
  • the estimated test sensitivity; and
  • the assumed prior probability that the population is free of disease.


Outputs from the analysis include:

  • The herd-level sensitivity (SeH) for each herd tested;
  • Overall system sensitivity (probability of detecting disease if it was present at the specified animal and herd-level design prevalences); and
  • Probability of freedom of the population from disease (at the specified animal and herd-level design prevalences,
Animal-level design prevalence:
Herd-level design prevalence:
Number of herds in population (if known):
Number of herds sampled:
Number of animals sampled per herd:
Test sensitivity:
Prior probability of freedom:


  Home  |   About this site  |   Glossary   |   References   |   Links   |  138 recent calculations

This site was created by Ausvet with funding from a range of sources.
It provides a range of epidemiological tools for the use of researchers and epidemiologists, particularly in animal health.
Please send any comments, questions or suggestions to Evan Sergeant
© 2017 Ausvet