The Raccoon Princess and the Fox Prince: A Bayesian Parable(cassandraxia.com)
cassandraxia.com
The Raccoon Princess and the Fox Prince: A Bayesian Parable
http://cassandraxia.com/projs/raccoon/
16 comments
[edit; whoops you were talking about the format and I was talking about the material. Oh well, hopefully this is not too out of place.]
It could be made much more approachable by removing the math entirely. If you learned programming before algebra you might have solved it like this:
It could be made much more approachable by removing the math entirely. If you learned programming before algebra you might have solved it like this:
from random import random
from collections import defaultdict
tally = defaultdict(int)
for i in range(100000):
thief = ['raccoon', 'fox'][random() < 0.3]
bear = ['false', 'true'][random() < 0.8]
hair = ['raccoon', 'fox'][random() < 0.3333333]
if thief == 'raccoon' and bear == 'true':
continue
if thief == 'fox' and bear == 'false':
continue
if thief != hair:
continue
tally[thief] += 1
print(sorted(tally.items()))
While crude it does give the correct answer, to within 1% or so.Your approach made assumptions about independence that may or may not be justified.
That everything is completely independent? This is the correct, non-naive assumption to always make unless you have a very good reason otherwise.
There are 3 binary variables. Some combinations of the variables are impossible. These impossible combinations are discarded. For example, the bear said he saw a fox. Therefor it is not possible for the bear to be truthful and the thief to be a raccoon. When that combination comes up, it is discarded. There is no dependency.
There are 3 binary variables. Some combinations of the variables are impossible. These impossible combinations are discarded. For example, the bear said he saw a fox. Therefor it is not possible for the bear to be truthful and the thief to be a raccoon. When that combination comes up, it is discarded. There is no dependency.
> These impossible combinations are discarded. For example, the bear said he saw a fox. Therefor [sic] it is not possible for the bear to be truthful and the thief to be a raccoon.
Per the story, there is a 20% chance a truthful bear may have mistaken a raccoon for a fox. Not automatically discarding possibilities like "a truthful bear saw a fox, though the thief is a raccoon" is a hallmark of probabilistic thinking. Thinking through these examples formally has advantages over starting with code.
Per the story, there is a 20% chance a truthful bear may have mistaken a raccoon for a fox. Not automatically discarding possibilities like "a truthful bear saw a fox, though the thief is a raccoon" is a hallmark of probabilistic thinking. Thinking through these examples formally has advantages over starting with code.
Um, no. I did not say anything like that.
But go ahead and rigorously demonstrate any non-zero existence for "A truthful bear saw a fox, though the thief is a raccoon" with the current parameters of the model. It is not a possibility, it is nonsense.
Please prove the brute-force simulation fails to converge on the correct answer. It is figuratively running a million parallel universes and recording what happened. In no legitimate universe does the combination "bear was not mistaken, bear saw fox, thief was raccoon" ever occur.
But go ahead and rigorously demonstrate any non-zero existence for "A truthful bear saw a fox, though the thief is a raccoon" with the current parameters of the model. It is not a possibility, it is nonsense.
Please prove the brute-force simulation fails to converge on the correct answer. It is figuratively running a million parallel universes and recording what happened. In no legitimate universe does the combination "bear was not mistaken, bear saw fox, thief was raccoon" ever occur.
Per the discussion in the scenario, "bear was not mistaken," and "bear was truthful" are different things. One implies a bear with poor eyesight; the other implies a bear intentionally misrepresenting the facts.
Given the story, the bear mistook a raccoon for a fox 20% of the time, which is very different from being untruthful.
Given the story, the bear mistook a raccoon for a fox 20% of the time, which is very different from being untruthful.
Solving a bayesian parable with frequentist methods is heresy. ;)
Look at https://github.com/ksotala/BayesGame (I've also got other links about this in my top-level comment).
In the category of "games involving Bayes": https://github.com/ksotala/BayesGame, with description http://lesswrong.com/lw/lad/bayes_academy_development_report... and http://lesswrong.com/lw/les/bayes_academy_development_report...
Her interactive last year on Cognitive Biases is another gem: http://cassandraxia.com/projs/advbiases/
I'm not a teacher, and I know from friends who are that being a good teacher is harder than what I can probably imagine, but I think kids would have fun working through these types of stories.