Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Still a pretty long winded explanation, though a good one.

I like to think of Bayes' Theorem as akin to scaling "universes". For example, consider trying to determine the probability of someone over 6 feet tall being a woman. First you take the probability of a woman being over 6 feet tall (say 1%) and then you multiply that by the probability of being a woman (say, 50%). Now you have the probability of being a woman AND being over six feet tall scaled to the overall size of the total "universe" (being a human being). Then, if you divide this by the probability of being over 6 feet tall (say, 4%) you'll get the probability of being a woman AND being over six feet tall scaled to the universe where everyone is over six feet tall (12.5%).



Agreed. I didn't really get Bayes' Theorem intuitively until I saw the pictures in this short blog post which emphasizes the idea you pointed out of 'scaling "universes"':

http://oscarbonilla.com/2009/05/visualizing-bayes-theorem/


That was a great explanation! Better than the article I posted, at least.


Awesome explanation. Stats books clearly need more venn diagrams.


I actually got a really good question when I was using set diagrams to explain ideas from logic.

So, I was explaining some logic ideas to a guy on IRC, and he was struggling with the contrapositive rule, which says "if A implies B, then not-B implies not-A." He asked me what this looked like as a set diagram.

I began to teach him how "A implies B" means that whenever you have A, you know you have B. The picture is that B can be bigger, but the situations with A are contained within it, so the picture looks like this: "A is a subset of B." (In symbols, A → B becomes A ⊆ B.)

Now you need to understand that "not A" is the entire region outside the circle of A, and "not B" is the entire region outside the circle of B. And then you have to understand a crazy perspective: that the entire space outside B is now a subset of the entire space outside A.

He was very confused about this, so I explained it this way: There is a story about a physicist, an engineer, a mathematician, and a farmer. The farmer asks all three for a fence containing the largest space for his sheep.

The engineer is first up, builds a square fence using one of the walls of the barn to get a little extra space fenced in. The farmer seems pretty satisfied with this, so they both go to meet the physicist, who has tethered a cord to a peg and is drawing a large circle. "Circles," he points out, "minimize their surface-to-area amount. Actually, I could probably do the same with your barn there, get you a little more space by chopping a chord out of the circle." The farmer says "no, this looks like it will take too long."

They both come over to see the mathematician, who has apparently gotten tangled up in the fence! They start to work to get him out of there -- the farmer asks, "what were you thinking, why did you bend the fence this way, what is wrong with you?!" The mathematician says, "you don't understand -- this is the outside of this fence!"

Suddenly, the idea of flipping "inside" and "outside" seemed to make sense, and I was able to show him that yes, if you take this perspective, the corresponding rule is Bᶜ ⊆ Aᶜ, thus not-B → not-A.

(Another strategy which often works is to leverage moral intuitions, but 'permissions' and 'implications' are opposite arrows. So A → B means "if I know A, then I also know B." Apply this to "Santa only gives presents to good children". Your intuitions all will work much better, save one: you probably would write the above statement as "good child => get presents", following what is permissible for good children, but in logic it actually states "got present → good child", if Santa gave a present then you know that the child was good, but Santa might not give a good child a present, especially if that child is, say, Jewish.)


Simpler: probability is about finding the relative size of a shape.

When you want to know A|B, that means you want to know what fraction of B is taken up by the intersection A-AND-B.

Well, say you happen to know B|A, or how much A-AND-B takes up inside of A. And you also know the size of A relative to the entire page, and B relative to the same.

Then, you can compute the "absolute" size of A-AND-B by multiplying the fraction of A that A-AND-B takes up by the fraction of the page that A takes up.

Now that you know the "absolute" size of A-AND-B, you can freely compare it to lots of other shapes. In this case, you can find A|B as simply as computing A-AND-B/B.

This is identical to your explanation, except I find it helpful to focus less about chance and expectation, and to think more about geometry and sets of outcomes.

Note that my notion of "absolute" size is still just relative. You could measure size relative to any other shape, but "size relative to the entire page" just happens to be a measure that we often know.


That's a good intuition, but I think the author avoided that for some important foundational reasons.

There are two main ways of developing probability theory.

The first way is to use measure theory. This means that probability is literally defined as an area or volume, and leads to the picture you describe. However, it forces you to think of probability as picking from a set of possiblities, and it also means you can arbitrarily carve up a shape or jam infinitely many of them together. You also need to be quite careful, as you may be taking the area of some rather weird shapes.

The second way is to assign "plausibilities" to various propositions, and then use them following a few common-sense rules. This assumes a lot less, but Richard Cox proved it gives the same result as the previous method when they both apply. However, you can now talk about the probability of rain without needing to be able to decompose it into statements about the trajectory of clouds. This also lets you talk about the probability the sun will rise tomorrow or the probability I am typing this from a hot tub without thinking about possible worlds or alternate histories.

The author is a huge proponent of the latter approach, and thus likely tried to avoid talking about shapes or regions.

In high school, you probably learned the classical definition of probability, where, if I say that something happens with probability A/B, it means that, if I do an event infinitely often, on average it will happen A out of B times. This turns out to be too fragile. I can make a die where the probability of rolling an odd number is 1/2 and the probability of rolling a number below 3 is 1/3, but the probability of rolling a 1 is undefined!


I know that there's some subtlety to correctly getting meaning out of probability, and I vaguely remember having similar doubts about my approach because of this.

That said, this simple model didn't fail to explain any of the concepts I learned in elementary discrete and continuous probability. It was especially useful for understanding the latter.

I don't have a lot of brain-RAM, and I find that I get confused the second that I stop focusing on "sets of outcomes". Also, for me, attempts to use "common-sense rules" about expectation seem to fail quickest of all.


I like to think of Bayes' rule in terms of hypotheses and predictions. Take the hypotheses to be "is a woman" and "is not a woman"/"is a man", and the data to be "is over 6 foot tall". Our priors on the to hypotheses are roughly equal (50%). They predict the data with probability 1% (6' given a woman) and 7% (6' given a man). [Hence total probability of 6' is 1%50% + 7%50% = 4%.]

Now, our Woman hypothesis predicts the data more poorly than the Man hypothesis, so we need to update our confidence in the hypotheses appropriately. Bayes' rule tells us that this should be in proportion to how well they predicted the data. Originally we had Woman:Man odds as 1:1, so now it must be 1:7 (or 12.5% for Woman).

If you think of a column plot with hypotheses along the horizontal axis, where the width of each column is proportional to the prior, and the height is proportional to the strength of the prediction of the data. If you then "squash down" the columns, maintaining their area, but so that they all have the same height, the new widths give the posterior probability.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: