Minimum mean square error

Estimation method that minimizes the mean square error

In statistics and signal processing, a minimum mean square error (MMSE) estimator is an estimation method which minimizes the mean square error (MSE), which is a common measure of estimator quality, of the fitted values of a dependent variable. In the Bayesian setting, the term MMSE more specifically refers to estimation with quadratic loss function. In such case, the MMSE estimator is given by the posterior mean of the parameter to be estimated. Since the posterior mean is cumbersome to calculate, the form of the MMSE estimator is usually constrained to be within a certain class of functions. Linear MMSE estimators are a popular choice since they are easy to use, easy to calculate, and very versatile. It has given rise to many popular estimators such as the Wiener–Kolmogorov filter and Kalman filter.

Motivation

The term MMSE more specifically refers to estimation in a Bayesian setting with quadratic cost function. The basic idea behind the Bayesian approach to estimation stems from practical situations where we often have some prior information about the parameter to be estimated. For instance, we may have prior information about the range that the parameter can assume; or we may have an old estimate of the parameter that we want to modify when a new observation is made available; or the statistics of an actual random signal such as speech. This is in contrast to the non-Bayesian approach like minimum-variance unbiased estimator (MVUE) where absolutely nothing is assumed to be known about the parameter in advance and which does not account for such situations. In the Bayesian approach, such prior information is captured by the prior probability density function of the parameters; and based directly on Bayes theorem, it allows us to make better posterior estimates as more observations become available. Thus unlike non-Bayesian approach where parameters of interest are assumed to be deterministic, but unknown constants, the Bayesian estimator seeks to estimate a parameter that is itself a random variable. Furthermore, Bayesian estimation can also deal with situations where the sequence of observations are not necessarily independent. Thus Bayesian estimation provides yet another alternative to the MVUE. This is useful when the MVUE does not exist or cannot be found.

Definition

Let x {\displaystyle x} be a n × 1 {\displaystyle n\times 1} hidden random vector variable, and let y {\displaystyle y} be a m × 1 {\displaystyle m\times 1} known random vector variable (the measurement or observation), both of them not necessarily of the same dimension. An estimator x ^ ( y ) {\displaystyle {\hat {x}}(y)} of x {\displaystyle x} is any function of the measurement y {\displaystyle y} . The estimation error vector is given by e = x ^ x {\displaystyle e={\hat {x}}-x} and its mean squared error (MSE) is given by the trace of error covariance matrix

MSE = tr { E { ( x ^ x ) ( x ^ x ) T } } = E { ( x ^ x ) T ( x ^ x ) } , {\displaystyle \operatorname {MSE} =\operatorname {tr} \left\{\operatorname {E} \{({\hat {x}}-x)({\hat {x}}-x)^{T}\}\right\}=\operatorname {E} \{({\hat {x}}-x)^{T}({\hat {x}}-x)\},}

where the expectation E {\displaystyle \operatorname {E} } is taken over x {\displaystyle x} conditioned on y {\displaystyle y} . When x {\displaystyle x} is a scalar variable, the MSE expression simplifies to E { ( x ^ x ) 2 } {\displaystyle \operatorname {E} \left\{({\hat {x}}-x)^{2}\right\}} . Note that MSE can equivalently be defined in other ways, since

tr { E { e e T } } = E { tr { e e T } } = E { e T e } = i = 1 n E { e i 2 } . {\displaystyle \operatorname {tr} \left\{\operatorname {E} \{ee^{T}\}\right\}=\operatorname {E} \left\{\operatorname {tr} \{ee^{T}\}\right\}=\operatorname {E} \{e^{T}e\}=\sum _{i=1}^{n}\operatorname {E} \{e_{i}^{2}\}.}

The MMSE estimator is then defined as the estimator achieving minimal MSE:

x ^ MMSE ( y ) = argmin x ^ MSE . {\displaystyle {\hat {x}}_{\operatorname {MMSE} }(y)=\operatorname {argmin} _{\hat {x}}\operatorname {MSE} .}

Properties

  • When the means and variances are finite, the MMSE estimator is uniquely defined[1] and is given by:
x ^ MMSE ( y ) = E { x y } . {\displaystyle {\hat {x}}_{\operatorname {MMSE} }(y)=\operatorname {E} \{x\mid y\}.}
In other words, the MMSE estimator is the conditional expectation of x {\displaystyle x} given the known observed value of the measurements. Also, since x ^ M M S E {\displaystyle {\hat {x}}_{\mathrm {MMSE} }} is the posterior mean, the error covariance matrix C e = E { ( x ^ x ) ( x ^ x ) T } {\displaystyle C_{e}=\operatorname {E} \{({\hat {x}}-x)({\hat {x}}-x)^{T}\}} is equal to the posterior covariance C X | Y {\displaystyle C_{X|Y}} matrix,
C e = C X | Y {\displaystyle C_{e}=C_{X|Y}} .
  • The MMSE estimator is unbiased (under the regularity assumptions mentioned above):
E { x ^ MMSE ( y ) } = E { E { x y } } = E { x } . {\displaystyle \operatorname {E} \{{\hat {x}}_{\operatorname {MMSE} }(y)\}=\operatorname {E} \{\operatorname {E} \{x\mid y\}\}=\operatorname {E} \{x\}.}
  • The MMSE estimator is asymptotically unbiased and it converges in distribution to the normal distribution:
n ( x ^ MMSE x ) d N ( 0 , I 1 ( x ) ) , {\displaystyle {\sqrt {n}}({\hat {x}}_{\operatorname {MMSE} }-x)\xrightarrow {d} {\mathcal {N}}\left(0,I^{-1}(x)\right),}
where I ( x ) {\displaystyle I(x)} is the Fisher information of x {\displaystyle x} . Thus, the MMSE estimator is asymptotically efficient.
  • The orthogonality principle: When x {\displaystyle x} is a scalar, an estimator constrained to be of certain form x ^ = g ( y ) {\displaystyle {\hat {x}}=g(y)} is an optimal estimator, i.e. x ^ MMSE = g ( y ) , {\displaystyle {\hat {x}}_{\operatorname {MMSE} }=g^{*}(y),} if and only if
E { ( x ^ MMSE x ) g ( y ) } = 0 {\displaystyle \operatorname {E} \{({\hat {x}}_{\operatorname {MMSE} }-x)g(y)\}=0}
for all g ( y ) {\displaystyle g(y)} in closed, linear subspace V = { g ( y ) g : R m R , E { g ( y ) 2 } < + } {\displaystyle {\mathcal {V}}=\{g(y)\mid g:\mathbb {R} ^{m}\rightarrow \mathbb {R} ,\operatorname {E} \{g(y)^{2}\}<+\infty \}} of the measurements. For random vectors, since the MSE for estimation of a random vector is the sum of the MSEs of the coordinates, finding the MMSE estimator of a random vector decomposes into finding the MMSE estimators of the coordinates of X separately:
E { ( g i ( y ) x i ) g j ( y ) } = 0 , {\displaystyle \operatorname {E} \{(g_{i}^{*}(y)-x_{i})g_{j}(y)\}=0,}
for all i and j. More succinctly put, the cross-correlation between the minimum estimation error x ^ MMSE x {\displaystyle {\hat {x}}_{\operatorname {MMSE} }-x} and the estimator x ^ {\displaystyle {\hat {x}}} should be zero,
E { ( x ^ MMSE x ) x ^ T } = 0. {\displaystyle \operatorname {E} \{({\hat {x}}_{\operatorname {MMSE} }-x){\hat {x}}^{T}\}=0.}
  • If x {\displaystyle x} and y {\displaystyle y} are jointly Gaussian, then the MMSE estimator is linear, i.e., it has the form W y + b {\displaystyle Wy+b} for matrix W {\displaystyle W} and constant b {\displaystyle b} . This can be directly shown using the Bayes theorem. As a consequence, to find the MMSE estimator, it is sufficient to find the linear MMSE estimator.

Linear MMSE estimator

In many cases, it is not possible to determine the analytical expression of the MMSE estimator. Two basic numerical approaches to obtain the MMSE estimate depends on either finding the conditional expectation E { x y } {\displaystyle \operatorname {E} \{x\mid y\}} or finding the minima of MSE. Direct numerical evaluation of the conditional expectation is computationally expensive since it often requires multidimensional integration usually done via Monte Carlo methods. Another computational approach is to directly seek the minima of the MSE using techniques such as the stochastic gradient descent methods; but this method still requires the evaluation of expectation. While these numerical methods have been fruitful, a closed form expression for the MMSE estimator is nevertheless possible if we are willing to make some compromises.

One possibility is to abandon the full optimality requirements and seek a technique minimizing the MSE within a particular class of estimators, such as the class of linear estimators. Thus, we postulate that the conditional expectation of x {\displaystyle x} given y {\displaystyle y} is a simple linear function of y {\displaystyle y} , E { x y } = W y + b {\displaystyle \operatorname {E} \{x\mid y\}=Wy+b} , where the measurement y {\displaystyle y} is a random vector, W {\displaystyle W} is a matrix and b {\displaystyle b} is a vector. This can be seen as the first order Taylor approximation of E { x y } {\displaystyle \operatorname {E} \{x\mid y\}} . The linear MMSE estimator is the estimator achieving minimum MSE among all estimators of such form. That is, it solves the following optimization problem:

min W , b MSE s.t. x ^ = W y + b . {\displaystyle \min _{W,b}\operatorname {MSE} \qquad {\text{s.t.}}\qquad {\hat {x}}=Wy+b.}

One advantage of such linear MMSE estimator is that it is not necessary to explicitly calculate the posterior probability density function of x {\displaystyle x} . Such linear estimator only depends on the first two moments of x {\displaystyle x} and y {\displaystyle y} . So although it may be convenient to assume that x {\displaystyle x} and y {\displaystyle y} are jointly Gaussian, it is not necessary to make this assumption, so long as the assumed distribution has well defined first and second moments. The form of the linear estimator does not depend on the type of the assumed underlying distribution.

The expression for optimal b {\displaystyle b} and W {\displaystyle W} is given by:

b = x ¯ W y ¯ , {\displaystyle b={\bar {x}}-W{\bar {y}},}
W = C X Y C Y 1 . {\displaystyle W=C_{XY}C_{Y}^{-1}.}

where x ¯ = E { x } {\displaystyle {\bar {x}}=\operatorname {E} \{x\}} , y ¯ = E { y } , {\displaystyle {\bar {y}}=\operatorname {E} \{y\},} the C X Y {\displaystyle C_{XY}} is cross-covariance matrix between x {\displaystyle x} and y {\displaystyle y} , the C Y {\displaystyle C_{Y}} is auto-covariance matrix of y {\displaystyle y} .

Thus, the expression for linear MMSE estimator, its mean, and its auto-covariance is given by

x ^ = C X Y C Y 1 ( y y ¯ ) + x ¯ , {\displaystyle {\hat {x}}=C_{XY}C_{Y}^{-1}(y-{\bar {y}})+{\bar {x}},}
E { x ^ } = x ¯ , {\displaystyle \operatorname {E} \{{\hat {x}}\}={\bar {x}},}
C X ^ = C X Y C Y 1 C Y X , {\displaystyle C_{\hat {X}}=C_{XY}C_{Y}^{-1}C_{YX},}

where the C Y X {\displaystyle C_{YX}} is cross-covariance matrix between y {\displaystyle y} and x {\displaystyle x} .

Lastly, the error covariance and minimum mean square error achievable by such estimator is

C e = C X C X ^ = C X C X Y C Y 1 C Y X , {\displaystyle C_{e}=C_{X}-C_{\hat {X}}=C_{X}-C_{XY}C_{Y}^{-1}C_{YX},}
LMMSE = tr { C e } . {\displaystyle \operatorname {LMMSE} =\operatorname {tr} \{C_{e}\}.}
Derivation using orthogonality principle

Let us have the optimal linear MMSE estimator given as x ^ = W y + b {\displaystyle {\hat {x}}=Wy+b} , where we are required to find the expression for W {\displaystyle W} and b {\displaystyle b} . It is required that the MMSE estimator be unbiased. This means,

E { x ^ } = E { x } . {\displaystyle \operatorname {E} \{{\hat {x}}\}=\operatorname {E} \{x\}.}

Plugging the expression for x ^ {\displaystyle {\hat {x}}} in above, we get

b = x ¯ W y ¯ , {\displaystyle b={\bar {x}}-W{\bar {y}},}

where x ¯ = E { x } {\displaystyle {\bar {x}}=\operatorname {E} \{x\}} and y ¯ = E { y } {\displaystyle {\bar {y}}=\operatorname {E} \{y\}} . Thus we can re-write the estimator as

x ^ = W ( y y ¯ ) + x ¯ {\displaystyle {\hat {x}}=W(y-{\bar {y}})+{\bar {x}}}

and the expression for estimation error becomes

x ^ x = W ( y y ¯ ) ( x x ¯ ) . {\displaystyle {\hat {x}}-x=W(y-{\bar {y}})-(x-{\bar {x}}).}

From the orthogonality principle, we can have E { ( x ^ x ) ( y y ¯ ) T } = 0 {\displaystyle \operatorname {E} \{({\hat {x}}-x)(y-{\bar {y}})^{T}\}=0} , where we take g ( y ) = y y ¯ {\displaystyle g(y)=y-{\bar {y}}} . Here the left-hand-side term is

E { ( x ^ x ) ( y y ¯ ) T } = E { ( W ( y y ¯ ) ( x x ¯ ) ) ( y y ¯ ) T } = W E { ( y y ¯ ) ( y y ¯ ) T } E { ( x x ¯ ) ( y y ¯ ) T } = W C Y C X Y . {\displaystyle {\begin{aligned}\operatorname {E} \{({\hat {x}}-x)(y-{\bar {y}})^{T}\}&=\operatorname {E} \{(W(y-{\bar {y}})-(x-{\bar {x}}))(y-{\bar {y}})^{T}\}\\&=W\operatorname {E} \{(y-{\bar {y}})(y-{\bar {y}})^{T}\}-\operatorname {E} \{(x-{\bar {x}})(y-{\bar {y}})^{T}\}\\&=WC_{Y}-C_{XY}.\end{aligned}}}

When equated to zero, we obtain the desired expression for W {\displaystyle W} as

W = C X Y C Y 1 . {\displaystyle W=C_{XY}C_{Y}^{-1}.}

The C X Y {\displaystyle C_{XY}} is cross-covariance matrix between X and Y, and C Y {\displaystyle C_{Y}} is auto-covariance matrix of Y. Since C X Y = C Y X T {\displaystyle C_{XY}=C_{YX}^{T}} , the expression can also be re-written in terms of C Y X {\displaystyle C_{YX}} as

W T = C Y 1 C Y X . {\displaystyle W^{T}=C_{Y}^{-1}C_{YX}.}

Thus the full expression for the linear MMSE estimator is

x ^ = C X Y C Y 1 ( y y ¯ ) + x ¯ . {\displaystyle {\hat {x}}=C_{XY}C_{Y}^{-1}(y-{\bar {y}})+{\bar {x}}.}

Since the estimate x ^ {\displaystyle {\hat {x}}} is itself a random variable with E { x ^ } = x ¯ {\displaystyle \operatorname {E} \{{\hat {x}}\}={\bar {x}}} , we can also obtain its auto-covariance as

C X ^ = E { ( x ^ x ¯ ) ( x ^ x ¯ ) T } = W E { ( y y ¯ ) ( y y ¯ ) T } W T = W C Y W T . {\displaystyle {\begin{aligned}C_{\hat {X}}&=\operatorname {E} \{({\hat {x}}-{\bar {x}})({\hat {x}}-{\bar {x}})^{T}\}\\&=W\operatorname {E} \{(y-{\bar {y}})(y-{\bar {y}})^{T}\}W^{T}\\&=WC_{Y}W^{T}.\\\end{aligned}}}

Putting the expression for W {\displaystyle W} and W T {\displaystyle W^{T}} , we get

C X ^ = C X Y C Y 1 C Y X . {\displaystyle C_{\hat {X}}=C_{XY}C_{Y}^{-1}C_{YX}.}

Lastly, the covariance of linear MMSE estimation error will then be given by

C e = E { ( x ^ x ) ( x ^ x ) T } = E { ( x ^ x ) ( W ( y y ¯ ) ( x x ¯ ) ) T } = E { ( x ^ x ) ( y y ¯ ) T } 0 W T E { ( x ^ x ) ( x x ¯ ) T } = E { ( W ( y y ¯ ) ( x x ¯ ) ) ( x x ¯ ) T } = E { ( x x ¯ ) ( x x ¯ ) T } W E { ( y y ¯ ) ( x x ¯ ) T } = C X W C Y X . {\displaystyle {\begin{aligned}C_{e}&=\operatorname {E} \{({\hat {x}}-x)({\hat {x}}-x)^{T}\}\\&=\operatorname {E} \{({\hat {x}}-x)(W(y-{\bar {y}})-(x-{\bar {x}}))^{T}\}\\&=\underbrace {\operatorname {E} \{({\hat {x}}-x)(y-{\bar {y}})^{T}\}} _{0}W^{T}-\operatorname {E} \{({\hat {x}}-x)(x-{\bar {x}})^{T}\}\\&=-\operatorname {E} \{(W(y-{\bar {y}})-(x-{\bar {x}}))(x-{\bar {x}})^{T}\}\\&=\operatorname {E} \{(x-{\bar {x}})(x-{\bar {x}})^{T}\}-W\operatorname {E} \{(y-{\bar {y}})(x-{\bar {x}})^{T}\}\\&=C_{X}-WC_{YX}.\end{aligned}}}

The first term in the third line is zero due to the orthogonality principle. Since W = C X Y C Y 1 {\displaystyle W=C_{XY}C_{Y}^{-1}} , we can re-write C e {\displaystyle C_{e}} in terms of covariance matrices as

C e = C X C X Y C Y 1 C Y X . {\displaystyle C_{e}=C_{X}-C_{XY}C_{Y}^{-1}C_{YX}.}

This we can recognize to be the same as C e = C X C X ^ . {\displaystyle C_{e}=C_{X}-C_{\hat {X}}.} Thus the minimum mean square error achievable by such a linear estimator is

LMMSE = tr { C e } {\displaystyle \operatorname {LMMSE} =\operatorname {tr} \{C_{e}\}} .

Univariate case

For the special case when both x {\displaystyle x} and y {\displaystyle y} are scalars, the above relations simplify to

x ^ = σ X Y σ Y 2 ( y y ¯ ) + x ¯ = ρ σ X σ Y ( y y ¯ ) + x ¯ , {\displaystyle {\hat {x}}={\frac {\sigma _{XY}}{\sigma _{Y}^{2}}}(y-{\bar {y}})+{\bar {x}}=\rho {\frac {\sigma _{X}}{\sigma _{Y}}}(y-{\bar {y}})+{\bar {x}},}
σ e 2 = σ X 2 σ X Y 2 σ Y 2 = ( 1 ρ 2 ) σ X 2 , {\displaystyle \sigma _{e}^{2}=\sigma _{X}^{2}-{\frac {\sigma _{XY}^{2}}{\sigma _{Y}^{2}}}=(1-\rho ^{2})\sigma _{X}^{2},}

where ρ = σ X Y σ X σ Y {\displaystyle \rho ={\frac {\sigma _{XY}}{\sigma _{X}\sigma _{Y}}}} is the Pearson's correlation coefficient between x {\displaystyle x} and y {\displaystyle y} .

The above two equations allows us to interpret the correlation coefficient either as normalized slope of linear regression

( x ^ x ¯ σ X ) = ρ ( y y ¯ σ Y ) {\displaystyle \left({\frac {{\hat {x}}-{\bar {x}}}{\sigma _{X}}}\right)=\rho \left({\frac {y-{\bar {y}}}{\sigma _{Y}}}\right)}

or as square root of the ratio of two variances

ρ 2 = σ X 2 σ e 2 σ X 2 = σ X ^ 2 σ X 2 {\displaystyle \rho ^{2}={\frac {\sigma _{X}^{2}-\sigma _{e}^{2}}{\sigma _{X}^{2}}}={\frac {\sigma _{\hat {X}}^{2}}{\sigma _{X}^{2}}}} .

When ρ = 0 {\displaystyle \rho =0} , we have x ^ = x ¯ {\displaystyle {\hat {x}}={\bar {x}}} and σ e 2 = σ X 2 {\displaystyle \sigma _{e}^{2}=\sigma _{X}^{2}} . In this case, no new information is gleaned from the measurement which can decrease the uncertainty in x {\displaystyle x} . On the other hand, when ρ = ± 1 {\displaystyle \rho =\pm 1} , we have x ^ = σ X Y σ Y ( y y ¯ ) + x ¯ {\displaystyle {\hat {x}}={\frac {\sigma _{XY}}{\sigma _{Y}}}(y-{\bar {y}})+{\bar {x}}} and σ e 2 = 0 {\displaystyle \sigma _{e}^{2}=0} . Here x {\displaystyle x} is completely determined by y {\displaystyle y} , as given by the equation of straight line.

Computation

Standard method like Gauss elimination can be used to solve the matrix equation for W {\displaystyle W} . A more numerically stable method is provided by QR decomposition method. Since the matrix C Y {\displaystyle C_{Y}} is a symmetric positive definite matrix, W {\displaystyle W} can be solved twice as fast with the Cholesky decomposition, while for large sparse systems conjugate gradient method is more effective. Levinson recursion is a fast method when C Y {\displaystyle C_{Y}} is also a Toeplitz matrix. This can happen when y {\displaystyle y} is a wide sense stationary process. In such stationary cases, these estimators are also referred to as Wiener–Kolmogorov filters.

Linear MMSE estimator for linear observation process

Let us further model the underlying process of observation as a linear process: y = A x + z {\displaystyle y=Ax+z} , where A {\displaystyle A} is a known matrix and z {\displaystyle z} is random noise vector with the mean E { z } = 0 {\displaystyle \operatorname {E} \{z\}=0} and cross-covariance C X Z = 0 {\displaystyle C_{XZ}=0} . Here the required mean and the covariance matrices will be

E { y } = A x ¯ , {\displaystyle \operatorname {E} \{y\}=A{\bar {x}},}
C Y = A C X A T + C Z , {\displaystyle C_{Y}=AC_{X}A^{T}+C_{Z},}
C X Y = C X A T . {\displaystyle C_{XY}=C_{X}A^{T}.}

Thus the expression for the linear MMSE estimator matrix W {\displaystyle W} further modifies to

W = C X A T ( A C X A T + C Z ) 1 . {\displaystyle W=C_{X}A^{T}(AC_{X}A^{T}+C_{Z})^{-1}.}

Putting everything into the expression for x ^ {\displaystyle {\hat {x}}} , we get

x ^ = C X A T ( A C X A T + C Z ) 1 ( y A x ¯ ) + x ¯ . {\displaystyle {\hat {x}}=C_{X}A^{T}(AC_{X}A^{T}+C_{Z})^{-1}(y-A{\bar {x}})+{\bar {x}}.}

Lastly, the error covariance is

C e = C X C X ^ = C X C X A T ( A C X A T + C Z ) 1 A C X . {\displaystyle C_{e}=C_{X}-C_{\hat {X}}=C_{X}-C_{X}A^{T}(AC_{X}A^{T}+C_{Z})^{-1}AC_{X}.}

The significant difference between the estimation problem treated above and those of least squares and Gauss–Markov estimate is that the number of observations m, (i.e. the dimension of y {\displaystyle y} ) need not be at least as large as the number of unknowns, n, (i.e. the dimension of x {\displaystyle x} ). The estimate for the linear observation process exists so long as the m-by-m matrix ( A C X A T + C Z ) 1 {\displaystyle (AC_{X}A^{T}+C_{Z})^{-1}} exists; this is the case for any m if, for instance, C Z {\displaystyle C_{Z}} is positive definite. Physically the reason for this property is that since x {\displaystyle x} is now a random variable, it is possible to form a meaningful estimate (namely its mean) even with no measurements. Every new measurement simply provides additional information which may modify our original estimate. Another feature of this estimate is that for m < n, there need be no measurement error. Thus, we may have C Z = 0 {\displaystyle C_{Z}=0} , because as long as A C X A T {\displaystyle AC_{X}A^{T}} is positive definite, the estimate still exists. Lastly, this technique can handle cases where the noise is correlated.

Alternative form

An alternative form of expression can be obtained by using the matrix identity

C X A T ( A C X A T + C Z ) 1 = ( A T C Z 1 A + C X 1 ) 1 A T C Z 1 , {\displaystyle C_{X}A^{T}(AC_{X}A^{T}+C_{Z})^{-1}=(A^{T}C_{Z}^{-1}A+C_{X}^{-1})^{-1}A^{T}C_{Z}^{-1},}

which can be established by post-multiplying by ( A C X A T + C Z ) {\displaystyle (AC_{X}A^{T}+C_{Z})} and pre-multiplying by ( A T C Z 1 A + C X 1 ) , {\displaystyle (A^{T}C_{Z}^{-1}A+C_{X}^{-1}),} to obtain

W = ( A T C Z 1 A + C X 1 ) 1 A T C Z 1 , {\displaystyle W=(A^{T}C_{Z}^{-1}A+C_{X}^{-1})^{-1}A^{T}C_{Z}^{-1},}

and

C e = ( A T C Z 1 A + C X 1 ) 1 . {\displaystyle C_{e}=(A^{T}C_{Z}^{-1}A+C_{X}^{-1})^{-1}.}

Since W {\displaystyle W} can now be written in terms of C e {\displaystyle C_{e}} as W = C e A T C Z 1 {\displaystyle W=C_{e}A^{T}C_{Z}^{-1}} , we get a simplified expression for x ^ {\displaystyle {\hat {x}}} as

x ^ = C e A T C Z 1 ( y A x ¯ ) + x ¯ . {\displaystyle {\hat {x}}=C_{e}A^{T}C_{Z}^{-1}(y-A{\bar {x}})+{\bar {x}}.}

In this form the above expression can be easily compared with ridge regression, weighed least square and Gauss–Markov estimate. In particular, when C X 1 = 0 {\displaystyle C_{X}^{-1}=0} , corresponding to infinite variance of the apriori information concerning x {\displaystyle x} , the result W = ( A T C Z 1 A ) 1 A T C Z 1 {\displaystyle W=(A^{T}C_{Z}^{-1}A)^{-1}A^{T}C_{Z}^{-1}} is identical to the weighed linear least square estimate with C Z 1 {\displaystyle C_{Z}^{-1}} as the weight matrix. Moreover, if the components of z {\displaystyle z} are uncorrelated and have equal variance such that C Z = σ 2 I , {\displaystyle C_{Z}=\sigma ^{2}I,} where I {\displaystyle I} is an identity matrix, then W = ( A T A ) 1 A T {\displaystyle W=(A^{T}A)^{-1}A^{T}} is identical to the ordinary least square estimate. When apriori information is available as C X 1 = λ I {\displaystyle C_{X}^{-1}=\lambda I} and the z {\displaystyle z} are uncorrelated and have equal variance, we have W = ( A T A + λ I ) 1 A T {\displaystyle W=(A^{T}A+\lambda I)^{-1}A^{T}} , which is identical to ridge regression solution.

Sequential linear MMSE estimation

In many real-time applications, observational data is not available in a single batch. Instead the observations are made in a sequence. One possible approach is to use the sequential observations to update an old estimate as additional data becomes available, leading to finer estimates. One crucial difference between batch estimation and sequential estimation is that sequential estimation requires an additional Markov assumption.

In the Bayesian framework, such recursive estimation is easily facilitated using Bayes' rule. Given k {\displaystyle k} observations, y 1 , , y k {\displaystyle y_{1},\ldots ,y_{k}} , Bayes' rule gives us the posterior density of x k {\displaystyle x_{k}} as

p ( x k | y 1 , , y k ) p ( y k | x , y 1 , , y k 1 ) p ( x k | y 1 , , y k 1 ) = p ( y k | x k ) p ( x k | y 1 , , y k 1 ) . {\displaystyle {\begin{aligned}p(x_{k}|y_{1},\ldots ,y_{k})&\propto p(y_{k}|x,y_{1},\ldots ,y_{k-1})p(x_{k}|y_{1},\ldots ,y_{k-1})\\&=p(y_{k}|x_{k})p(x_{k}|y_{1},\ldots ,y_{k-1}).\end{aligned}}}

The p ( x k | y 1 , , y k ) {\displaystyle p(x_{k}|y_{1},\ldots ,y_{k})} is called the posterior density, p ( y k | x k ) {\displaystyle p(y_{k}|x_{k})} is called the likelihood function, and p ( x k | y 1 , , y k 1 ) {\displaystyle p(x_{k}|y_{1},\ldots ,y_{k-1})} is the prior density of k-th time step. Here we have assumed the conditional independence of y k {\displaystyle y_{k}} from previous observations y 1 , , y k 1 {\displaystyle y_{1},\ldots ,y_{k-1}} given x {\displaystyle x} as

p ( y k | x k , y 1 , , y k 1 ) = p ( y k | x k ) . {\displaystyle p(y_{k}|x_{k},y_{1},\ldots ,y_{k-1})=p(y_{k}|x_{k}).}

This is the Markov assumption.

The MMSE estimate x ^ k {\displaystyle {\hat {x}}_{k}} given the k-th observation is then the mean of the posterior density p ( x k | y 1 , , y k ) {\displaystyle p(x_{k}|y_{1},\ldots ,y_{k})} . With the lack of dynamical information on how the state x {\displaystyle x} changes with time, we will make a further stationarity assumption about the prior:

p ( x k | y 1 , , y k 1 ) = p ( x k 1 | y 1 , , y k 1 ) . {\displaystyle p(x_{k}|y_{1},\ldots ,y_{k-1})=p(x_{k-1}|y_{1},\ldots ,y_{k-1}).}

Thus, the prior density for k-th time step is the posterior density of (k-1)-th time step. This structure allows us to formulate a recursive approach to estimation.

In the context of linear MMSE estimator, the formula for the estimate will have the same form as before: x ^ = C X Y C Y 1 ( y y ¯ ) + x ¯ . {\displaystyle {\hat {x}}=C_{XY}C_{Y}^{-1}(y-{\bar {y}})+{\bar {x}}.} However, the mean and covariance matrices of X {\displaystyle X} and Y {\displaystyle Y} will need to be replaced by those of the prior density p ( x k | y 1 , , y k 1 ) {\displaystyle p(x_{k}|y_{1},\ldots ,y_{k-1})} and likelihood p ( y k | x k ) {\displaystyle p(y_{k}|x_{k})} , respectively.

For the prior density p ( x k | y 1 , , y k 1 ) {\displaystyle p(x_{k}|y_{1},\ldots ,y_{k-1})} , its mean is given by the previous MMSE estimate,

x ¯ k = E [ x k | y 1 , , y k 1 ] = E [ x k 1 | y 1 , , y k 1 ] = x ^ k 1 {\displaystyle {\bar {x}}_{k}=\mathrm {E} [x_{k}|y_{1},\ldots ,y_{k-1}]=\mathrm {E} [x_{k-1}|y_{1},\ldots ,y_{k-1}]={\hat {x}}_{k-1}} ,

and its covariance matrix is given by the previous error covariance matrix,

C X k | Y 1 , , Y k 1 = C X k 1 | Y 1 , , Y k 1 = C e k 1 , {\displaystyle C_{X_{k}|Y_{1},\ldots ,Y_{k-1}}=C_{X_{k-1}|Y_{1},\ldots ,Y_{k-1}}=C_{e_{k-1}},}

as per by the properties of MMSE estimators and the stationarity assumption.

Similarly, for the linear observation process, the mean of the likelihood p ( y k | x k ) {\displaystyle p(y_{k}|x_{k})} is given by y ¯ k = A x ¯ k = A x ^ k 1 {\displaystyle {\bar {y}}_{k}=A{\bar {x}}_{k}=A{\hat {x}}_{k-1}} and the covariance matrix is as before

C Y k | X k = A C X k | Y 1 , , Y k 1 A T + C Z = A C e k 1 A T + C Z . {\displaystyle {\begin{aligned}C_{Y_{k}|X_{k}}&=AC_{X_{k}|Y_{1},\ldots ,Y_{k-1}}A^{T}+C_{Z}=AC_{e_{k-1}}A^{T}+C_{Z}.\end{aligned}}} .

The difference between the predicted value of Y k {\displaystyle Y_{k}} , as given by y ¯ k = A x ^ k 1 {\displaystyle {\bar {y}}_{k}=A{\hat {x}}_{k-1}} , and its observed value y k {\displaystyle y_{k}} gives the prediction error y ~ k = y k y ¯ k {\displaystyle {\tilde {y}}_{k}=y_{k}-{\bar {y}}_{k}} , which is also referred to as innovation or residual. It is more convenient to represent the linear MMSE in terms of the prediction error, whose mean and covariance are E [ y ~ k ] = 0 {\displaystyle \mathrm {E} [{\tilde {y}}_{k}]=0} and C Y ~ k = C Y k | X k {\displaystyle C_{{\tilde {Y}}_{k}}=C_{Y_{k}|X_{k}}} .

Hence, in the estimate update formula, we should replace x ¯ {\displaystyle {\bar {x}}} and C X {\displaystyle C_{X}} by x ^ k 1 {\displaystyle {\hat {x}}_{k-1}} and C e k 1 {\displaystyle C_{e_{k-1}}} , respectively. Also, we should replace y ¯ {\displaystyle {\bar {y}}} and C Y {\displaystyle C_{Y}} by y ¯ k 1 {\displaystyle {\bar {y}}_{k-1}} and C Y ~ k {\displaystyle C_{{\tilde {Y}}_{k}}} . Lastly, we replace C X Y {\displaystyle C_{XY}} by

C X k Y k | Y 1 , , Y k 1 = C e k 1 Y ~ k = C e k 1 A T . {\displaystyle {\begin{aligned}C_{X_{k}Y_{k}|Y_{1},\ldots ,Y_{k-1}}&=C_{e_{k-1}{\tilde {Y}}_{k}}=C_{e_{k-1}}A^{T}.\end{aligned}}}

Thus, we have the new estimate as new observation y k {\displaystyle y_{k}} arrives as

x ^ k = x ^ k 1 + C e k 1 Y ~ k C Y ~ k 1 ( y k y ¯ k ) = x ^ k 1 + C e k 1 A T ( A C e k 1 A T + C Z ) 1 ( y k A x ^ k 1 ) {\displaystyle {\begin{aligned}{\hat {x}}_{k}&={\hat {x}}_{k-1}+C_{e_{k-1}{\tilde {Y}}_{k}}C_{{\tilde {Y}}_{k}}^{-1}(y_{k}-{\bar {y}}_{k})\\&={\hat {x}}_{k-1}+C_{e_{k-1}}A^{T}(AC_{e_{k-1}}A^{T}+C_{Z})^{-1}(y_{k}-A{\hat {x}}_{k-1})\end{aligned}}}

and the new error covariance as

C e k = C e k 1 C e k 1 A T ( A C e k 1 A T + C Z ) 1 A C e k 1 . {\displaystyle C_{e_{k}}=C_{e_{k-1}}-C_{e_{k-1}}A^{T}(AC_{e_{k-1}}A^{T}+C_{Z})^{-1}AC_{e_{k-1}}.}

From the point of view of linear algebra, for sequential estimation, if we have an estimate x ^ 1 {\displaystyle {\hat {x}}_{1}} based on measurements generating space Y 1 {\displaystyle Y_{1}} , then after receiving another set of measurements, we should subtract out from these measurements that part that could be anticipated from the result of the first measurements. In other words, the updating must be based on that part of the new data which is orthogonal to the old data.

The repeated use of the above two equations as more observations become available lead to recursive estimation techniques. The expressions can be more compactly written as

W k = C e k 1 A T ( A C e k 1 A T + C Z ) 1 , {\displaystyle W_{k}=C_{e_{k-1}}A^{T}(AC_{e_{k-1}}A^{T}+C_{Z})^{-1},}
x ^ k = x ^ k 1 + W k ( y k A x ^ k 1 ) , {\displaystyle {\hat {x}}_{k}={\hat {x}}_{k-1}+W_{k}(y_{k}-A{\hat {x}}_{k-1}),}
C e k = ( I W k A ) C e k 1 . {\displaystyle C_{e_{k}}=(I-W_{k}A)C_{e_{k-1}}.}

The matrix W k {\displaystyle W_{k}} is often referred to as the Kalman gain factor. The alternative formulation of the above algorithm will give

C e k 1 = C e k 1 1 + A T C Z 1 A , {\displaystyle C_{e_{k}}^{-1}=C_{e_{k-1}}^{-1}+A^{T}C_{Z}^{-1}A,}
W k = C e k A T C Z 1 , {\displaystyle W_{k}=C_{e_{k}}A^{T}C_{Z}^{-1},}
x ^ k = x ^ k 1 + W k ( y k A x ^ k 1 ) , {\displaystyle {\hat {x}}_{k}={\hat {x}}_{k-1}+W_{k}(y_{k}-A{\hat {x}}_{k-1}),}

The repetition of these three steps as more data becomes available leads to an iterative estimation algorithm. The generalization of this idea to non-stationary cases gives rise to the Kalman filter. The three update steps outlined above indeed form the update step of the Kalman filter.

Special case: scalar observations

As an important special case, an easy to use recursive expression can be derived when at each k-th time instant the underlying linear observation process yields a scalar such that y k = a k T x k + z k {\displaystyle y_{k}=a_{k}^{T}x_{k}+z_{k}} , where a k {\displaystyle a_{k}} is n-by-1 known column vector whose values can change with time, x k {\displaystyle x_{k}} is n-by-1 random column vector to be estimated, and z k {\displaystyle z_{k}} is scalar noise term with variance σ k 2 {\displaystyle \sigma _{k}^{2}} . After (k+1)-th observation, the direct use of above recursive equations give the expression for the estimate x ^ k + 1 {\displaystyle {\hat {x}}_{k+1}} as:

x ^ k + 1 = x ^ k + w k + 1 ( y k + 1 a k + 1 T x ^ k ) {\displaystyle {\hat {x}}_{k+1}={\hat {x}}_{k}+w_{k+1}(y_{k+1}-a_{k+1}^{T}{\hat {x}}_{k})}

where y k + 1 {\displaystyle y_{k+1}} is the new scalar observation and the gain factor w k + 1 {\displaystyle w_{k+1}} is n-by-1 column vector given by

w k + 1 = C e k a k + 1 σ k + 1 2 + a k + 1 T C e k a k + 1 . {\displaystyle w_{k+1}={\frac {C_{e_{k}}a_{k+1}}{\sigma _{k+1}^{2}+a_{k+1}^{T}C_{e_{k}}a_{k+1}}}.}

The C e k + 1 {\displaystyle C_{e_{k+1}}} is n-by-n error covariance matrix given by

C e k + 1 = ( I w k + 1 a k + 1 T ) C e k . {\displaystyle C_{e_{k+1}}=(I-w_{k+1}a_{k+1}^{T})C_{e_{k}}.}

Here, no matrix inversion is required. Also, the gain factor, w k + 1 {\displaystyle w_{k+1}} , depends on our confidence in the new data sample, as measured by the noise variance, versus that in the previous data. The initial values of x ^ {\displaystyle {\hat {x}}} and C e {\displaystyle C_{e}} are taken to be the mean and covariance of the aprior probability density function of x {\displaystyle x} .

Alternative approaches: This important special case has also given rise to many other iterative methods (or adaptive filters), such as the least mean squares filter and recursive least squares filter, that directly solves the original MSE optimization problem using stochastic gradient descents. However, since the estimation error e {\displaystyle e} cannot be directly observed, these methods try to minimize the mean squared prediction error E { y ~ T y ~ } {\displaystyle \mathrm {E} \{{\tilde {y}}^{T}{\tilde {y}}\}} . For instance, in the case of scalar observations, we have the gradient x ^ E { y ~ 2 } = 2 E { y ~ a } . {\displaystyle \nabla _{\hat {x}}\mathrm {E} \{{\tilde {y}}^{2}\}=-2\mathrm {E} \{{\tilde {y}}a\}.} Thus, the update equation for the least mean square filter is given by

x ^ k + 1 = x ^ k + η k E { y ~ k a k } , {\displaystyle {\hat {x}}_{k+1}={\hat {x}}_{k}+\eta _{k}\mathrm {E} \{{\tilde {y}}_{k}a_{k}\},}

where η k {\displaystyle \eta _{k}} is the scalar step size and the expectation is approximated by the instantaneous value E { a k y ~ k } a k y ~ k {\displaystyle \mathrm {E} \{a_{k}{\tilde {y}}_{k}\}\approx a_{k}{\tilde {y}}_{k}} . As we can see, these methods bypass the need for covariance matrices.

Special Case: vector observation with uncorrelated noise

In many practical applications, the observation noise is uncorrelated. That is, C Z {\displaystyle C_{Z}} is a diagonal matrix. In such cases, it is advantageous to consider the components of y {\displaystyle y} as independent scalar measurements, rather than vector measurement. This allows us to reduce computation time by processing the m × 1 {\displaystyle m\times 1} measurement vector as m {\displaystyle m} scalar measurements. The use of scalar update formula avoids matrix inversion in the implementation of the covariance update equations, thus improving the numerical robustness against roundoff errors. The update can be implemented iteratively as:

w k + 1 ( ) = C e k ( ) A k + 1 ( ) T C Z k + 1 ( ) + A k + 1 ( ) C e k ( ) ( A k + 1 ( ) T ) {\displaystyle w_{k+1}^{(\ell )}={\frac {C_{e_{k}}^{(\ell )}A_{k+1}^{(\ell )T}}{C_{Z_{k+1}}^{(\ell )}+A_{k+1}^{(\ell )}C_{e_{k}}^{(\ell )}(A_{k+1}^{(\ell )T})}}}
C e k + 1 ( ) = ( I w k + 1 ( ) A k + 1 ( ) ) C e k ( ) {\displaystyle C_{e_{k+1}}^{(\ell )}=(I-w_{k+1}^{(\ell )}A_{k+1}^{(\ell )})C_{e_{k}}^{(\ell )}}
x ^ k + 1 ( ) = x ^ k ( 1 ) + w k + 1 ( ) ( y k + 1 ( ) A k + 1 ( ) x ^ k ( 1 ) ) {\displaystyle {\hat {x}}_{k+1}^{(\ell )}={\hat {x}}_{k}^{(\ell -1)}+w_{k+1}^{(\ell )}(y_{k+1}^{(\ell )}-A_{k+1}^{(\ell )}{\hat {x}}_{k}^{(\ell -1)})}

where = 1 , 2 , , m {\displaystyle \ell =1,2,\ldots ,m} , using the initial values C e k + 1 ( 0 ) = C e k {\displaystyle C_{e_{k+1}}^{(0)}=C_{e_{k}}} and x ^ k + 1 ( 0 ) = x ^ k {\displaystyle {\hat {x}}_{k+1}^{(0)}={\hat {x}}_{k}} . The intermediate variables C Z k + 1 ( ) {\displaystyle C_{Z_{k+1}}^{(\ell )}} is the {\displaystyle \ell } -th diagonal element of the m × m {\displaystyle m\times m} diagonal matrix C Z k + 1 {\displaystyle C_{Z_{k+1}}} ; while A k + 1 ( ) {\displaystyle A_{k+1}^{(\ell )}} is the {\displaystyle \ell } -th row of m × n {\displaystyle m\times n} matrix A k + 1 {\displaystyle A_{k+1}} . The final values are C e k + 1 ( m ) = C e k + 1 {\displaystyle C_{e_{k+1}}^{(m)}=C_{e_{k+1}}} and x ^ k + 1 ( m ) = x ^ k + 1 {\displaystyle {\hat {x}}_{k+1}^{(m)}={\hat {x}}_{k+1}} .

Examples

Example 1

We shall take a linear prediction problem as an example. Let a linear combination of observed scalar random variables z 1 , z 2 {\displaystyle z_{1},z_{2}} and z 3 {\displaystyle z_{3}} be used to estimate another future scalar random variable z 4 {\displaystyle z_{4}} such that z ^ 4 = i = 1 3 w i z i {\displaystyle {\hat {z}}_{4}=\sum _{i=1}^{3}w_{i}z_{i}} . If the random variables z = [ z 1 , z 2 , z 3 , z 4 ] T {\displaystyle z=[z_{1},z_{2},z_{3},z_{4}]^{T}} are real Gaussian random variables with zero mean and its covariance matrix given by

cov ( Z ) = E [ z z T ] = [ 1 2 3 4 2 5 8 9 3 8 6 10 4 9 10 15 ] , {\displaystyle \operatorname {cov} (Z)=\operatorname {E} [zz^{T}]=\left[{\begin{array}{cccc}1&2&3&4\\2&5&8&9\\3&8&6&10\\4&9&10&15\end{array}}\right],}

then our task is to find the coefficients w i {\displaystyle w_{i}} such that it will yield an optimal linear estimate z ^ 4 {\displaystyle {\hat {z}}_{4}} .

In terms of the terminology developed in the previous sections, for this problem we have the observation vector y = [ z 1 , z 2 , z 3 ] T {\displaystyle y=[z_{1},z_{2},z_{3}]^{T}} , the estimator matrix W = [ w 1 , w 2 , w 3 ] {\displaystyle W=[w_{1},w_{2},w_{3}]} as a row vector, and the estimated variable x = z 4 {\displaystyle x=z_{4}} as a scalar quantity. The autocorrelation matrix C Y {\displaystyle C_{Y}} is defined as

C Y = [ E [ z 1 , z 1 ] E [ z 2 , z 1 ] E [ z 3 , z 1 ] E [ z 1 , z 2 ] E [ z 2 , z 2 ] E [ z 3 , z 2 ] E [ z 1 , z 3 ] E [ z 2 , z 3 ] E [ z 3 , z 3 ] ] = [ 1 2 3 2 5 8 3 8 6 ] . {\displaystyle C_{Y}=\left[{\begin{array}{ccc}E[z_{1},z_{1}]&E[z_{2},z_{1}]&E[z_{3},z_{1}]\\E[z_{1},z_{2}]&E[z_{2},z_{2}]&E[z_{3},z_{2}]\\E[z_{1},z_{3}]&E[z_{2},z_{3}]&E[z_{3},z_{3}]\end{array}}\right]=\left[{\begin{array}{ccc}1&2&3\\2&5&8\\3&8&6\end{array}}\right].}

The cross correlation matrix C Y X {\displaystyle C_{YX}} is defined as

C Y X = [ E [ z 4 , z 1 ] E [ z 4 , z 2 ] E [ z 4 , z 3 ] ] = [ 4 9 10 ] . {\displaystyle C_{YX}=\left[{\begin{array}{c}E[z_{4},z_{1}]\\E[z_{4},z_{2}]\\E[z_{4},z_{3}]\end{array}}\right]=\left[{\begin{array}{c}4\\9\\10\end{array}}\right].}

We now solve the equation C Y W T = C Y X {\displaystyle C_{Y}W^{T}=C_{YX}} by inverting C Y {\displaystyle C_{Y}} and pre-multiplying to get

C Y 1 C Y X = [ 4.85 1.71 0.142 1.71 0.428 0.2857 0.142 0.2857 0.1429 ] [ 4 9 10 ] = [ 2.57 0.142 0.5714 ] = W T . {\displaystyle C_{Y}^{-1}C_{YX}=\left[{\begin{array}{ccc}4.85&-1.71&-0.142\\-1.71&0.428&0.2857\\-0.142&0.2857&-0.1429\end{array}}\right]\left[{\begin{array}{c}4\\9\\10\end{array}}\right]=\left[{\begin{array}{c}2.57\\-0.142\\0.5714\end{array}}\right]=W^{T}.}

So we have w 1 = 2.57 , {\displaystyle w_{1}=2.57,} w 2 = 0.142 , {\displaystyle w_{2}=-0.142,} and w 3 = .5714 {\displaystyle w_{3}=.5714} as the optimal coefficients for z ^ 4 {\displaystyle {\hat {z}}_{4}} . Computing the minimum mean square error then gives e min 2 = E [ z 4 z 4 ] W C Y X = 15 W C Y X = .2857 {\displaystyle \left\Vert e\right\Vert _{\min }^{2}=\operatorname {E} [z_{4}z_{4}]-WC_{YX}=15-WC_{YX}=.2857} .[2] Note that it is not necessary to obtain an explicit matrix inverse of C Y {\displaystyle C_{Y}} to compute the value of W {\displaystyle W} . The matrix equation can be solved by well known methods such as Gauss elimination method. A shorter, non-numerical example can be found in orthogonality principle.

Example 2

Consider a vector y {\displaystyle y} formed by taking N {\displaystyle N} observations of a fixed but unknown scalar parameter x {\displaystyle x} disturbed by white Gaussian noise. We can describe the process by a linear equation y = 1 x + z {\displaystyle y=1x+z} , where 1 = [ 1 , 1 , , 1 ] T {\displaystyle 1=[1,1,\ldots ,1]^{T}} . Depending on context it will be clear if 1 {\displaystyle 1} represents a scalar or a vector. Suppose that we know [ x 0 , x 0 ] {\displaystyle [-x_{0},x_{0}]} to be the range within which the value of x {\displaystyle x} is going to fall in. We can model our uncertainty of x {\displaystyle x} by an aprior uniform distribution over an interval [ x 0 , x 0 ] {\displaystyle [-x_{0},x_{0}]} , and thus x {\displaystyle x} will have variance of σ X 2 = x 0 2 / 3. {\displaystyle \sigma _{X}^{2}=x_{0}^{2}/3.} . Let the noise vector z {\displaystyle z} be normally distributed as N ( 0 , σ Z 2 I ) {\displaystyle N(0,\sigma _{Z}^{2}I)} where I {\displaystyle I} is an identity matrix. Also x {\displaystyle x} and z {\displaystyle z} are independent and C X Z = 0 {\displaystyle C_{XZ}=0} . It is easy to see that

E { y } = 0 , C Y = E { y y T } = σ X 2 11 T + σ Z 2 I , C X Y = E { x y T } = σ X 2 1 T . {\displaystyle {\begin{aligned}&\operatorname {E} \{y\}=0,\\&C_{Y}=\operatorname {E} \{yy^{T}\}=\sigma _{X}^{2}11^{T}+\sigma _{Z}^{2}I,\\&C_{XY}=\operatorname {E} \{xy^{T}\}=\sigma _{X}^{2}1^{T}.\end{aligned}}}

Thus, the linear MMSE estimator is given by

x ^ = C X Y C Y 1 y = σ X 2 1 T ( σ X 2 11 T + σ Z 2 I ) 1 y . {\displaystyle {\begin{aligned}{\hat {x}}&=C_{XY}C_{Y}^{-1}y\\&=\sigma _{X}^{2}1^{T}(\sigma _{X}^{2}11^{T}+\sigma _{Z}^{2}I)^{-1}y.\end{aligned}}}

We can simplify the expression by using the alternative form for W {\displaystyle W} as

x ^ = ( 1 T 1 σ Z 2 I 1 + 1 σ X 2 ) 1 1 T 1 σ Z 2 I y = 1 σ Z 2 ( N σ Z 2 + 1 σ X 2 ) 1 1 T y = σ X 2 σ X 2 + σ Z 2 / N y ¯ , {\displaystyle {\begin{aligned}{\hat {x}}&=\left(1^{T}{\frac {1}{\sigma _{Z}^{2}}}I1+{\frac {1}{\sigma _{X}^{2}}}\right)^{-1}1^{T}{\frac {1}{\sigma _{Z}^{2}}}Iy\\&={\frac {1}{\sigma _{Z}^{2}}}\left({\frac {N}{\sigma _{Z}^{2}}}+{\frac {1}{\sigma _{X}^{2}}}\right)^{-1}1^{T}y\\&={\frac {\sigma _{X}^{2}}{\sigma _{X}^{2}+\sigma _{Z}^{2}/N}}{\bar {y}},\end{aligned}}}

where for y = [ y 1 , y 2 , , y N ] T {\displaystyle y=[y_{1},y_{2},\ldots ,y_{N}]^{T}} we have y ¯ = 1 T y N = i = 1 N y i N . {\displaystyle {\bar {y}}={\frac {1^{T}y}{N}}={\frac {\sum _{i=1}^{N}y_{i}}{N}}.}

Similarly, the variance of the estimator is

σ X ^ 2 = C X Y C Y 1 C Y X = ( σ X 2 σ X 2 + σ Z 2 / N ) σ X 2 . {\displaystyle \sigma _{\hat {X}}^{2}=C_{XY}C_{Y}^{-1}C_{YX}={\Big (}{\frac {\sigma _{X}^{2}}{\sigma _{X}^{2}+\sigma _{Z}^{2}/N}}{\Big )}\sigma _{X}^{2}.}

Thus the MMSE of this linear estimator is

LMMSE = σ X 2 σ X ^ 2 = ( σ Z 2 σ X 2 + σ Z 2 / N ) σ X 2 N . {\displaystyle \operatorname {LMMSE} =\sigma _{X}^{2}-\sigma _{\hat {X}}^{2}={\Big (}{\frac {\sigma _{Z}^{2}}{\sigma _{X}^{2}+\sigma _{Z}^{2}/N}}{\Big )}{\frac {\sigma _{X}^{2}}{N}}.}

For very large N {\displaystyle N} , we see that the MMSE estimator of a scalar with uniform aprior distribution can be approximated by the arithmetic average of all the observed data

x ^ = 1 N i = 1 N y i , {\displaystyle {\hat {x}}={\frac {1}{N}}\sum _{i=1}^{N}y_{i},}

while the variance will be unaffected by data σ X ^ 2 = σ X 2 , {\displaystyle \sigma _{\hat {X}}^{2}=\sigma _{X}^{2},} and the LMMSE of the estimate will tend to zero.

However, the estimator is suboptimal since it is constrained to be linear. Had the random variable x {\displaystyle x} also been Gaussian, then the estimator would have been optimal. Notice, that the form of the estimator will remain unchanged, regardless of the apriori distribution of x {\displaystyle x} , so long as the mean and variance of these distributions are the same.

Example 3

Consider a variation of the above example: Two candidates are standing for an election. Let the fraction of votes that a candidate will receive on an election day be x [ 0 , 1 ] . {\displaystyle x\in [0,1].} Thus the fraction of votes the other candidate will receive will be 1 x . {\displaystyle 1-x.} We shall take x {\displaystyle x} as a random variable with a uniform prior distribution over [ 0 , 1 ] {\displaystyle [0,1]} so that its mean is x ¯ = 1 / 2 {\displaystyle {\bar {x}}=1/2} and variance is σ X 2 = 1 / 12. {\displaystyle \sigma _{X}^{2}=1/12.} A few weeks before the election, two independent public opinion polls were conducted by two different pollsters. The first poll revealed that the candidate is likely to get y 1 {\displaystyle y_{1}} fraction of votes. Since some error is always present due to finite sampling and the particular polling methodology adopted, the first pollster declares their estimate to have an error z 1 {\displaystyle z_{1}} with zero mean and variance σ Z 1 2 . {\displaystyle \sigma _{Z_{1}}^{2}.} Similarly, the second pollster declares their estimate to be y 2 {\displaystyle y_{2}} with an error z 2 {\displaystyle z_{2}} with zero mean and variance σ Z 2 2 . {\displaystyle \sigma _{Z_{2}}^{2}.} Note that except for the mean and variance of the error, the error distribution is unspecified. How should the two polls be combined to obtain the voting prediction for the given candidate?

As with previous example, we have

y 1 = x + z 1 y 2 = x + z 2 . {\displaystyle {\begin{aligned}y_{1}&=x+z_{1}\\y_{2}&=x+z_{2}.\end{aligned}}}

Here, both the E { y 1 } = E { y 2 } = x ¯ = 1 / 2 {\displaystyle \operatorname {E} \{y_{1}\}=\operatorname {E} \{y_{2}\}={\bar {x}}=1/2} . Thus, we can obtain the LMMSE estimate as the linear combination of y 1 {\displaystyle y_{1}} and y 2 {\displaystyle y_{2}} as

x ^ = w 1 ( y 1 x ¯ ) + w 2 ( y 2 x ¯ ) + x ¯ , {\displaystyle {\hat {x}}=w_{1}(y_{1}-{\bar {x}})+w_{2}(y_{2}-{\bar {x}})+{\bar {x}},}

where the weights are given by

w 1 = 1 / σ Z 1 2 1 / σ Z 1 2 + 1 / σ Z 2 2 + 1 / σ X 2 , w 2 = 1 / σ Z 2 2 1 / σ Z 1 2 + 1 / σ Z 2 2 + 1 / σ X 2 . {\displaystyle {\begin{aligned}w_{1}&={\frac {1/\sigma _{Z_{1}}^{2}}{1/\sigma _{Z_{1}}^{2}+1/\sigma _{Z_{2}}^{2}+1/\sigma _{X}^{2}}},\\w_{2}&={\frac {1/\sigma _{Z_{2}}^{2}}{1/\sigma _{Z_{1}}^{2}+1/\sigma _{Z_{2}}^{2}+1/\sigma _{X}^{2}}}.\end{aligned}}}

Here, since the denominator term is constant, the poll with lower error is given higher weight in order to predict the election outcome. Lastly, the variance of x ^ {\displaystyle {\hat {x}}} is given by

σ X ^ 2 = 1 / σ Z 1 2 + 1 / σ Z 2 2 1 / σ Z 1 2 + 1 / σ Z 2 2 + 1 / σ X 2 σ X 2 , {\displaystyle \sigma _{\hat {X}}^{2}={\frac {1/\sigma _{Z_{1}}^{2}+1/\sigma _{Z_{2}}^{2}}{1/\sigma _{Z_{1}}^{2}+1/\sigma _{Z_{2}}^{2}+1/\sigma _{X}^{2}}}\sigma _{X}^{2},}

which makes σ X ^ 2 {\displaystyle \sigma _{\hat {X}}^{2}} smaller than σ X 2 . {\displaystyle \sigma _{X}^{2}.} Thus, the LMMSE is given by

L M M S E = σ X 2 σ X ^ 2 = 1 1 / σ Z 1 2 + 1 / σ Z 2 2 + 1 / σ X 2 . {\displaystyle \mathrm {LMMSE} =\sigma _{X}^{2}-\sigma _{\hat {X}}^{2}={\frac {1}{1/\sigma _{Z_{1}}^{2}+1/\sigma _{Z_{2}}^{2}+1/\sigma _{X}^{2}}}.}

In general, if we have N {\displaystyle N} pollsters, then x ^ = i = 1 N w i ( y i x ¯ ) + x ¯ , {\displaystyle {\hat {x}}=\sum _{i=1}^{N}w_{i}(y_{i}-{\bar {x}})+{\bar {x}},} where the weight for i-th pollster is given by w i = 1 / σ Z i 2 j = 1 N 1 / σ Z j 2 + 1 / σ X 2 {\displaystyle w_{i}={\frac {1/\sigma _{Z_{i}}^{2}}{\sum _{j=1}^{N}1/\sigma _{Z_{j}}^{2}+1/\sigma _{X}^{2}}}} and the LMMSE is given by L M M S E = 1 j = 1 N 1 / σ Z j 2 + 1 / σ X 2 . {\displaystyle \mathrm {LMMSE} ={\frac {1}{\sum _{j=1}^{N}1/\sigma _{Z_{j}}^{2}+1/\sigma _{X}^{2}}}.}

Example 4

Suppose that a musician is playing an instrument and that the sound is received by two microphones, each of them located at two different places. Let the attenuation of sound due to distance at each microphone be a 1 {\displaystyle a_{1}} and a 2 {\displaystyle a_{2}} , which are assumed to be known constants. Similarly, let the noise at each microphone be z 1 {\displaystyle z_{1}} and z 2 {\displaystyle z_{2}} , each with zero mean and variances σ Z 1 2 {\displaystyle \sigma _{Z_{1}}^{2}} and σ Z 2 2 {\displaystyle \sigma _{Z_{2}}^{2}} respectively. Let x {\displaystyle x} denote the sound produced by the musician, which is a random variable with zero mean and variance σ X 2 . {\displaystyle \sigma _{X}^{2}.} How should the recorded music from these two microphones be combined, after being synced with each other?

We can model the sound received by each microphone as

y 1 = a 1 x + z 1 y 2 = a 2 x + z 2 . {\displaystyle {\begin{aligned}y_{1}&=a_{1}x+z_{1}\\y_{2}&=a_{2}x+z_{2}.\end{aligned}}}

Here both the E { y 1 } = E { y 2 } = 0 {\displaystyle \operatorname {E} \{y_{1}\}=\operatorname {E} \{y_{2}\}=0} . Thus, we can combine the two sounds as

y = w 1 y 1 + w 2 y 2 {\displaystyle y=w_{1}y_{1}+w_{2}y_{2}}

where the i-th weight is given as

w i = a i / σ Z i 2 j a j 2 / σ Z j 2 + 1 / σ X 2 . {\displaystyle w_{i}={\frac {a_{i}/\sigma _{Z_{i}}^{2}}{\sum _{j}a_{j}^{2}/\sigma _{Z_{j}}^{2}+1/\sigma _{X}^{2}}}.}

See also

Notes

  1. ^ "Mean Squared Error (MSE)". www.probabilitycourse.com. Retrieved 9 May 2017.
  2. ^ Moon and Stirling.

Further reading

  • Johnson, D. "Minimum Mean Squared Error Estimators". Connexions. Archived from Minimum Mean Squared Error Estimators the original on 25 July 2008. Retrieved 8 January 2013. {{cite web}}: Check |url= value (help)
  • Jaynes, E.T. (2003). Probability Theory: The Logic of Science. Cambridge University Press. ISBN 978-0521592710.
  • Bibby, J.; Toutenburg, H. (1977). Prediction and Improved Estimation in Linear Models. Wiley. ISBN 9780471016564.
  • Lehmann, E. L.; Casella, G. (1998). "Chapter 4". Theory of Point Estimation (2nd ed.). Springer. ISBN 0-387-98502-6.
  • Kay, S. M. (1993). Fundamentals of Statistical Signal Processing: Estimation Theory. Prentice Hall. pp. 344–350. ISBN 0-13-042268-1.
  • Luenberger, D.G. (1969). "Chapter 4, Least-squares estimation". Optimization by Vector Space Methods (1st ed.). Wiley. ISBN 978-0471181170.
  • Moon, T.K.; Stirling, W.C. (2000). Mathematical Methods and Algorithms for Signal Processing (1st ed.). Prentice Hall. ISBN 978-0201361865.
  • Van Trees, H. L. (1968). Detection, Estimation, and Modulation Theory, Part I. New York: Wiley. ISBN 0-471-09517-6.
  • Haykin, S.O. (2013). Adaptive Filter Theory (5th ed.). Prentice Hall. ISBN 978-0132671453.