## Thursday, February 22, 2018

### A Bayesian Coin Flip

Anyone who's spent any time at all with the scientific literature has encountered the phrase "Bayesian statistics." What's that all about?  How can there be more than one kind of statistics? Isn't statistics just a branch of mathematics, where everything is cut and dried? Alas, no. In his book Numerical Recipes, Bill Press describes statistics as "that gray area which is as surely not a branch of mathematics as it is neither a branch of science." Statistics is all about using data to derive conclusions, but there's no single "right" way to do this. So the world of statistics resembles Europe during the Reformation, divided into various factions and sects, one of these being the Cult of the Bayesians. The key idea of Bayesian statistics is that one needs to incorporate prior assumptions about reality into any modeling of data.

Here's an example.  Suppose that Alfred flips a coin 20 times, and he gets 20 heads in a row (this is very unlikely -- the probability of 20 heads in a row is less than one in two million).

Now Alfred flips the coin one more time. What is the probability that this coin flip will come up heads?  Is it

(A) Less than 1/2?  Alfred has used up all the heads.
(B) Exactly 1/2?  Past performance tells you nothing about future returns.
(C) Greater than 1/2?  Alfred is on a roll!

A classical statistician would have to answer (B). In fact, any other answer would be considered a prototypical fallacy about probabilities. But what about a Bayesian statistician? I think a Bayesian would have to answer (C). Why? Because if Alfred gets 20 heads in a row, there's a good chance he's cheating and using a 2-headed coin! Of course, I am grossly oversimplifying here, but that's what the internet is for.