This lab is an in-class demo for 536 students. It should be turned in along with Lab 5.
We previously studied recursive Bayesian estimation for an unmoving object. Now we will build upon that for a moving object (such as a price).
The sampling model now includes a \(\theta_t\) term rather than \(\theta\), to denote that \(\theta\) evolves in time. The observations are then modeled as: \[y_t = \theta_t + \epsilon_t, \; \; \; \epsilon_t \sim N(0,\sigma_{\epsilon}^2) \; \text{and $\epsilon_t$ are iid.}\] and \[\theta_t = \theta_{t-1} + \nu + w_t, \; \; \; w_t \sim N(0,\sigma_w^2) \; \text{and $\nu$ is a speed term}.\]
The first equation, \(y_t = \theta_t + \epsilon_t\) is known as the observation equation.
The second equation, \(\theta_t = \theta_{t-1} + \nu + w_t\) is known as the evolution equation.
With the standard priors, at each time point (\(t\)) we have:
Write out the following distributions and define paramters: \(\theta_{t+1}|y_{1:t}\), \(y_{t+1}|y_{1:t}\), and \(\theta_{t+1}|y_{1:t+1}\). This should be defined in a recursive fashion.
Simulate a model with this process, where \(\theta\) evolves in time. Find a way to graphical display both the unobserved (latent) \(\theta\) values and the observed responses.