bayesian statistics: an introductory example

Bayesian statistics are widely used in fields like robotics and machine learning. I've been playing around with the theories over the past few months (sorry for the lack of posts by the way), and recently came across something with a high (worth sharing)/(time to write a post) ratio.

It's called the cookie problem:


If you're like me it feels obvious that it is more likely that Fred picked the plain cookies out of the bowl with a higher percentage of plain cookies, yet I don't know how to quantify it... sort of embarrassing on such a simple example.

The wikipedia entry for Bayesian Inference has a breakdown of the solution, but I found it much more valuable to watch the following video from PyCon (the speaker is Allen Downey).

The example starts at 10:15