← Learn AI
C_000036 · mathematical foundations · foundation

Bayesian Inference and Decision Theory

Updating beliefs with Bayes' rule and then choosing the action that minimises expected loss under the resulting posterior.

Step 1 of 5

In words

What it is, why it matters, and what it is like.

Why am I learning this?

You make decisions every day under uncertainty. Do you take an umbrella? Do you approve a loan application? Does this patient have a serious condition? In professional life, these are not guesses; they are calculations based on incomplete information. This topic teaches you how to update your beliefs rationally as new facts arrive, and how to choose actions that minimize regret. It is the framework behind systems that diagnose diseases, filter spam, drive cars, and recommend products. Understanding this helps you evaluate how these systems work and how to trust (or question) their outputs.

The idea, in plain terms

Imagine you need to decide whether a specific email is spam. Before you even open it, you have an initial guess based on your experience — perhaps 20% chance it is junk because your inbox gets flooded occasionally. This starting estimate is what we call a "prior belief" (the word "prior" just means "before").

Then you read the subject line: "URGENT: CLAIM YOUR PRIZE NOW!!!". This is new evidence. You know that legitimate messages rarely use all caps and excessive punctuation. So, this evidence suggests the email is almost certainly spam. You update your guess dramatically, say to 95% probability of being spam. This updated belief is called the "posterior belief" (the word "posterior" means "after"). The math that lets you combine your starting guess with the new evidence to get the updated guess is known as "Bayes' rule".

But knowing the probability isn't enough. You have to act. If you delete the email, two things can happen:
1. It was spam (good outcome: no wasted time).
2. It was important (bad outcome: you missed a critical message).

If you keep it, two other things can happen:
1. It was spam (annoying: you spent time reading junk).
2. It was important (good outcome: you handled a critical matter).

Which action is best? This is where "decision theory" comes in. It asks you to weigh the costs. Let's assign values (losses):
- Deleting real mail: Loss = 100 (missing important info).
- Keeping spam: Loss = 5 (minor annoyance).

If you believe there is a 95% chance it is spam:
- Expected loss of deleting = (5% chance it's real * 100) + (95% chance it's spam * 0) = 5.
- Expected loss of keeping = (5% chance it's real * 0) + (95% chance it's spam * 5) = 4.75.

Here, keeping the email has a lower "expected loss". The expected loss is simply the average cost you would suffer if you made this decision many times under identical conditions. So, rationally, you keep it.

Bayes' rule updates your belief; decision theory helps you act on that belief by calculating which choice minimizes your average future regret.

An analogy

Think of a chef tasting a soup to decide if it needs more salt. The chef has a prior belief about how salty the recipe should be (based on experience). Then the chef tastes the soup (the evidence) and updates their belief about how much salt is actually in there (the posterior belief). Now the chef must decide: add salt, or stop cooking? If they add too much, the soup is ruined (high loss). If they add too little, it is bland but edible (moderate loss). The chef weighs the probability that the soup is currently under-salted against the cost of over-salting it. They choose the action (adding a pinch or stopping) that minimizes the expected disappointment. In this analogy, the "taste" is the data, the "recipe knowledge" is the prior belief, and the "decision to add salt" is the action chosen via decision theory.

Definition

Bayesian inference is the method of updating an initial probability estimate (prior) with new evidence to produce a revised estimate (posterior) using Bayes' rule; decision theory is the process of selecting the optimal action by choosing the option that results in the lowest expected loss, calculated from these updated probabilities.

Where this sits

This concept sits beside "Probability Distributions," which are just mathematical ways to describe how likely different outcomes are, and "Statistics," which is the broader study of collecting and analyzing data. While Probability Distributions give you the language to describe uncertainty, Bayesian inference gives you the tool to update that description as you learn more. Decision theory then uses those updated descriptions to guide action.

Signal from the Frontier

Get the next essay on mind, machine, and meaning

Essays at the intersection of AI, philosophy, and Indian governance. No promotional content.

We'll send a one-click sign-in link to confirm. No password needed.

Views expressed are personal and do not represent the Government of India or the Government of Uttarakhand.