Get startedGet started for free

Bayes is optimal, kind of...

1. You just replaced the whole model!

You just replaced the whole Bayesian binomial model completely, by just changing two lines of code, and you didn’t even have to change how the model was fitted!

2. Banner analysis result

Here’s the prior and posterior you calculated. Seems like you should expect between 10 and 30 site visits on average because of the banner, and if we knew how much your friend wanted to charge for putting up the banner, we could do a small decision analysis to figure out if it’s worth it. In this chapter you’ve seen

3. Some ways Bayesian data analysis can be useful

some ways Bayesian data analysis can be useful. But in short: Bayes allows you to tweak, change and tinker with the model to better fit the data analytical problem you have. But a last reason to use Bayes is because it is optimal, kind of. It can be shown, theoretically, that no other method learns as efficiently from data as Bayesian inference. The reason I’m saying “kind of” is because this only holds for the small world that is the model. If the data was actually generated by our binomial generative model, then no other method than Bayesian inference could do better. But optimality in the small world of the model doesn’t mean we have any guarantees in the larger world of reality.

4. The binomial model for the ad data

Take, for example, the model we used for the ad data. One assumption was that the underlying proportion of success could be anything between 0% and 20%, but if it actually would be more than 20%, if your ad is hugely successful, then the model will never get this right, no matter the amount of data. Or if there are time effects, maybe people click more on video adds in the winter, then the model will also never capture that. This is not unique to Bayes, no statistical model can ever be optimal in the real world, but at least it’s nice to know that

5. Nice properties of Bayes

Bayes is optimal in the small world defined by the model. In the last exercise, you saw that you could completely replace a Bayesian model without changing how you fitted it. This highlights another nice property of Bayesian data analysis: There is a separation between model and computation. That’s not to say that computation is not an issue, and the method we’ve used so far is impractical for everything but the most simple models.

6. Next up: How to fit Bayesian models more efficiently!

So in the next chapter, we’re going to learn how to fit Bayesian models more efficiently, unfortunately, this will require a little bit of probability theory, but on the upside, you’ll get to learn what Bayes theorem is all about!