Probabilistic derivation of the Kalman filter