Exploring Bayes' theorem with Venn Pie Chart

Probabilities, %:

P(A):

P(B|A):

P(B|A'):




Sorry, your browser is not supporting HTML5 canvas!

This is an applet for a blog post

Using Venn Pie Charts to illustrate Bayes' theorem

at oracleaide.wordpress.com.

Here is a classical Bayesian problem from the famous Yudkowsky's "An Intuitive Explanation of Bayes' Theorem":

  • 1% of women at age forty who participate in routine screening have breast cancer.
  • 80% of women with breast cancer will get positive mammographies.
  • 9.6% of women without breast cancer will also get positive mammographies.
  • A woman in this age group had a positive mammography in a routine screening.
  • What is the probability that she actually has breast cancer?


  • The Venn Pie Chart (I admit - I made up the term) describes events presented in the problem using colored overlapping sectors:
  • The pink sector represents frequency of the first event (A), women having breast cancer.
  • The gray sector represents frequency of the second event (B), women having a positive test.
  • The area where sectors overlap (the dark gray sector), represents frequency of the second event given that the first one has happened (B|A or "B given A").
  • Ratios of sector areas (or arcs) represent probabilities of events.
  • How is it different from Venn diagrams or Pie Charts?
  • It is different from a regular Pie Chart because its sectors overlap.
  • It is different from a regular Venn (or, rather, Euler) diagram because it presents sets using sectors, not circles.
  • Just click the "Draw" button, and observe that:
  • Percentage of women with breast cancer - the pink sector - is still just 1%.
  • The most confusing number in the whole problem is 80%.
    It is the dark gray sector - representing women with positive test and cancer. And it covers only part (80% to be precise) of the tiny pink sector, not the whole circle (a.k.a. universe).
  • There is a lot of false positives - the light gray sector, covering 9.6% of the white area (not the whole circle!).

  • Feel free to explore different combinations of probabilities: (50,50,50), (25,25,25), (25,50,25), (30,30,30), (50,0,50).
    Copyright Andrew Batishchev, 2012.
    Some of CSS is courtesy of nicolahibbert.
    (at)gmail: andrew(dot)batishchev