Path: blob/master/incubator/hierarchical-modelling.ipynb
411 views
Kernel: bayesian
In [ ]:
In [ ]:
Introduction
The purpose of this notebook is to show Bayesian hierarchical models.
Hierarchical models are used in modelling things like baseball batting averages or housing prices. It's useful when we have some "population" parameter that we think influences an individual sample's parameter. Let's dive in to see how this works.
In [ ]:
We will use the baseball dataset from Efron & Morris. It's pretty famous, and can be downloaded from the PyMC3 website.
In [ ]:
Given this population data, let's now say that we have a rookie player with just six at bats and all of them were hit. Is this a genius player to keep for the season? Bayesian statistics may help us get to an answer.
In [ ]:
In [ ]:
In [ ]: