Waterfall diagrams and relative odds

Imagine a waterfall with two streams of water at the top, a red stream and a blue stream. These streams separately approach the top of the waterfall, with some of the water from both streams being diverted along the way, and the remaining water falling into a shared pool below.

unlabeled waterfall

Suppose that:

  • At the top of the waterfall, 20 gallons/​second of red water are flowing down, and 80 gallons/​second of blue water are coming down.

  • 90% of the red water makes it to the bottom.

  • 30% of the blue water makes it to the bottom.

Of the purplish water that makes it to the bottom of the pool, how much was originally from the red stream and how much was originally from the blue stream?

if-after(Frequency diagrams: A first look at Bayes): This is structurally identical to the Diseasitis problem from before:

  • 20% of the patients in the screening population start out with Diseasitis.

  • Among patients with Diseasitis, 90% turn the tongue depressor black.

  • 30% of the patients without Diseasitis will also turn the tongue depressor black. <div>

!if-after(Frequency diagrams: A first look at Bayes): This is structurally similar to the following problem, such as medical students might encounter:

You are a nurse screening 100 patients for Diseasitis, using a tongue depressor which usually turns black for patients who have the sickness.

  • 20% of the patients in the screening population start out with Diseasitis.

  • Among patients with Diseasitis, 90% turn the tongue depressor black (true positives).

  • However, 30% of the patients without Diseasitis will also turn the tongue depressor black (false positives).

What is the chance that a patient with a blackened tongue depressor has Diseasitis? <div>

The 20% of sick patients are analogous to the 20 gallons/​second of red water; the 80% of healthy patients are analogous to the 80 gallons/​second of blue water:

top labeled waterfall

The 90% of the sick patients turning the tongue depressor black is analogous to 90% of the red water making it to the bottom of the waterfall. 30% of the healthy patients turning the tongue depressor black is analogous to 30% of the blue water making it to the bottom pool.

middle labeled waterfall

Therefore, the question “what portion of water in the final pool came from the red stream?” has the same answer as the question “what portion of patients that turn the tongue depressor black are sick with Diseasitis?”

if-after(Frequency diagrams: A first look at Bayes): Now for the faster way of answering that question.

We start with 4 times as much blue water as red water at the top of the waterfall.

Then each molecule of red water is 90% likely to make it to the shared pool, and each molecule of blue water is 30% likely to make it to the pool. (90% of red water and 30% of blue water make it to the bottom.) So each molecule of red water is 3 times as likely (0.90 /​ 0.30 = 3) as a molecule of blue water to make it to the bottom.

So we multiply prior proportions of \(1 : 4\) for red vs. blue by relative likelihoods of \(3 : 1\) and end up with final proportions of \((1 \cdot 3) : (4 \cdot 1) = 3 : 4\), meaning that the bottom pool has 3 parts of red water to 4 parts of blue water.

labeled waterfall

To convert these relative proportions into an absolute probability that a random water molecule at the bottom is red, we calculate 3 /​ (3 + 4) to see that 3/​7ths (roughly 43%) of the water in the shared pool came from the red stream.

This proportion is the same as the 18 : 24 sick patients with positive results, versus healthy patients with positive test results, that we would get by thinking about 100 patients.

That is, to solve the Diseasitis problem in your head, you could convert this word problem:

20% of the patients in a screening population have Diseasitis. 90% of the patients with Diseasitis turn the tongue depressor black, and 30% of the patients without Diseasitis turn the tongue depressor black. Given that a patient turned their tongue depressor black, what is the probability that they have Diseasitis?

Into this calculation:

Okay, so the initial odds are (20% : 80%) = (1 : 4), and the likelihoods are (90% : 30%) = (3 : 1). Multiplying those ratios gives final odds of (3 : 4), which converts to a probability of 3/​7ths.

(You might not be able to convert 37 to 43% in your head, but you might be able to eyeball that it was a chunk less than 50%.)

You can try doing a similar calculation for this problem:

  • 90% of widgets are good and 10% are bad.

  • 12% of bad widgets emit sparks.

  • Only 4% of good widgets emit sparks.

What percentage of sparking widgets are bad? If you are sufficiently comfortable with the setup, try doing this problem entirely in your head.

(You might try visualizing a waterfall with good and bad widgets at the top, and only sparking widgets making it to the bottom pool.)

todo: Have a picture of a waterfall here, with no numbers, but with the parts labeled, that can be expanded if the user wants to expand it.

  • There’s (1 : 9) bad vs. good widgets.

  • Bad vs. good widgets have a (12 : 4) relative likelihood to spark.

  • This simplifies to (1 : 9) x (3 : 1) = (3 : 9) = (1 : 3), 1 bad sparking widget for every 3 good sparking widgets.

  • Which converts to a probability of 1/​(1+3) = 14 = 25%; that is, 25% of sparking widgets are bad.

Seeing sparks didn’t make us “believe the widget is bad”; the probability only went to 25%, which is less than 5050. But this doesn’t mean we say, “I still believe this widget is good!” and toss out the evidence and ignore it. A bad widget is relatively more likely to emit sparks, and therefore seeing this evidence should cause us to think it relatively more likely that the widget is a bad one, even if the probability hasn’t yet gone over 50%. We increase our probability from 10% to 25%.<div><div>

if-before(Introduction to Bayes’ rule: Odds form): Waterfalls are one way of visualizing the “odds form” of “Bayes’ rule”, which states that the prior odds times the likelihood ratio equals the posterior odds. In turn, this rule can be seen as formalizing the notion of “the strength of evidence” or “how much a piece of evidence should make us update our beliefs”. We’ll take a look at this more general form next.

!if-before(Introduction to Bayes’ rule: Odds form): Waterfalls are one way of visualizing the odds form of Bayes’ rule, which states that the prior odds times the likelihood ratio equals the posterior odds.

Parents: