# Deriving the Kalman filter using basic facts about normally distributed random variables

I'm attempting to derive the Kalman filter using basic facts about normally distributed random variables. Can anyone complete this derivation? Here's what I have so far (there could be some mistakes):

Let's assume that \begin{align} x_{k+1} &= \Phi_k x_k + w_k. \end{align} We don't know with certainty the value of $x_k$. Rather, we view $x_k$ as a normally distributed random variable with a known mean $\mu_k$ and known variance $\Sigma_k$. The noise vector $w_k$ is also not known with certainty -- rather, $w_k$ is a normally distributed random variable with mean $0$ and variance $\Omega_k$. The matrix $\Phi_k$ is assumed to be known. We assume $w_k$ and $x_k$ are independent.

What do we know about the value of $x_{k+1}$? From probability theory (see this question), we know that the random variable $x_{k+1}$ is normally distributed with mean $\Phi_k \mu_k$ and variance $\Phi_k \Sigma_k \Phi_k^T + \Omega_k$. So far, this is the most we can say about $x_{k+1}$.

Next, what if we are given (as a measurement from a sensor) the value of the random variable $$z_{k+1} = H_{k+1} x_{k+1} + v_{k+1},$$ where the random variable $v_{k+1}$ is normally distributed with mean $0$ and variance $\Gamma_{k+1}$ and is independent of $x_{k+1}$. We assume the matrix $H_{k+1}$ is known.

First of all, note that $z_{k+1}$ is normally distributed with mean $H_{k+1} \Phi_k \mu_k$ and variance $H_{k+1}(\Phi_k \Sigma_k \Phi_k^T + \Omega_k) H_{k+1}^T + \Gamma_k$. When we are given the value of $z_{k+1}$, we must update our beliefs about the value of $x_{k+1}$

Question: What are the (conditional) mean and variance of $x_{k+1}$ given the value of $z_{k+1}$?

• It looks to me like your work so far is correct. In your first phase, you have found $p(x_{k+1} \mid z_{1:k})$, where $z_{1:k}$ refers to all past measurements. With the measurement likelihood $p(z_{k+1} \mid x_{k+1})$, we have a joint distribution $p(x_{k+1}, z_{k+1} \mid z_{1:k}) = p(z_{k+1} \mid x_{k+1}) p(x_{k+1} \mid z_{1:k})$, which will also be normal. Now you should be able to apply standard techniques to this joint normal distribution to find $p(x_{k+1} \mid z_{1:k+1})$, which is your answer. – mikkola May 30 '16 at 19:03