Forecast the next mean of a small series using a beginner Bayesian update: a prior guess for the mean, a likelihood from the data, and a posterior mean used as the forecast. Keep the mathematics light.
Forecast the next mean of a small series using a beginner Bayesian update: a prior guess for the mean, a likelihood from the data, and a posterior mean used as the forecast. Keep the mathematics light.
Bayesian forecasting starts with a prior belief about an unknown quantity, updates that belief with the likelihood of the observed data, and uses the posterior for prediction. In the simplest normal-mean teaching case, the posterior mean is a weighted average of the prior mean and the sample mean. More data pulls the forecast toward the sample. A strong prior pulls it toward the guess. This practical does not develop MCMC or full Bayesian VARs.
Ten demand observations: 30, 32, 31, 29, 33, 30, 31, 28, 32, 30. Prior guess: mean 35 with modest confidence, as if last year ran hotter. Teaching numbers.
Printed sample mean near 30.6, prior 35, and a posterior mean between them, closer to the data because n = 10 is larger than n0 = 4. The exact posterior equals (4×35 + 10×ȳ) / 14.
The forecast of the level shrinks the sample mean toward 35. That is the Bayesian idea in one number: combine prior and data. A full Bayesian time-series model would also put priors on persistence and seasonality; this lab only introduces the update.
A Bayesian forecast combines a prior with the likelihood. The posterior mean shrinks the sample toward the prior.