Baiku

The one thing to know:

Bayesian inference is a powerful way to update your beliefs about something as you get new information, making your understanding more accurate over time.

  1. 1Bayesian inference helps you update your initial belief about a situation using new evidence.
  2. 2It uses a special formula called Bayes' theorem to combine your old belief with how likely the new evidence is.
  3. 3This method is used in many fields, from medicine to spam filters, to make better decisions and predictions.
Bayesian Inference: Updating Your Beliefs with New Information
Image: Gnathan87 · CC0 · via Wikimedia Commons
Colour guide Key idea Key term (tap it) Watch out

Have you ever wondered how doctors can tell you the chances of having a certain illness, even when the test results are not 100% clear? Or how a spam filter learns to catch unwanted emails more effectively over time? It all comes down to a clever way of thinking called . It is a method that helps us make better decisions and predictions by constantly updating our beliefs as we gather new information. Instead of just guessing, it gives us a structured way to combine what we already know with what we just observed.

Key idea: Bayes' theorem is a mathematical rule that updates your initial belief (prior probability) about something based on new evidence, resulting in a more informed belief (posterior probability).

At the heart of Bayesian inference is , a mathematical rule that shows us how to update our beliefs. Think of it like this: you start with an initial idea or belief about how likely something is. This is called your "prior belief" or "prior probability." Then, you observe some new evidence. Bayes' theorem tells you how to combine your prior belief with how likely that evidence would be if your initial idea were true. The result is a new, updated belief, called the "posterior probability."

Let's say you believe there is a 50% chance it will rain today. This is your prior probability. Then, you see dark clouds gathering. How likely are dark clouds if it is going to rain? Very likely! Bayes' theorem helps you calculate your new, higher probability of rain, taking into account those dark clouds. Each new piece of information helps you refine your understanding, bringing you closer to the truth.

Each new piece of information helps you refine your understanding, bringing you closer to the truth.

Quick check

What is the main purpose of Bayesian inference?

Key idea: Bayes' theorem combines your initial belief (prior probability) with the likelihood of observing new evidence to calculate an updated belief (posterior probability).

Let's break down the main parts of Bayes' theorem using a simple example. Imagine you have two bowls of cookies. Bowl 1 has 10 chocolate chip cookies and 30 plain cookies. Bowl 2 has 20 chocolate chip and 20 plain cookies. You pick a bowl at random, then pick a cookie from it at random. The cookie you picked is plain. What is the chance you picked it from Bowl 1?

First, your initial belief: Since you picked a bowl at random, you believe there is a 50% chance you picked Bowl 1 and a 50% chance you picked Bowl 2. These are your .

Next, the evidence: You picked a plain cookie. Now, how likely was it to pick a plain cookie from each bowl? From Bowl 1, it is 30 out of 40 cookies (75%). From Bowl 2, it is 20 out of 40 cookies (50%). These are called .

Bayes' theorem combines these two pieces of information to give you the updated probability that you picked from Bowl 1, now that you know you have a plain cookie. This updated probability is the .

Plain cookies in each bowl
Bowl 1
30
Bowl 2
20

Quick check

In the cookie example, what does the 'prior probability' represent?

The Bayes' Theorem Formula

Key idea: Bayes' theorem provides a specific formula to calculate the posterior probability by multiplying the prior probability by the likelihood and dividing by the total probability of the evidence.

Here is the formula for Bayes' theorem:

Let's use our cookie example to see it in action. We want to find the probability of being in Bowl 1, given that we picked a plain cookie. So, H is "picked Bowl 1" and E is "picked a plain cookie."

P(H) is your prior probability of picking Bowl 1, which is 0.5 (50%).

P(E|H) is the likelihood of picking a plain cookie if you are in Bowl 1, which is 30/40 = 0.75 (75%).

P(E) is the total probability of picking a plain cookie from either bowl. This is a bit trickier: it is the chance of picking plain from Bowl 1 (0.5 0.75) PLUS the chance of picking plain from Bowl 2 (0.5 0.5). So, P(E) = (0.5 × 0.75) + (0.5 × 0.5) = 0.375 + 0.25 = 0.625.

Now, plug these numbers into the formula.

Probability of picking a plain cookie
From Bowl 1
0.75
From Bowl 2
0.5
Bayes' theorem provides a specific formula to calculate the posterior probability.

Putting the Formula to Work

Key idea: Applying Bayes' theorem to the cookie example shows how the probability of being in Bowl 1 increases from 50% to 60% after observing a plain cookie.

Using the numbers from our cookie example:

P(Bowl 1 | Plain Cookie) = (P(Plain Cookie | Bowl 1) × P(Bowl 1)) / P(Plain Cookie)

P(Bowl 1 | Plain Cookie) = (0.75 × 0.5) / 0.625 = 0.375 / 0.625 = 0.6

So, after picking a plain cookie, your updated belief (posterior probability) that you picked from Bowl 1 is 0.6, or 60%. This is higher than your initial 50% belief, which makes sense because Bowl 1 has more plain cookies. This shows how new evidence can shift your understanding.

A common misconception is thinking that the likelihood P(E|H) is the same as the posterior P(H|E). They are different! P(E|H) asks, "If my hypothesis is true, how likely is this evidence?" while P(H|E) asks, "Given this evidence, how likely is my hypothesis?" Bayes' theorem helps us bridge that gap.

Probability of picking Bowl 1
After evidence
0.6
Before evidence
0.5

Quick check

How does Bayes' theorem help correct the common mistake of confusing P(E|H) and P(H|E)?

Why Bayesian Inference Matters

Key idea: Bayesian inference is a versatile tool used across many fields, from medicine to technology, to make more accurate predictions and decisions by continuously learning from new data.

Bayesian inference is not just for cookies; it is used in countless real world situations. In medicine, it helps doctors interpret test results, updating their belief about a patient's disease based on symptoms and lab tests. In technology, it powers spam filters, learning to classify emails as spam or not spam based on words and patterns. It is also used in self driving cars to predict what other cars or pedestrians might do, and in scientific research to refine theories as new data comes in.

The beauty of Bayesian inference is its ability to learn and adapt. With each new piece of data, our understanding becomes more precise, allowing us to make better informed decisions and predictions in a world full of uncertainty.

Applications of Bayesian Inference
Medicine
100
Spam Filters
90
Scientific Research
85
Self Driving Cars
80

Why does this matter?

  • It helps you make better decisions in everyday life by logically combining what you already know with new information, like deciding if you need an umbrella.
  • It is crucial for many technologies, such as spam filters, medical diagnoses, and even self driving cars, making them smarter and more reliable.
  • It provides a structured way to learn from experience, allowing us to refine our understanding of the world as we gather more data.

Ask Baiku

Ask a question and Baiku will answer simply 🙂

⚡ Tap for an instant answer

Test yourself

Building your quiz…

Can you explain these?

Try to explain each in your own words, without looking. The ones you stumble on are exactly where to re-read.

  1. 1Initial belief (Prior)
  2. 2New evidence (Likelihood)
  3. 3Updating beliefs (Bayes' Theorem)
  4. 4Revised belief (Posterior)

Turn this into a learning journey

Go from this one topic to real understanding of Statistics, a step-by-step path you can track and finish.

Build my journey →

Plain & simple

Level

848

Words

4 min

Read

Bayesian Inference: Updating Your Beliefs with New Information · Baiku