This homework gives you some experience at algebraic manipulation of POMP models by deriving the prediction, filtering and smoothing formulas in Chapter 9 of the notes.

The calculations are all applications of basic definitions (such as the Markov property) and basic identities for joint, conditional and marginal probability density functions. The goal is to check carefully how the formulas follow from these properties, so please explain this explicitly in your solutions. You may follow the Hints for Homework in Chapter 9 of the notes.

The homework can be handwritten and scanned to pdf, however it is recommended to use Latex in Rmarkdown. If you are relatively unfamiliar with Latex and Rmarkdown, this will take more time but it is a worthwhile exercise. As usual, you are welcome to use the Latex from the notes as a source, if you like.


Question 5.1

Derive the identity [MP2]. \[f_{X_{0:N}}(x_{0:N}) = f_{X_0}(x_0)\prod_{n=1}^N f_{X_n \mid X_{n-1}}(x_n \mid x_{n-1})\]

==============================================


\(\mathbf{Solution.}\qquad\) First we know that, \[\begin{equation} f_{XY}(x,y)=f_{Y}\left(y\right)f_{X\mid Y}\left(x\mid y\right)\label{eq:1} \end{equation}\]

by conditioning on \(Z\), equation (\ref{eq:1}) becomes, \[\begin{equation} f_{XY\mid Z}(x,y\mid z)=f_{X\mid Z}(x\mid z)f_{Y\mid XZ}(y\mid x,z)\label{eq:2} \end{equation}\]

By equations (\ref{eq:1}) and (\ref{eq:2}), \[\begin{align*} f_{X_{0:N}}\left(x_{0:N}\right) & =f_{X_{0}}\left(x_{0}\right)f_{X_{1:N}\mid X_{0}}\left(x_{1:N}\mid x_{0}\right)\\ & =f_{X_{2:N}\mid X_{0:1}}\left(x_{2:N}\mid x_{0:1}\right)f_{X_{1}\mid X_{0}}\left(x_{1}\mid x_{0}\right)f_{X_{0}}\left(x_{0}\right)\\ & =f_{X_{2:N}\mid X_{1}}\left(x_{2:N}\mid x_{1}\right)f_{X_{1}\mid X_{0}}\left(x_{1}\mid x_{0}\right)f_{X_{0}}\left(x_{0}\right) \end{align*}\]

Where the last line is due to the Markov property, \[\begin{equation} f_{X_{n}\mid X_{1:n-1}}\left(x_{n}\mid x_{1:n-1}\right)=f_{X_{n}\mid X_{n-1}}\left(x_{n}\mid x_{n-1}\right)\label{eq:3} \end{equation}\]

By continuing to expand the conditional term \(f_{X_{2:N}\mid X_{1}}\left(x_{2:N}\mid x_{1}\right)\), we finally have, \[ f_{X_{0:N}}(x_{0:N})=f_{X_{0}}(x_{0})\prod_{n=1}^{N}f_{X_{n}\mid X_{n-1}}(x_{n}\mid x_{n-1}) \]


Question 5.2

Derive the prediction formula, [MP4]. \[\begin{align*} & f_{X_{n} \mid Y_{1:n-1}}(x_{n} \mid y_{1:n-1})\\ & =\int f_{X_{n-1} \mid Y_{1:n-1}}(x_{n-1}\mid y_{1:n-1})f_{X_{n} \mid X_{n-1}}(x_{n}\mid x_{n-1})\,dx_{n-1} \end{align*}\]

==============================================


\(\mathbf{Solution.}\qquad\) First recall the following identity, \[\begin{equation} f_{X\mid Y}(x\mid y)=\int f_{XZ\mid Y}(x,z\mid y)dz\label{eq:4} \end{equation}\]

By equation (\ref{eq:4}), \[\begin{align*} f_{X_{n}\mid Y_{1:n-1}}\left(x_{n}\mid y_{1:n-1}\right) & =\int f_{X_{n}X_{n-1}\mid Y_{1:n-1}}\left(x_{n},x_{n-1}\mid y_{1:n-1}\right)dx_{n-1} \end{align*}\]

Next recall, \[\begin{equation} f_{XZ\mid Y}(x,z\mid y)=f_{Z\mid Y}(z\mid y)f_{X\mid ZY}(x\mid y,z)\label{eq:5} \end{equation}\]

By equation (\ref{eq:5}), \[\begin{align*} & \int f_{X_{n}X_{n-1}\mid Y_{1:n-1}}\left(x_{n},x_{n-1}\mid y_{1:n-1}\right)dx_{n-1}\\ & =\int f_{X_{n-1}\mid Y_{1:n-1}}\left(x_{n-1}\mid y_{1:n-1}\right)f_{X_{n}\mid X_{n-1}Y_{1:n-1}}\left(x_{n}\mid x_{n-1},y_{1:n-1}\right)dx_{n-1} \end{align*}\]

Finally using [MP3] from lecture notes 9, \[\begin{equation} f_{Y_{n}\mid X_{0:N},Y_{1:n-1},Y_{n+1:N}}\left(y_{n}\mid x_{0:N},y_{1:n-1},y_{n+1:N}\right)=f_{Y_{n}\mid X_{n}}\left(y_{n}\mid x_{n}\right)\label{eq:6} \end{equation}\]

we have, \[\begin{align*} & \int f_{X_{n-1}\mid Y_{1:n-1}}\left(x_{n-1}\mid y_{1:n-1}\right)f_{X_{n}\mid X_{n-1}Y_{1:n-1}}\left(x_{n}\mid x_{n-1},y_{1:n-1}\right)dx_{n-1}\\ & =\int f_{X_{n-1}\mid Y_{1:n-1}}\left(x_{n-1}\mid y_{1:n-1}\right)f_{X_{n}\mid X_{n-1}}\left(x_{n}\mid x_{n-1}\right)dx_{n-1} \end{align*}\]


Question 5.3

Derive the filtering formulas [MP5] \[f_{X_{n} \mid Y_{1:n}}(x_{n}\mid y_{1:n})=\frac{f_{X_{n} \mid Y_{1:n-1}}(x_{n}\mid y_{1:n-1})\,f_{Y_{n} \mid X_{n}}(y_{n}\mid x_{n})}{f_{Y_{n} \mid Y_{1:n-1}}(y_{n}\mid y_{1:n-1})}\]

and [MP6]. \[f_{Y_{n} \mid Y_{1:n-1}}(y_{n}\mid y_{1:n-1})=\int f_{X_{n} \mid Y_{1:n-1}}(x_{n} \mid y_{1:n-1})\,f_{Y_{n} \mid X_{n}}(y_{n}\mid x_{n})\,dx_{n}\]

==============================================


[MP5] \(\mathbf{Solution.}\qquad\) Fist we can write, \[\begin{align*} f_{X_{\mathrm{n}}\mid Y_{1:n}}\left(x_{n}\mid y_{1:n}\right) & =f_{X_{n}\mid Y_{n}Y_{1:n-1}}\left(x_{n}\mid y_{n},y_{1:n-1}\right) \end{align*}\]

Recall the identity from lecture notes 9, \[\begin{equation} f_{X\mid YZ}(x\mid y,z)=\frac{f_{Y|XZ}(y\mid x,z)f_{X\mid Z}(x\mid z)}{f_{Y\mid Z}(y\mid z)}\label{eq:7} \end{equation}\]

Then by equation (\ref{eq:7}), \[\begin{align*} & f_{X_{n}\mid Y_{n}Y_{1:n-1}}\left(x_{n}\mid y_{n},y_{1:n-1}\right)\\ & =\frac{f_{Y_{n}\mid X_{n}Y_{1:n-1}}\left(y_{n}\mid x_{n},y_{1:n-1}\right)f_{X_{n}\mid Y_{1:n-1}}\left(x_{n}\mid y_{1:n-1}\right)}{f_{Y_{n}\mid Y_{1:n-1}}\left(y_{n}\mid y_{1:n-1}\right)}\\ & =\frac{f_{Y_{n}\mid X_{n}}\left(y_{n}\mid x_{n}\right)f_{X_{n}\mid Y_{1:n-1}}\left(x_{n}\mid y_{1:n-1}\right)}{f_{Y_{n}\mid Y_{n-1}}\left(y_{n}\mid y_{1:n-1}\right)} \end{align*}\]

where the last line holds by equation (\ref{eq:6}).



[MP6] \(\mathbf{Solution.}\qquad\) Using the combination of equations (\ref{eq:4}), (\ref{eq:5}), and (\ref{eq:6}), \[\begin{align*} f_{Y_{n}\mid Y_{1:n-1}}\left(y_{n}\mid y_{1:n-1}\right) & =\int f_{Y_{n}X_{n}\mid Y_{1:n-1}}\left(y_{n},x_{n}\mid y_{1:n-1}\right)dx_{n}\\ & =\int f_{X_{n}\mid Y_{1:n-1}}\left(x_{n}\mid y_{1:n-1}\right)f_{Y_{n}\mid X_{n}Y_{1:n-1}}\left(y_{n}\mid x_{n},y_{1:n-1}\right)dx_{n}\\ & =\int f_{X_{n}\mid Y_{1:n-1}}\left(x_{n}\mid y_{1:n-1}\right)f_{Y_{n}\mid X_{n}}\left(y_{n}\mid x_{n}\right)dx_{n} \end{align*}\]


Question 5.4

Derive the backward recursion formulas [MP8] \[ f_{Y_{n:N}\mid X_{n}}\left(y_{n:N}\mid x_{n}\right)=f_{Y_{n} \mid X_{n}}\left(y_{n}\mid x_{n}\right)f_{Y_{n+1:N}\mid X_{n}}\left(y_{n+1:N}\mid x_{n}\right) \]

and [MP9], \[ f_{Y_{n+1:N}\mid X_{n}}\left(y_{n+1:N}\mid x_{n}\right)=\int f_{Y_{n+1:N} \mid X_{n+1}}\left(y_{n+1:N} \mid x_{n+1}\right)f_{X_{n+1} \mid X_{n}}\left(x_{n+1} \mid x_{n}\right)dx_{n+1} \]

==============================================


[MP8] \(\mathbf{Solution.}\qquad\) First we write, \[\begin{align*} f_{Y_{n:N}\mid X_{n}}\left(y_{n:N}\mid x_{n}\right) & =f_{Y_{n}Y_{n+1:N}\mid X_{n}}\left(y_{n},y_{n+1:N}\mid x_{n}\right) \end{align*}\]

Then by equations (\ref{eq:5}), and (\ref{eq:6}), \[\begin{align*} & f_{Y_{n}Y_{n+1:N}\mid X_{\mathrm{n}}}\left(y_{n},y_{n+1:N}\mid x_{n}\right)\\ & =f_{Y_{n}\mid X_{n}}\left(y_{n}\mid x_{n}\right)f_{Y_{n+1:N}\mid Y_{n}X_{n}}\left(y_{n+1:N}\mid y_{n},x_{n}\right)\\ & =f_{Y_{n}\mid X_{n}}\left(y_{n}\mid x_{n}\right)f_{Y_{n+1:N}\mid X_{\mathrm{n}}}\left(y_{n+1:N}\mid x_{n}\right) \end{align*}\]



[MP9] \(\mathbf{Solution.}\qquad\) Using the combination of equations (\ref{eq:4}), (\ref{eq:5}), and (\ref{eq:6}), \[\begin{align*} f_{Y_{n+1:N}\mid X_{n}}\left(y_{n+1:N}\mid x_{n}\right) & =\int f_{Y_{n+1:N}X_{n+1}\mid X_{n}}\left(y_{n+1:N},x_{n+1}\mid x_{n}\right)dx_{n+1}\\ & =\int f_{X_{n+1}\mid X_{n}}\left(x_{n+1}\mid x_{n}\right)f_{Y_{n+1:N}\mid X_{n+1}X_{n}}\left(y_{n+1:N}\mid x_{n+1},x_{n}\right)dx_{n+1}\\ & =\int f_{X_{n+1}\mid X_{n}}\left(x_{n+1}\mid x_{n}\right)f_{Y_{n+1:N}\mid X_{n+1}}\left(y_{n+1:N}\mid x_{n+1}\right)dx_{n+1} \end{align*}\]


Question 5.5

Derive the smoothing formula [MP10]. \[ f_{X_{n}\mid Y_{1:N}}\left(x_{n}\mid y_{1:N}\right)=\frac{f_{X_{n}\mid Y_{1:n-1}}\left(x_{n}\mid y_{1:n-1}\right)f_{Y_{n:N}\mid X_{n}}\left(y_{n:N}\mid x_{n}\right)}{f_{Y_{n:N}\mid Y_{1:n-1}}\left(y_{n:N}\mid y_{1:n-1}\right)} \]

==============================================


\(\mathbf{Solution.}\qquad\) First we can write, \[\begin{align*} f_{X_{n}\mid Y_{1:N}}\left(x_{n}\mid y_{1:N}\right) & =f_{X_{n}\mid Y_{1:n-1}Y_{n:N}}\left(x_{n}\mid y_{1:n-1},y_{n:N}\right) \end{align*}\]

Then by equations (\ref{eq:7}) and (\ref{eq:6}), \[\begin{align*} & f_{X_{n}\mid Y_{1:n-1}Y_{n:N}}\left(x_{n}\mid y_{1:n-1},y_{n:N}\right)\\ & =\frac{f_{X_{n}\mid Y_{1:n-1}}\left(x_{n}\mid y_{1:n-1}\right)f_{Y_{n:N}\mid X_{n}Y_{1:n-1}}\left(y_{n:N}\mid x_{n},y_{1:n-1}\right)}{f_{Y_{n:N}\mid Y_{1:n-1}}\left(y_{n:N}\mid y_{1:n-1}\right)}\\ & =\frac{f_{X_{n}\mid Y_{1:n-1}}\left(x_{n}\mid y_{1:n-1}\right)f_{Y_{n:N}\mid X_{n}}\left(y_{n:N}\mid x_{n}\right)}{f_{Y_{n:N}\mid Y_{1:n-1}}\left(y_{n:N}\mid y_{1:n-1}\right)} \end{align*}\]


Question 5.6

Explain which parts of your responses above made use of a source, meaning anything or anyone you consulted (including classmates or office hours) to help you write or check your answers. All sources are permitted, but failure to attribute material from a source is unethical. See the syllabus for additional information on grading.

==============================================


I used lecture 9 Notes from Stats 531,