Linear minimum-variance estimation uses the first two moments of a state \(X\) and an observation \(Z\) to construct an affine estimator. Let \(\hat X=AZ+b\). Fixing the mean error at zero prevents an arbitrary offset from being mistaken for a good estimate merely because it has low variance.
Choose the offset and gain
For each \(A\), the mean-square error is minimized over the offset by \(b=\mu_X-A\mu_Z\). This makes the estimator unbiased in the unconditional mean. The best residual is then orthogonal to the centered observation:
\[\operatorname{Cov}(X-AZ,Z)=0,\qquad A\Sigma_{ZZ}=\Sigma_{XZ}.\]For invertible \(\Sigma_{ZZ}\):
\[\hat X=\mu_X+\Sigma_{XZ}\Sigma_{ZZ}^{-1}(Z-\mu_Z),\qquad P_e=\Sigma_{XX}-\Sigma_{XZ}\Sigma_{ZZ}^{-1}\Sigma_{ZX}.\]If \(\Sigma_{ZZ}\) is singular, remove redundant directions or use a pseudoinverse. The optimal prediction on the observed support can be unique even when coefficient matrices are not.
The estimator minimizes mean-square error among affine functions. For jointly Gaussian variables it equals the conditional mean, the minimum-MSE estimator without the affine restriction. These ideas also explain how a Kalman gain converts a measurement innovation into a state correction.


