Skip to main content Skip to search Skip to main navigation

Bayes Theorem

Bayes' theorem (also Bayes' rule) is a fundamental principle of probability theory, named after the English mathematician Thomas Bayes (1701 to 1761). It describes how the probability of a hypothesis changes when new information becomes available, for example a test result.

It is extremely useful in genetic diagnostics: it shows the actual predictive value of a test result for the individual animal, and it underlies the calculation of probabilities of parentage and carrier probabilities.

The formula

P(A | B) = P(B | A) × P(A) / P(B)

  • P(A): the probability of hypothesis A before the new information is available (prior probability). Example: how common is a disease in the breed (prevalence)?
  • P(B | A): the probability of observing information B if A is true (likelihood). Example: how often is the test positive in an affected animal (sensitivity)?
  • P(B): the overall probability of observing information B, whether A is true or not.
  • P(A | B): the probability of hypothesis A once information B has been taken into account (posterior probability). Example: how likely is an animal with a positive test actually affected?

Example: how meaningful is a positive test result?

A test detects 99 % of affected animals (sensitivity 99 %) and correctly classifies 99 % of healthy animals as negative (specificity 99 %). The disease occurs in 1 % of animals. Out of 10,000 animals tested:

affected (100 animals)healthy (9,900 animals)
test positive99 (true positive)99 (false positive)
test negative1 (false negative)9,801 (true negative)

Of the 198 animals with a positive result, only 99 are actually affected. Here, a positive result therefore indicates disease with a probability of only 50 % (positive predictive value), although the test itself is very accurate. The reason is the low prevalence of the disease: among many healthy animals, even a few errors carry weight.

For DNA tests for a known mutation, sensitivity and specificity are usually so high that this effect hardly matters. It becomes important for tests with lower accuracy, for very rare diseases and for traits that do not depend on a single mutation alone.

Applications in animal genetics

  • Parentage assessment: Bayes' theorem turns the likelihood ratio (LR) of a parentage analysis into a probability of parentage. With a neutral prior of 50 %: probability of parentage = LR / (LR + 1).
  • Carrier probability: if an animal in a litter is affected by a recessive hereditary disease, both parents are carriers. A healthy littermate is then a carrier not with a probability of 50 % but of 2/3: of the possible genotypes N/N (1/4), N/a (1/2) and a/a (1/4), a/a is ruled out because the animal is healthy, leaving (1/2) / (3/4) = 2/3. Only a DNA test provides certainty.
  • Pedigree calculations: in the same way, the probability that any animal in a pedigree carries a particular variant can be calculated when test results or clinical findings are available for individual relatives.
  • Genetic analyses: Bayesian methods are also used to reconstruct trees in cladistics (see Clade and Cladogram) and in genomic prediction of breeding values.

Useful links - Literature

Lexicon:

Literature:

  • Bayes, T.: An essay towards solving a problem in the doctrine of chances.Philos Trans R Soc Lond 53:370-418, 1763. DOI: 10.1098/rstl.1763.0053
  • Trevethan, R.: Sensitivity, specificity, and predictive values: foundations, pliabilities, and pitfalls in research and practice.Front Public Health 5:307, 2017. DOI: 10.3389/fpubh.2017.00307