Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Venn Diagram Visualization

The sample space Ω is partitioned into compartments. Event A (indigo ellipse) overlaps these compartments differently. Click on any compartment to see P(A | Bᵢ) - the probability of A given that specific compartment.

ΩB₁B₂B₃AArea(A) = 68Area(Ω) = 100Area(A∩B₁) = 18Area(A∩B₂) = 32Area(A∩B₃) = 18
Click on any compartment to see the conditional probability

How This Visualization Works

Interactive Elements: The diagram shows a sample space Ω divided into compartments (B₁, B₂, B₃, etc.). Event A is represented by an indigo ellipse that overlaps multiple compartments. When you click on a compartment, the visualization highlights only the portion of A that intersects with that compartment, showing you the region A ∩ Bᵢ.

Conditional Probability Definition: The conditional probability P(A | Bᵢ) asks: Given that we know event Bᵢ has occurred, what is the probability that A also occurs? This is calculated as P(A | Bᵢ) = P(A ∩ Bᵢ) / P(Bᵢ). When we condition on Bᵢ, we restrict our view to only that compartment, treating it as our new sample space.

Why Probabilities Differ: Notice how P(A | B₁) ≠ P(A | B₂) ≠ P(A | B₃). This happens because event A overlaps each compartment to different degrees. Compartments where A has more overlap will have higher conditional probabilities. This demonstrates that knowing which compartment we are in (the condition) significantly affects the probability of event A.

Law of Total Probability: The total probability P(A) can be computed by summing the contributions from each compartment: P(A) = P(B₁)·P(A|B₁) + P(B₂)·P(A|B₂) + P(B₃)·P(A|B₃) + ... This formula shows that the overall probability of A is a weighted average of its conditional probabilities across all possible conditions (compartments), where each weight is the probability of that compartment.

Total Probability

P(A)
0.68
How Area(A) is calculated:
Area(A∩B₁) = 18
Area(A∩B₂) = 32
Area(A∩B₃) = 18
Area(A) = 18 + 32 + 18
= 68
P(A) from total area:
Area(A) = 68
Area(Ω) = 100
P(A) = 68 / 100
= 0.68
Verification (Law of Total Probability):
P(B₁)·P(A|B₁) = 0.33·0.54 = 0.18
P(B₂)·P(A|B₂) = 0.33·0.96 = 0.32
P(B₃)·P(A|B₃) = 0.33·0.54 = 0.18
Sum = 0.18 + 0.32 + 0.18
= 0.68

Settings

Conditional Probabilities

P(A | B₁)0.54
Step 1: Areas
Area(A ∩ B₁) = 18
Area(B₁) = 33.33
Area(Ω) = 100
Step 2: Convert to probabilities
P(A ∩ B₁) = 18/100 = 0.18
P(B₁) = 33.33/100 = 0.33
Step 3: Calculate conditional
P(A|B₁) = P(A∩B₁)/P(B₁)
= 0.18 / 0.33 = 0.54
P(A | B₂)0.96
Step 1: Areas
Area(A ∩ B₂) = 32
Area(B₂) = 33.33
Area(Ω) = 100
Step 2: Convert to probabilities
P(A ∩ B₂) = 32/100 = 0.32
P(B₂) = 33.33/100 = 0.33
Step 3: Calculate conditional
P(A|B₂) = P(A∩B₂)/P(B₂)
= 0.32 / 0.33 = 0.96
P(A | B₃)0.54
Step 1: Areas
Area(A ∩ B₃) = 18
Area(B₃) = 33.33
Area(Ω) = 100
Step 2: Convert to probabilities
P(A ∩ B₃) = 18/100 = 0.18
P(B₃) = 33.33/100 = 0.33
Step 3: Calculate conditional
P(A|B₃) = P(A∩B₃)/P(B₃)
= 0.18 / 0.33 = 0.54

Law of Total Probability

P(A) =
P(B₁)·P(A|B₁)
+
P(B₂)·P(A|B₂)
+
P(B₃)·P(A|B₃)




Visualizing Conditional Probability with Venn Diagrams

This Venn diagram displays event A as an ellipse overlapping a partitioned sample space. The sample space divides into compartments B₁, B₂, B₃ (and optionally B₄). Click any compartment to see how P(A|Bᵢ) is calculated from the intersection area divided by the compartment area.



Getting Started with the Venn Diagram

This interactive Venn diagram visualizes conditional probability through geometric regions. The rectangular sample space Ω is divided into vertical compartments (B₁, B₂, B₃, etc.), while event A appears as an indigo ellipse that overlaps these compartments to different degrees.

The left side displays the diagram with labeled areas. The middle column shows the total probability P(A) with calculation breakdowns. The right column displays conditional probabilities P(A|Bᵢ) for each compartment with step-by-step formulas.

Click any compartment to highlight the intersection A ∩ Bᵢ and see exactly how conditional probability is calculated from areas. The visualization demonstrates that knowing which compartment you're in changes the probability of event A.

Understanding the Sample Space Partition

The sample space Ω (the entire rectangle) is partitioned into equal-width vertical compartments. Each compartment represents a mutually exclusive event—you can only be in one compartment at a time, and together they cover all possibilities.

With 3 compartments:

• B₁ (blue region) covers the left third
• B₂ (yellow region) covers the middle third
• B₃ (red region) covers the right third

Since compartments have equal area, each has probability P(Bᵢ) = 1/n where n is the number of compartments. With 3 compartments, P(B₁) = P(B₂) = P(B₃) = 0.33.

Use the Settings slider to switch between 2, 3, or 4 compartments. Watch how the ellipse A maintains its shape while the partition changes, creating different intersection patterns and conditional probabilities.

Reading Event A and Intersections

Event A appears as an indigo ellipse positioned to overlap multiple compartments. The ellipse has a fixed shape but intersects each compartment differently based on their positions.

Labels inside the diagram show:

• Area(A) = 68 — the total area of the ellipse (normalized for clean calculations)
• Area(Ω) = 100 — the total sample space area
• Area(A ∩ Bᵢ) — the intersection area for each compartment

The intersection areas vary because the ellipse overlaps each compartment differently. A compartment near the ellipse center has larger intersection than one at the edge. These area differences create the variation in conditional probabilities.

Probability equals area ratio: P(A) = Area(A) / Area(Ω) = 68/100 = 0.68. Similarly, joint probability P(A ∩ Bᵢ) = Area(A ∩ Bᵢ) / Area(Ω).

Clicking Compartments to Explore

Click any compartment to see conditional probability in action. When you click B₂ (for example):

• The compartment highlights with its color
• The intersection A ∩ B₂ shows as a darker region within the ellipse
• The rest of event A fades to show only the relevant portion
• The conditional probability panel for B₂ expands with full calculation

This visualization demonstrates what "given B₂" means geometrically. When we condition on B₂, we restrict our view to only that compartment. The conditional probability P(A|B₂) asks: what fraction of B₂'s area is covered by A?

Click the same compartment again or click elsewhere to deselect and return to the full view showing all intersections simultaneously.

Understanding Conditional Probability Calculations

Each compartment's panel shows the three-step calculation for conditional probability:

Step 1: Areas
• Area(A ∩ Bᵢ) — intersection area from the diagram
• Area(Bᵢ) — compartment area (equal for all compartments)
• Area(Ω) — total sample space area (100)

Step 2: Convert to Probabilities
• P(A ∩ Bᵢ) = Area(A ∩ Bᵢ) / Area(Ω)
• P(Bᵢ) = Area(Bᵢ) / Area(Ω)

Step 3: Calculate Conditional

P(ABi)=P(ABi)P(Bi)P(A|B_i) = \frac{P(A \cap B_i)}{P(B_i)}


Notice how the conditional probabilities differ across compartments even though P(Bᵢ) is the same for all. The variation comes entirely from different intersection areas—compartments with more overlap have higher P(A|Bᵢ).

Total Probability from Intersections

The Total Probability panel shows how P(A) can be calculated by summing contributions from each compartment. This demonstrates the law of total probability:

P(A)=iP(Bi)×P(ABi)P(A) = \sum_{i} P(B_i) \times P(A|B_i)


The panel displays this calculation two ways:

From areas directly:
Area(A) = Area(A ∩ B₁) + Area(A ∩ B₂) + Area(A ∩ B₃)

From probabilities:
P(A) = P(B₁)·P(A|B₁) + P(B₂)·P(A|B₂) + P(B₃)·P(A|B₃)

Both methods yield P(A) = 0.68. The verification section confirms the law of total probability by showing each term and their sum. This demonstrates that total probability is a weighted average of conditional probabilities, weighted by the probability of each condition.

Why Conditional Probabilities Differ

The key insight from this visualization is that P(A|B₁) ≠ P(A|B₂) ≠ P(A|B₃), even though the compartments have equal probability. The difference arises because event A overlaps each compartment to different degrees.

Consider a medical example: A represents having a disease, and B₁, B₂, B₃ represent age groups. If the disease affects middle-aged people most, the "ellipse" of disease overlaps the middle compartment more than the edges. Knowing someone's age group (which compartment) changes the probability estimate.

This is the essence of conditional probability—additional information (which compartment) updates our probability assessment. Independence would mean P(A|Bᵢ) = P(A) for all compartments, which happens only if A overlaps all compartments equally.

Related Tools and Concepts

Venn diagrams connect to several probability concepts and tools on this site:

Theory Pages:

Conditional Probability explains P(A|B) theory in depth

Total Probability covers summing across partitions

Joint Probability details probability of combined events

Independence describes when P(A|B) = P(A)

Other Visualizations:

Tree Diagrams show conditional probability as branching paths

Waffle Charts display proportions in grid format

Contingency Tables organize all probabilities in tabular format

Calculators:

Conditional Probability Calculator computes P(A|B) from inputs

Joint Probability Calculator works with joint distributions