Best affine state estimate (source code)

= Best affine state estimate
{title2=$\arg\min_{a,C}\mathbb E\|x-a-Cy\|^2$}

A <best affine state estimate> minimizes <mean squared error> among estimates $a+Cy$ formed from the available observation <vector> $y$. With finite second moments and invertible observation <covariance matrix>, it is
$$
\widehat x=\mathbb E[x]+\operatorname{Cov}(x,y)\operatorname{Cov}(y)^{-1}(y-\mathbb E[y]).
$$
This follows from the <orthogonal projection> of centered state components onto the <linear span> of centered observation components. For <Jointly Gaussian> state and observation it equals the <conditional expectation>; for general laws a nonlinear estimate can have lower <mean squared error>.