TOOL
Bayes update on a grid
๐ ๏ธ Bayes update on a grid
๐ก Use Case
- Twenty lines that made ๐ Lecture 14 - Updating beliefs with Bayes land: a prior, some data, a posterior you can see.
- I came back to that lecture on 21 October after Hamburg and a cold, two weeks behind, and understood the algebra of ๐ Bayes' rule without believing it. On the Wednesday I typed this out and watched a flat line turn into a hill.
- Since then it is the first thing I open when a question is how sure should we be after this little data. That question is the whole of ๐ญ Bayesian thinking for product bets.
How I use it
- Make a grid of 100 candidate rates between 0 and 1.
- Give each a prior weight. Flat to begin with.
- For each candidate, work out how likely the observed data would be if that rate were true.
- Multiply prior by likelihood.
- Divide by the total so the weights sum to one.
- Plot prior and posterior on the same axes.
prior ________________________ flat
data 7 successes in 10 tries
posterior _______/โพโพโพ\____ a hill around 0.7, and wide
The thing I finally saw
Seven out of ten does not say 70 percent. It says probably somewhere between a half and nine in ten, and the hill shows exactly how probably.
โ๏ธ Pros & Cons
Pros
- No formula for the answer. It tries a hundred candidate values and weighs each one, which is what the rule says to do.
- Change the prior, run it again, and see how much the prior mattered. With ten observations: a lot. With five hundred: hardly.
- Short enough to retype from memory, which I did for the final.
Cons
- One unknown only. Two unknowns and the grid becomes a table, three and it becomes a bad idea.
- It makes a prior look easy to choose. Choosing it is the hard part and the script is silent on it.
๐ Alternatives
- The closed-form update Hale showed on the board. Faster, and I did not trust it until the grid agreed with it.
- Drawing it by hand with ten candidate values. Rasmus Kjรฆr did this in the margin and got there first.