A while ago I wrote this post with some R code to visualize the updating of a beta distribution as the outcome of Bernoulli trials are observed. The code provided a single plot of this process, with all the curves overlayed on top of one another. Then John Myles White (co-author of Machine Learning for Hackers) piped up on twitter and said that he’d like to see it as an animation. Challenge accepted – and with an additional twist.

The video shows how two observers who approach the problem with different beliefs (priors) converge toward the same conclusion about the value of the unknown parameter after making enough observations.

Reblogged this on Sam Clifford and commented:
I came across this via reddit’s r/statistics community and thought I might share it as a nice way of visualising posteriors. Specifically, it’s a very good demonstration of the convergence of the posterior beliefs of two observers with separate priors but the same data (which is sequentially collected, but the order of successes/failures are irrelevant).

So next time someone’s telling you that Bayesian statistics is inherently wrong because of the subjectivity of the prior belief, you can point them to something like this to demonstrate that as data is collected the posteriors become quite close.

I suggest having a play with the R code to understand how the diffuseness of the priors affects the concentration of posterior belief. While the opposite beliefs of the observers in the attached video are a nice example of convergence to the same posterior, I think two priors with the same mean and different variance would be a more interesting visualisation.

OS: Ubuntu 12.04. The only extra piece of software needed is MPlayer’s Movie Encoder which you can get (if you’re using Ubuntu or Debian like system) using: sudo apt-get install mencoder.

wow!

great! see also this post for bayesian/frequentist interpretations of this experiment: http://cyrille.rossant.net/introduction-to-bayesian-thinking/

Reblogged this on Sam Clifford and commented:

I came across this via reddit’s r/statistics community and thought I might share it as a nice way of visualising posteriors. Specifically, it’s a very good demonstration of the convergence of the posterior beliefs of two observers with separate priors but the same data (which is sequentially collected, but the order of successes/failures are irrelevant).

So next time someone’s telling you that Bayesian statistics is inherently wrong because of the subjectivity of the prior belief, you can point them to something like this to demonstrate that as data is collected the posteriors become quite close.

I suggest having a play with the R code to understand how the diffuseness of the priors affects the concentration of posterior belief. While the opposite beliefs of the observers in the attached video are a nice example of convergence to the same posterior, I think two priors with the same mean and different variance would be a more interesting visualisation.

Pingback: My take on the Bayesian updating video « Sam Clifford

Pingback: Building a survivor curve from observed data « MI Regression

Thanks. Would you mind sharing your setup to run this code(what else besides R is needed)?

OS: Ubuntu 12.04. The only extra piece of software needed is MPlayer’s Movie Encoder which you can get (if you’re using Ubuntu or Debian like system) using: sudo apt-get install mencoder.

Good luck!

Thanks. This is very helpful.