A Frequentist and a Bayesian go to a bar ...
(Note: you might want to refresh this page on your browser if the equations don't render correctly.)
In the first installment of this blogpost, I illustrated that Fisher's rule of thumb of using $\frac{3}{n}$ for the upper limit of a 95% confidence/credible interval is a good approximation as soon a $n>=25$. This was inspired by a blogpost from John D. Cook on the subject.
At the end I made a remark about something odd that happens when $n=1$. Fisher's rule of thumb results in 1, which is not very informative. The Bionomial solution is 0.95. When $n=1$ this is now an actual Bernoulli, i.e. a special case of the binomial if you will:
Freddy (a Frequentist) and Barry (a Bayesian) go to a bar. After serving them a drink, Ronny, the bartender, has a little quiz for them. They observe one trial, with a failure as the outcome. They don't know $p$, but they need to predict the next outcome. The only thing they know is that there can only be a success (1) or a failure (0), and that the second trial uses the same unknown $p$ as the one from the first trial. Freddy shouts \emph{maximum likelihood} and answers $0$. Barry mumbles something about preferring to answer with a distribution, but the bartender insists on one answer only. Barry then grudgingly agrees and whispers \emph{Maximum A Posteriori} and answers $0$. They witness a new trial and sure enough the outcome is 0 again. Freddy and Barry do a happy dance and continue drinking. "Not so fast" says the bartender and asks how sure they were after the first trial. Freddy, who is a Frequentist, answers first and says: I have a 95\% confidence interval from 0 to 0.95, so if we were to repeat this exercise 100 times under the same conditions, I would expect that that the true $p$ would be in a similarly constructed confidence interval 95 out of the 100 cases, so I'm pretty sure. Barry, who is a Bayesian, is a bit more thoughtful and takes his time to answer. He jots a few numbers on a napkin and finally says: "I have a 95\% credible interval from 0 to 0.78, so there is a 95\% probability that the true parameter value falls between 0 and 0.78." The bartender now needs to decide who he will crown the winner. Luckily Ronny happens to know some R from a previous job, so he decides to simulate a whole series of quizzes. He heard Barry mention a uniform prior, so he decides, for each simulated quiz, to randomly pick a $p$ from the real line between 0 and 1 with equal probability. Next, just like in the actual quiz, he selects only those trials that have a failure, and for each of these he runs a new trial using the same $p$. He then counts the number of times the second trial is a failure, because that's what Freddy and Barry would predict each time. Finally he expresses the counts in proportions. To avoid any discussion he decides to also consider the complete set of outcomes, i.e. those with a failure in the first trial, and, those with a success in the first trial.
Comments
Post a Comment