**APPLICATION**

This online application can be used as an aid in sampling planning. The application calculates the probability of detecting disease (or other similar feature) with the given within-group prevalence and sample size for both finite and infinite group sizes. The detection means that at least one of the samples is detected positive. The sensitivity of the testing method can also be taken into account in the case of an imperfect test.

In addition, the application calculates the probability of detecting a population that consists of several groups. The result is based on the assumed number of positive groups in population as well as the number of tested groups, and a total number of groups in the population. In this case, the detection means that at least one of the tested groups is detected positive. It is assummed that all (positive) groups are identical i.e. group size, sample size, and within-group prevalence are equal.

All the calculations are based on the hypergeometric distribution. Implementation of the model is performed in R software, and transformed to web application using Shiny package.

**HOW TO SITE?**

Mikkelä, A. (2024). Probabilistic detection calculator (online application). Zenodo. https://doi.org/10.5281/zenodo.13120206

Contact information: Antti Mikkelä (antti.mikkela@foodauthority.fi)

**HOW TO USE?**

Enter the desired input values in the panel on the left side. Then click the
*Calculate*
button
and the results appear on the screen. The more detailed description of each input variable is given below:

**Group**

1. Number of individuals: The total number of individuals in the studied group

2. Sample size: The total number of the samples taken from a single group in the studied sampling plan

3. Prevalence (%): The assumed proportion of positives in the studied group (design prevalence)

4. Sensitivity of the test (%): The probability of positive test results when tested individual is positive

**Population**

1. Number of groups: The total number of groups in the population

2. Number of tested groups: The total number of tested groups in the population

3. Number of positive groups: The assumed number of positive groups in the population

Note! Group-level results can be calculated independently but population-level results require both group-level and population-level input values

**RESULTS INTERPRETATION**

**Group**

Probability of detecting the tested group (%): The probability that the tested group is detected positive when the chosen sampling plan is applied

Comparative result for the big (infinite size) group (%): The probability that an infinite size group is detected positive with the chosen sampling plan i.e. the lowest possible detection probability regardless of the group size

Graph: Comparison of within-group prevalence and the probability of detection with the given sample size and population size

**Population**

Probability of detecting the studied population (%): The probability that the tested population is detected as positive when the chosen sampling plan is applied

Graph: Comparison of the number of positive groups and the probability of detection with the chosen sampling plan