Regression with honest uncertainty
Ordinary regression gives you one slope. Bayesian regression gives you a whole distribution for the slope. Take a stock's return and the market's return with , and let the noise have variance . Start with a prior for the beta, for example a normal centred on with variance . The data push the slope toward the least-squares value and the prior pulls it back. It is the same precision-weighted average as in the last topics. The prior precision is , the data precision is , and the second one is large when the market moved a lot.
Two things are worth noting. First, a prior centred on gives exactly ridge regression: the slope is with . So ridge regression is just a Bayesian regression whose prior distrusts large slopes. Second, a prediction for a new has two sources of spread: the noise and the uncertainty of the slope, which adds . The second part grows with the square of , so predictions far from the data are less certain.
- Bayesian slope: a distribution whose precision is the prior precision plus the data precision.
- Ridge regression is the case of a prior centred on , with .
- Predictions carry noise plus slope uncertainty, and the second part grows with .
Lab · what's graded
- The posterior precision15 pts
- The posterior slope15 pts
- The slope's uncertainty10 pts
- The ridge slope15 pts
- A prediction's spread10 pts
- A very confident prior10 pts
- Match the vocabulary10 pts
- Far from the data15 pts