1-Stage Freedom analysis
# FreeCalc: Analyse results of freedom testing

### Inputs are:

### Outputs are:

This utility analyses the results of testing to demonstrate population freedom from disease using imperfect tests and allowing for small populations.

This utility uses the methods described by:

- Cameron and Baldock (1998): A new probability formula for surveys to substantiate freedom from disease.
*Prev. Vet. Med.***34**:1-17; and - Cameron (1999):
*Survey Toolbox for Livestock Diseases - A practical manual and software package for active surveillance of livestock diseases in developing countries.*Australian Centre for International Agricultural Research, Canberra, Australia.

- Size of the population sampled;
- Sample size tested;
- Number tested positive;
- Test sensitivity and specificity;
- Design prevalence (the hypothetical prevalence to be detected). Design prevalence can be specified as either a fixed number of elements from the population or a proportion of the population;
- Maximum acceptable Type I (1 - population-sensitivity) and Type II (1 - population-specificity) error values for determining whether to accept/reject the null or alternative hypothesis, assuming a null hypothesis that the population is diseased;
- Calculation method: hypergeometric (for small populations), or simple binomial (for large populations);
- The population size threshold, above which the simple binomial method is used regardless of which calculation method has been selected; and
- The desired precision of results (number of digits to be displayed after the decimal point).

- The results are displayed in terms of the null and alternate hypotheses, assuming a null hypothesis that the population is diseased;
- The probability of the null hypothesis is the probability of observing this many reactors or fewer, if the population was diseased at a level equal to or greater than the specified design prevalence. If this probability is small, we can conclude that it is very unlikely that the popultion is diseased. If the probability is large, then there is not enough evidence to conclude that the population is free from disease;
- The probability of the alternative hypothesis is the probability of observing this many reactors or more if the poplation was truly disease free. If this is small, then it is very unlikely that the population is free from disease. If it is large, then it is consistent with there being no disease in the population;
- If both null and alternative probabilities are small, it suggests that the population is not free from disease, but the prevalence is less than the design prevalence specified; and
- If both null and alternative probabilities are large, the sample size was too small to distinguish a population with the specified design prevalence from a disease-free population.