Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Waffle Chart Visualization

This waffle chart demonstrates how conditional probability differs from total probability. While the total probability P(Event) considers all possible outcomes equally, conditional probability P(Event | Condition) restricts our view to specific regions. When you know which region you are in, the likelihood of the event changes dramatically.

Region A
0.15
P(
| Region A)
P(
|
)
Region B
0.40
P(
| Region B)
P(
|
)
Region C
0.65
P(
| Region C)
P(
|
)
Region D
0.85
P(
| Region D)
P(
|
)

Adjust Distribution

15/100
40/100
65/100
85/100
Understanding conditional probability: Each region has 100 tiles with equal probability P(Region) = 0.25. The
dark blue tiles represent the same event across all regions. P(
|
)
= (dark tiles in that region) / 100. The total probability P(
)
is calculated using the law of total probability: sum of P(Region) × P(
| Region) across all regions. Notice how conditional probabilities vary by region—knowing which region you are in changes the likelihood of the event.

Total: P(
)

Total probability:
0.512
205 of 400 tiles
Law of Total Probability:
P(
) · P(
|
)
+ P(
) · P(
|
)
+ P(
) · P(
|
)
+ P(
) · P(
|
)
= 0.25·0.15 + 0.25·0.40 + 0.25·0.65 + 0.25·0.85
= 0.512




Visualizing Conditional Probability with Waffle Charts

This waffle chart divides the sample space into four equal regions, each containing a 10×10 grid of tiles. Dark blue tiles represent an event occurring. Adjust the probability sliders to change how the event distributes across regions and observe how conditional probability P(Event|Region) differs from total probability P(Event).



Getting Started with the Waffle Chart

This interactive waffle chart visualizes conditional probability through proportional grid displays. The chart divides the sample space into four equal regions (A, B, C, D), each containing a 10×10 grid of 100 tiles.

Dark blue tiles represent an event occurring within each region. The distribution of dark tiles varies by region, controlled by individual sliders. This creates a scenario where the same event has different conditional probabilities depending on which region you're in.

The layout shows all four grids in a row at the top, with controls and statistics below. Each region header displays its conditional probability P(Event | Region), making it easy to compare across regions. The right panel shows total probability calculated using the law of total probability.

Understanding the Grid Structure

Each region contains exactly 100 tiles arranged in a 10×10 grid. Tiles are either the region's background color (event did not occur) or dark blue (event occurred). The number of dark blue tiles directly represents the percentage probability within that region.

The four regions have equal probability:

• P(Region A) = P(Region B) = P(Region C) = P(Region D) = 0.25

Since there are 400 total tiles (100 per region × 4 regions), each individual tile represents 0.25% of the total sample space. The four grids together represent the complete sample space.

Hover over any tile to see it enlarge slightly. This interaction helps you count tiles visually and understand that each square represents an equally likely outcome within its region.

Using the Distribution Sliders

Four sliders in the Adjust Distribution panel control how dark blue tiles distribute within each region:

• Region A slider sets P(Event | Region A)
• Region B slider sets P(Event | Region B)
• Region C slider sets P(Event | Region C)
• Region D slider sets P(Event | Region D)

Moving a slider changes the proportion of dark blue tiles in that region. Tiles redistribute randomly within the region to match the new probability. The count display shows the exact number of dark tiles out of 100.

Try setting different distributions:

• All sliders to 0.50 creates uniform 50% across all regions
• Sliders to 0.80, 0.60, 0.40, 0.20 creates a gradient pattern
• One slider high (0.90) with others low (0.10) concentrates the event in one region

Each configuration produces different insights about conditional versus total probability.

Reading Conditional Probabilities

Each region header displays two equivalent notations for conditional probability:

• P(Dark Blue | Region Name) — verbal form
• P(■ | □) — symbolic form using colored squares

The numerical value shows the exact conditional probability, calculated as:

P(EventRegion)=Dark tiles in region100P(\text{Event} | \text{Region}) = \frac{\text{Dark tiles in region}}{100}


Since each region has 100 tiles, the count of dark tiles directly equals the percentage probability. If Region A has 45 dark tiles, P(Event | Region A) = 0.45.

Compare the conditional probabilities across regions. They typically differ because you've set different distributions with the sliders. This demonstrates that knowing which region you're in changes your probability assessment—the essence of conditional probability.

Total Probability Calculation

The right panel displays total probability P(Event) calculated across all regions. This uses the law of total probability:

P(Event)=iP(Regioni)×P(EventRegioni)P(\text{Event}) = \sum_{i} P(\text{Region}_i) \times P(\text{Event} | \text{Region}_i)


Since each region has equal probability 0.25:

P(Event)=0.25×P(EA)+0.25×P(EB)+0.25×P(EC)+0.25×P(ED)P(\text{Event}) = 0.25 \times P(E|A) + 0.25 \times P(E|B) + 0.25 \times P(E|C) + 0.25 \times P(E|D)


The panel shows each term in the sum, then the final result. The total probability equals the average of the four conditional probabilities (since region probabilities are equal).

The display also shows the raw count: total dark tiles across all regions out of 400. For example, "156 of 400 tiles" corresponds to P(Event) = 0.390.

Conditional vs Total Probability

The key insight from this visualization is how conditional probability differs from total probability. Consider this scenario:

Set Region A to 0.80 and Regions B, C, D to 0.20. The total probability is:

P(Event) = 0.25(0.80) + 0.25(0.20) + 0.25(0.20) + 0.25(0.20) = 0.35

Now imagine you know you're in Region A. Your probability jumps to 0.80—more than double the total probability. If you're in any other region, your probability drops to 0.20—lower than the total.

This demonstrates why conditional information matters. The total probability 0.35 is correct if you don't know which region you're in. But once you know the region (the condition), your probability estimate changes dramatically.

Same Total, Different Distributions

Multiple distributions can produce the same total probability. Compare these two scenarios that both give P(Event) = 0.50:

Uniform distribution:
All regions set to 0.50. Every region has the same conditional probability. Knowing your region provides no information—this is independence.

Concentrated distribution:
Regions A and B set to 0.80, Regions C and D set to 0.20. Total still equals 0.50, but conditional probabilities vary widely.

Both scenarios have the same overall event frequency, but they represent fundamentally different situations. In the concentrated case, the event clusters in certain regions. Knowing which region you're in becomes highly informative.

This illustrates why total probability alone doesn't tell the whole story. The distribution of an event across conditions matters for decision-making and prediction.

Related Tools and Concepts

Waffle charts 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

Independence describes when knowing the condition doesn't change probability

Joint Probability details probability of combined events

Other Visualizations:

Tree Diagrams show conditional probability as branching paths

Venn Diagrams display overlapping regions

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