Visual Proof of Bayes’ Theorem

Harsh Mishra Last Updated : 21 Jun, 2025
6 min read

Have you ever read about Bayes’ theorem and wondered why its proof is so mathematically dense? It’s indeed confusing. Imagine a picture where a canvas of shapes and colours is showing Bayesian reasoning with no equations involved. Now, you will be able to demystify Bayes’ Theorem with intuitive shapes and areas. This supports the fact that conditional probability makes geometric sense. Bayes’ theorem is a fundamental concept in probability, and it’s unexplained to most people mathematically. In this article, we will dive into the world of probability, and that too visually. After reading this article, you will be able to understand Bayes’ Theorem and its proof visually. Now, let’s get started.

Bayes' Theorem Proof

What is Conditional Probability

Before jumping into Bayes’ Theorem, let’s first understand what Conditional Probability is.

Conditional Probability is how likely an event is to happen given that another event has already happened. In simple terms, it is the probability of one event occurring under the condition of another event already occurring. You have information about one event, so it impacts the probability of another event. 

  • Basic Probability: The chance of the occurrence of event A without any prior knowledge is the probability of event A (written as P(A)).
  • Conditional probability: The probability of event A happening given that event B has already happened (written as P(A|B)). 

The following image denotes the mathematical formula for Conditional probability.

P(A|B)

Where, 

P(A∣B) is the conditional probability of event A occurring given that event B has already occurred.

P(A and B) is the joint probability of both event A and event B occurring.

P(B) is the marginal probability of event B occurring.

What is Bayes’ Theorem

Bayes’ Theorem, also known as Bayes’ Rule or Bayes’ Law used to determine the conditional probability of event A when event B has already occurred. In simple terms, it is a way to update your understanding of some event based on new information. It helps you to calculate the probability of a cause (event A) given that you have already observed an effect (event B).

Let’s take a simple example,

  • Your prior belief was that most new restaurants are average 
  • You see a new restaurant having a long line outside, this is your new evidence 

Bayes’ Theorem helps you update your belief; a long line makes it more probable the restaurant is good, revising your initial “average” belief. 

The image shows Bayes’ Theorem:

  • P(A∣B) (Posterior) is the updated probability of event A after considering evidence B.
  • P(B∣A) (Likelihood) is the probability of observing evidence B given that event A is true.
  • P(A) (Prior) is the initial probability of event A before considering any evidence.
  • P(B) (Evidence) is the probability of observing evidence B. The image displays Bayes’ Theorem: P(A∣B)=P(B)P(B∣A)⋅P(A)​.

We finally explored all the prerequisites for understanding Bayes’ Theorem.

Let’s dive into the Bayes’ Theorem Visualization:

Exploring the Visual Diagram

Let’s break the provided visualization into some parts to understand it easily.

Describing the layout 

  • Rectangle denotes the total sample space
  • Diamond = Event A
  • Circle = Event B
  • Overlap (Intersection) = A ∩ B

Mapping Visuals to Math:

  • P(A) = diamond area / full gray area
    It denotes the probability of event A, i.e probability of event A (diamond) divided by the probability of the total sample space (rectangle)
  • P(B) = circle area / full gray area
    It denotes the probability of event B, i.e probability of event B (circle) divided by the probability of the total sample space (rectangle)
  • P(A|B) = overlap / circle area 
    This denotes the conditional probability of event A when event B has occurred. Probability of A ∩ B (overlap) divided by the probability of B (circle)
P(A|B)
  • P(B|A) = overlap / diamond area
    This denotes the conditional probability of event B when event A has occurred. Probability of B ∩ A (overlap) divided by the probability of A (diamond)
P(B|A)

Step-by-Step Derivation

According to the formula of Bayesian probability:

Bayesian Probability Formula

Here, P(A|B) is the overlap area divided by the circle. So we have to prove,

P(A|B)

The following equation, according to Bayes’ Theorem, is also equal to overlap divided by circle, i.e, Left Hand Side (LHS) = Right Hand Side (RHS).

Final Result

Let’s substitute the given shapes into the LHS. After substituting the values with their corresponding shapes defined earlier. We can notice that several similar shapes can be cut out using the fraction rule.

After cutting down the similar images. We are left with an overlap shape divided by the circle shape. This resulting fraction is equal to the P(A|B) that is the required RHS.

Hence, LHS = RHS, and Bayes’ Theorem is proved using shapes and Venn diagrams. It denotes the Visual Proof of Bayes’ Theorem.

Bayes’ Theorem Applications

Bayes’ Theorem is a fundamental concept while studying probability. Although it is an easy concept, its applications show its versatility across various domains.

  • Medical Diagnosis and Testing: In the Medical field, Bayes’ Theorem determines disease probability (e.g., cancer, COVID, diabetes) given test results. It accounts for disease prevalence, test sensitivity, and specificity, that crucial for interpreting the positive/negative results accurately
  • Spam Filtering & Text Classification: The Naive Bayes algorithm evaluates the likelihood of spam based on word frequencies. It’s often more efficient than other algorithms in accuracy. Moreover, it’s easy to implement and robust, even with many features.
  • Search & Rescue Missions: In recent years, search and rescue missions have tremendously used Bayes’ Algorithm to locate missing ships, planes, and hikers. Its mechanisms include models using Bayes’ Theorem to update probable locations using flight paths, weather, and search patterns. It guides the rescuers to decide where to look next. 

Conclusion

Bayes’ theorem proof is just about comparing parts of a whole. When you look at the overlapping shapes, you see how proportions tell the whole story. You can draw your colorful circles and diamonds (or whatever shapes you like) to get random scenarios and see Bayes working in real time, not just in math. Once you play with these visuals, you build intuition easily, and then you’re ready to go deeper into Bayesian inference, like using priors, likelihoods, updating beliefs, and it all starts from simple overlapping areas. Visualizing an equation makes it easier to understand and implement. 

Read more: Bayes’ Theorem for Data Science

Frequently Asked Questions

Q1. What does the purple overlap represent?

A. The joint event A and B (P(A ∧ B)) – the foundation of Bayes’ formula

Q2. How do we get P(A|B) from the diagram?

A. It’s the overlap area divided by the total circle (B) area

Q3. Why is P(A ∩ B) symmetric?

A. Intersection is commutative – order doesn’t matter.

Q4. Can this visual method be extended to more than two events?

A. It gets complex with 3+ events, but mosaic plots or tree diagrams work well

Q5. Why use visuals instead of algebra?

A. Visuals build stronger intuition and help avoid misinterpreting conditional probabilities.

Harsh Mishra is an AI/ML Engineer who spends more time talking to Large Language Models than actual humans. Passionate about GenAI, NLP, and making machines smarter (so they don’t replace him just yet). When not optimizing models, he’s probably optimizing his coffee intake. 🚀☕

Login to continue reading and enjoy expert-curated content.

Responses From Readers

Clear