Skip to content
recaplica

    One moment: security check

    Cloudflare wants to make sure you're not a robot. Tick the box below and your search will continue on its own.

    IT
    recaplica Bayes Theorem Formula: What It Is and How It Works
    © 2026 Recaplica · recaplica.com — All rights reserved
    Home › Science

    Bayes Theorem Formula: What It Is and How It Works

    By Recaplica Newsroom · Updated on October 15, 2026

    What to print

    Page numbers appear when printing with default margins.

    Slides

    Choose a cut

    Flash10 slidesThe essential thread, to present in classFull14 slidesEvery chapter and the deeper detail

    Both come with speaker notes.

    Telegram channel
    recaplica Clear in 30 seconds, yours in 10 minutes.
    In 30 seconds Key points Figures Deep dive Slides Myths Mind map Quiz Flashcards FAQ

    In 30 seconds quick read

    Bayes theorem connects two opposite conditional probabilities: the chance of observing some evidence if a hypothesis were true, and the chance of that hypothesis being true given the evidence actually observed. It starts from conditional probability, the ratio between the chance that two events happen together and the chance of the second one on its own, and turns it around. It matters whenever you know P(evidence|cause) and want P(cause|evidence), which is exactly the case with diagnostic tests, where a positive result does not automatically mean being sick. The formula is P(A|B) = P(B|A)·P(A)/P(B).

    Key Points

    • Conditional probability of A given B is the ratio between the chance that A and B happen together and the chance of B on its own.
    • Bayes theorem flips a conditional probability around: from P(evidence|hypothesis) to P(hypothesis|evidence).
    • The formula is P(A|B) = P(B|A)·P(A)/P(B), where the vertical bar reads as 'given that'.
    • In a diagnostic test, sensitivity and specificity combine with how common the disease is to estimate the real probability of being sick given a positive result.
    • A test with few false positives can still flag more healthy people than sick ones, if the disease is rare in the tested population.
    • Thomas Bayes's essay was read to the Royal Society in 1763 and published, depending on the source, in 1763 or 1764.

    Key figures

    • about 2% In Lumen Learning / OpenStax's teaching example of 1,000 people with a disease incidence of 0.1%, only 1 of the 51 positive test results comes from a truly sick person: the probability of disease given a positive test is therefore about 1/51, around 2%. It is a constructed example used to illustrate the calculation, not a statistic about a real disease. Source: Lumen Learning / OpenStax

    Deep Dive

    Conditional probability answers a precise question: how likely does an event become once we know that another one has already happened? It is written P(A|B), where the vertical bar reads “given that”, and it is found by dividing the probability that A and B both occur by the probability of B taken on its own. The idea comes up as soon as you learn how to calculate probability, and it often leans on counting rules from combinatorics, because counting the favorable and the possible outcomes is the first step toward any conditional probability.

    Bayes theorem exists to flip that conditional probability around. According to the Stanford Encyclopedia of Philosophy, the theorem starts from how likely a given piece of evidence is if a hypothesis were true — P(evidence|hypothesis) — and arrives at the opposite probability: how likely the hypothesis is, given that evidence — P(hypothesis|evidence). These are two different conditional probabilities: knowing how likely a symptom is if someone is sick does not automatically tell you how likely someone is to be sick if they have that symptom.

    The formula, in the notation used by Wikipedia, is:

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

    Here A is the hypothesis being tested and B is the evidence observed. Using it takes three ingredients: the known conditional probability P(B|A), the “starting” probability of the hypothesis P(A), and the overall probability of the observed evidence P(B).

    Conditional probability in a diagnostic test

    The most common way to grasp Bayes theorem is through a medical test. A real application, cited by the Stanford Encyclopedia of Philosophy, is screening: a test’s sensitivity and specificity — its rates of true positives and true negatives — combined with how common the disease is in the tested population, let you work out how likely someone really is to be sick when the test comes back positive. The same logic runs through plenty of problems in probability and statistics where an observed result has to be traced back to a cause.

    Worked example: picture, as in Lumen Learning / OpenStax’s example, a sample of 1,000 people with a disease incidence of 0.1%. That means expecting only 1 person in the sample to be truly sick, with the other 999 healthy. Say the test has a 5% false-positive rate: applied to the 999 healthy people, it wrongly flags about 50 of them as positive. The test ends up producing roughly 51 positive results in total — the 50 false alarms plus, in most cases, the one person who is truly sick. Out of those 51 positives, only 1 is truly sick: the probability of actually being sick given a positive result works out to about 1/51, around 2%.

    A positive result instinctively sounds like near-certain illness. The test is run on a huge number of healthy people — 999 out of 1,000 — so even a small error margin, applied to such a large group, ends up producing more wrong flags than real cases. It is what happens when a disease is rare in the population being tested, and working that out with real numbers rather than gut feeling is exactly what Bayes theorem is for.

    A bit of history, with one uncertain date

    According to the Stanford Encyclopedia of Philosophy, the English minister Thomas Bayes was the first to grasp the theorem’s importance, in an essay published after his death titled “An Essay Toward Solving a Problem in the Doctrine of Chances,” dated 1764. Wikipedia instead gives 1763 as the publication year, with the title spelled “Towards” instead of “Toward”: the two sources disagree on the publication year.

    Bayes never published the work during his life. After his death, his family passed the papers to his friend Richard Price, a minister and philosopher with a solid grounding in mathematics. Price spent two years editing the unpublished manuscript before it was read to the Royal Society on 23 December 1763. A few years later, in 1774, the French mathematician Pierre-Simon Laplace arrived at the same result on his own, unaware of Bayes’s earlier essay.

    Readers who want to review the basics of number sets that probability and statistics build on will find a good complementary starting point there.

    Slide deck

    Slides ready to download and make your own in PowerPoint or Google Slides, with speaker notes. Pick the Flash cut or the Full one.

    Slide 1 of the presentation on Bayes Theorem Formula: Bayes theoremSlide 2 of the presentation on Bayes Theorem Formula: If the test says you're sick, how likely is it that you really are?Slide 3 of the presentation on Bayes Theorem Formula: A four-stop mapSlide 4 of the presentation on Bayes Theorem Formula: Chapter 01: Conditional probabilitySlide 5 of the presentation on Bayes Theorem Formula: The definition, as a ratioSlide 6 of the presentation on Bayes Theorem Formula: Chapter 02: Bayes's reversalSlide 7 of the presentation on Bayes Theorem Formula: From cause to effect, and backSlide 8 of the presentation on Bayes Theorem Formula: Chapter 03: The diagnostic test exampleSlide 9 of the presentation on Bayes Theorem Formula: Sick · False positives · All positivesSlide 10 of the presentation on Bayes Theorem Formula: Of 51 positive results, only 1 is truly sickSlide 11 of the presentation on Bayes Theorem Formula: An essay read in 1763Slide 12 of the presentation on Bayes Theorem Formula: From screening to a classroom exampleSlide 13 of the presentation on Bayes Theorem Formula: Out of 1,000 people with 0.1% incidence and a test with a 5% false-positive rate, how many test positive in total?Slide 14 of the presentation on Bayes Theorem Formula: Now for the recap
    Flash10 slidesThe essential thread, to present in classFull14 slidesEvery chapter and the deeper detail

    Common myths

    • ✗ Myth A positive test result means the probability of being sick equals the test's accuracy.

      ✓ Reality A test's accuracy (its sensitivity and specificity) is not the same thing as the probability of being sick given a positive result: the latter also depends on how rare the disease is in the tested population, as the 1,000-person example shows, where a test with only a 5% false-positive rate leaves a real probability of disease around 2%.

    • ✗ Myth Conditional probability and the probability that two events happen together are the same thing.

      ✓ Reality They are related but different: joint probability P(A and B) only looks at how likely the two events are to occur together, while conditional probability P(A|B) compares that figure with how likely B is on its own.

    • ✗ Myth Bayes theorem is a recent invention of applied statistics or computer science.

      ✓ Reality Its core goes back to an essay by Thomas Bayes read to the Royal Society in 1763, and the mathematician Pierre-Simon Laplace reached the same result independently in 1774: it is a formula over two centuries old, used today even in medical screening.

    Mind map

    Drag the background to move around and the nodes to reposition them; use − and + to collapse and expand branches.

    Customize
    Mind map: Bayes Theorem Formula: What It Is and How It Works
    • Bayes theorem
      • Conditional probability the starting point
        • Definition
          • P(A and B) over P(B)
          • read as A given B
        • Why it matters
          • updates a probability with new information
      • The reversal
        • From effect to cause
          • starts from P(evidence|hypothesis)
          • arrives at P(hypothesis|evidence)
        • The formula
          • P(A|B) = P(B|A)·P(A)/P(B)
      • The diagnostic test example
        • Starting numbers 1,000 people, 0.1% incidence
          • 1 sick person
          • 999 healthy people
        • The false positives
          • about 50 out of 999
        • The result
          • 51 positives in total
          • only 1 truly sick
      • History and applications
        • Thomas Bayes
          • posthumous essay, 1763 or 1764
          • edited by Richard Price
        • Pierre-Simon Laplace
          • same result, independent, 1774
        • Medical screening
          • sensitivity and specificity with prevalence

    Quiz: test yourself

    Answer the questions to check what you have learned: you get instant feedback and a short explanation.

    Grade 0/10 0/5
    1 What does conditional probability P(A|B) measure?

    P(A|B) answers exactly this question: it compares the probability that A and B occur together with the probability of B on its own, to say how likely A becomes once B is known.

    2 What is Bayes theorem used for?

    The theorem starts from a known conditional probability, such as P(evidence|hypothesis), and turns it into the opposite one, P(hypothesis|evidence).

    3 In the formula P(A|B) = P(B|A)·P(A)/P(B), what does the vertical bar mean?

    In conditional probability notation, the vertical bar reads as 'given that': P(A|B) is the probability of A given that B is true.

    4 Out of 1,000 people with a disease incidence of 0.1% and a test with a 5% false-positive rate, roughly how many test positive in total?

    You would expect 1 person to be truly sick, and among the 999 healthy people, about 50 wrongly flagged as positive: roughly 51 positive results in total.

    5 True or false: a test with a low false-positive rate always guarantees that a positive result means being sick.

    False: as the 1,000-person example shows, if the disease is rare, even a test with few errors ends up flagging more healthy people by mistake than people who are actually sick.

    Answers: 1-A · 2-B · 3-B · 4-C · 5-B

    Flashcards

    Tap the card to flip it and check whether you remember the answer, then move to the next one.

    1 / 8

    Explain it in your own words

    The ultimate test: if you can explain it in simple words, you've truly understood it. Write your explanation, then compare it with the Recap.

    Your explanation is saved only on this device.

    Bayes theorem connects two opposite conditional probabilities: the chance of observing some evidence if a hypothesis were true, and the chance of that hypothesis being true given the evidence actually observed. It starts from conditional probability, the ratio between the chance that two events happen together and the chance of the second one on its own, and turns it around. It matters whenever you know P(evidence|cause) and want P(cause|evidence), which is exactly the case with diagnostic tests, where a positive result does not automatically mean being sick. The formula is P(A|B) = P(B|A)·P(A)/P(B).

    Frequently asked questions

    What is Bayes theorem in simple terms?

    It is the formula that flips a conditional probability around: if you know the probability of observing a certain piece of evidence assuming a hypothesis is true, the theorem calculates the opposite probability, that of the hypothesis given the evidence actually observed.

    What is the difference between conditional probability and Bayes theorem?

    Conditional probability is the underlying concept: the probability of an event given that another has already happened. Bayes theorem is the tool that uses that concept to move from a known conditional probability to its opposite.

    Why doesn't a positive medical test mean you're definitely sick?

    Because that outcome also depends on how many healthy people get flagged by mistake: a rare enough disease lets even a low error rate produce more false alarms than real cases, as in the example of 1,000 people with a 0.1% incidence.

    Who came up with Bayes theorem?

    The English minister Thomas Bayes was the first to work out its importance, in an essay published after his death thanks to his friend Richard Price. The French mathematician Pierre-Simon Laplace reached the same result independently a few years later.

    What is Bayes theorem used for in practice?

    It is used whenever you want to estimate the real probability of a cause from an observed effect: medical screening, where it combines a test's sensitivity and specificity with disease prevalence, is a real application cited by the Stanford Encyclopedia of Philosophy.

    Sources

    • Stanford Encyclopedia of Philosophy — Bayes' Theorem
    • Wikipedia — Bayes' theorem
    • Lumen Learning / OpenStax — Waymaker Math for Liberal Arts

    Every Recap goes through an independent review before publication.

    Every evening, the day's new Recaps on our Telegram channel. Join the channel →

    Keep learning

    • Science Correlation: What It Means and How to Read the Coefficient Correlation measures how closely two variables move together, and the most common way to put a number on it is the correlation coefficient, which runs from -1 to +1. A value near +1 means the two variables rise together, near -1 means one rises while the other falls, and near 0 means no linear relationship stands out. The coefficient only captures the strength of a straight-line relationship, and a single unusual data point can push it up or down by a lot. Even when it's strong, a correlation between two variables never shows that one causes the other. Read the Recap →
    • Science Light Refraction: What It Is, the Laws Behind It, and Examples A surface that separates two transparent materials sends some light back, reflecting it, and lets the rest through while bending it toward a new direction. The law of reflection keeps the incoming and outgoing angles equal, both measured from the normal to the surface. Snell's law governs refraction instead, linking the index of each material to how much the ray tilts before and after it crosses over. These two laws alone explain mirrors, lenses, prisms and everyday sights such as a pencil that appears to snap inside a glass of water. Read the Recap →
    • Science Total Internal Reflection and the Critical Angle: Definition and Formula Total internal reflection is what happens when a light ray stops being able to leave a transparent medium and gets sent back inside it completely. It takes place past a specific angle of incidence, called the critical angle, calculated with Snell's law by comparing the refractive indices of the two materials involved. It only happens under one precise condition: the ray must be traveling from an optically denser medium into a less dense one, such as from water into air or from glass into air. Optical fibers and, in part, the sparkle of diamonds rely on this same principle. Read the Recap →

    recaplica

    Clear in 30 seconds, yours in 10 minutes.

    Recaps Mind maps Request a Recap Telegram channel Mind map maker Our method About Privacy & cookies Legal notes & terms of use

    © 2026 Recaplica · A project by Curi S.r.l. — VAT IT05472000750

    Statistics, only if you say so

    To learn which Recaps help most we would use Google Analytics, with aggregate, anonymous data. It starts only with your OK, and you can change your mind anytime. Privacy policy