---
title: "Bayes' Rule and Updating a Belief"
description: "Bayes' rule turns the probability of evidence given a cause into the probability of the cause given the evidence. It explains why a test that is right almost always can still be wrong most of the time"
canonical: https://lightmysky.com/learn/computing/bayes-rule-and-updating-a-belief-mt_A4p5--f7Io
source: https://lightmysky.com/learn/computing/bayes-rule-and-updating-a-belief-mt_A4p5--f7Io.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Bayes' Rule and Updating a Belief

Bayes' rule turns the probability of evidence given a cause into the probability of the cause given the evidence. It explains why a test that is right almost always can still be wrong most of the time it fires, when what it looks for is rare.

Subject: Computing · Area: Machine Learning · Ages 18 to 19
Page: https://lightmysky.com/learn/computing/bayes-rule-and-updating-a-belief-mt_A4p5--f7Io

## Ready when they can

- Compute a posterior from a prior, a likelihood and a rate of false positives
- Explain the base rate effect on a rare condition with an accurate test
- Update a belief twice with two pieces of evidence and get the same answer either order

## Lesson: Flipping what the test tells you

Bayes rule turns the chance of the evidence given the cause into the chance of the cause given the evidence. Multiply the prior by the likelihood, then divide by every way the evidence can fire, hits plus false alarms. The top is the true path to a positive, and the bottom is all paths.

**Example.** Picture a condition in 1 of 100 people and a test that catches 99 of 100 sick ones while flagging 1 of 100 healthy ones. In 10,000 people there are 99 true positives and 99 false ones, so about half of all positives are mistakes. Accuracy on each group separately never promised that a positive means sick.

A false positive flags a healthy person, while a false negative clears a sick one. When the condition is rare, the healthy crowd is huge, so even a tiny false alarm rate buries the true hits. Always weigh a positive against the base rate before you trust it.

**Tip.** Each new result updates the last answer: yesterday posterior becomes today prior. Run the same Bayes step again with the fresh evidence. Because both results just narrow the same crowd, the order you fold them in changes nothing.

**Recap.** Bayes divides true hits by all positives, rare conditions make most positives false, and extra evidence updates the same answer in any order.

## Practice

14 questions on this page, each with its working shown.

## Needs first

- [Joint, Marginal and Conditional Probability](https://lightmysky.com/learn/computing/joint-marginal-and-conditional-probability-mt__Rj-hOSMEw)
- [Likelihood and the Maximum Likelihood Estimate](https://lightmysky.com/learn/computing/likelihood-and-the-maximum-likelihood-estimate-mt_crcBnSqkTE)
- [Conditional Probability, Independence and Bayes' Theorem](https://lightmysky.com/learn/mathematics/conditional-probability-independence-and-bayes-theorem-mt_wIi_XRzwwK)

## Opens up

- [Bayesian Phylogenetics: Priors, Sampling and Judging Convergence](https://lightmysky.com/learn/science/bayesian-phylogenetics-priors-sampling-and-judging-convergence-mt_7jWhYh1n5X)
