# Minimum mean square error

(Redirected from Minimum mean squared 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, 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 ${\displaystyle x}$ be a ${\displaystyle n\times 1}$ hidden random vector variable, and let ${\displaystyle y}$ be a ${\displaystyle m\times 1}$ known random vector variable (the measurement or observation), both of them not necessarily of the same dimension. An estimator ${\displaystyle {\hat {x}}(y)}$ of ${\displaystyle x}$ is any function of the measurement ${\displaystyle y}$. The estimation error vector is given by ${\displaystyle e={\hat {x}}-x}$ and its mean squared error (MSE) is given by the trace of error covariance matrix

${\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 ${\displaystyle \operatorname {E} }$ is taken over both ${\displaystyle x}$ and ${\displaystyle y}$. When ${\displaystyle x}$ is a scalar variable, the MSE expression simplifies to ${\displaystyle \operatorname {E} \left\{({\hat {x}}-x)^{2}\right\}}$. Note that MSE can equivalently be defined in other ways, since

${\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:

${\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
${\displaystyle {\hat {x}}_{\operatorname {MMSE} }(y)=\operatorname {E} \{x\mid y\}.}$
In other words, the MMSE estimator is the conditional expectation of ${\displaystyle x}$ given the known observed value of the measurements.
• The MMSE estimator is unbiased (under the regularity assumptions mentioned above):
${\displaystyle \operatorname {E} \{{\hat {x}}_{\operatorname {MMSE} }(y)\}=\operatorname {E} \{\operatorname {E} \{x\mid y\}\}=\operatorname {E} \{x\}.}$
${\displaystyle {\sqrt {n}}({\hat {x}}-x){\xrightarrow {d}}{\mathcal {N}}\left(0,I^{-1}(x)\right),}$
where ${\displaystyle I(x)}$ is the Fisher information of ${\displaystyle x}$. Thus, the MMSE estimator is asymptotically efficient.
• The orthogonality principle: When ${\displaystyle x}$ is a scalar, an estimator constrained to be of certain form ${\displaystyle {\hat {x}}=g(y)}$ is an optimal estimator, i.e. ${\displaystyle {\hat {x}}_{\operatorname {MMSE} }=g^{*}(y),}$ if and only if
${\displaystyle \operatorname {E} \{({\hat {x}}_{\operatorname {MMSE} }-x)g(y)\}=0}$
for all ${\displaystyle g(y)}$ in closed, linear subspace ${\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:
${\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 ${\displaystyle {\hat {x}}_{\operatorname {MMSE} }-x}$ and the estimator ${\displaystyle {\hat {x}}}$ should be zero,
${\displaystyle \operatorname {E} \{({\hat {x}}_{\operatorname {MMSE} }-x){\hat {x}}^{T}\}=0.}$
• If ${\displaystyle x}$ and ${\displaystyle y}$ are jointly Gaussian, then the MMSE estimator is linear, i.e., it has the form ${\displaystyle Wy+b}$ for matrix ${\displaystyle W}$ and constant ${\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 ${\displaystyle \operatorname {E} \{x\mid y\}}$ or finding the minima of MSE. Direct numerical evaluation of the conditional expectation is computationally expensive, since they often require 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 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 ${\displaystyle x}$ given ${\displaystyle y}$ is a simple linear function of ${\displaystyle y}$, ${\displaystyle \operatorname {E} \{x\mid y\}=Wy+b}$, where the measurement ${\displaystyle y}$ is a random vector, ${\displaystyle W}$ is a matrix and ${\displaystyle b}$ is a vector. This can be seen as the first order Taylor approximation of ${\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 the optimization problem:

${\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 ${\displaystyle x}$. Such linear estimator only depends on the first two moments of ${\displaystyle x}$ and ${\displaystyle y}$. So although it may be convenient to assume that ${\displaystyle x}$ and ${\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 ${\displaystyle b}$ and ${\displaystyle W}$ is given by

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

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

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

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

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

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

${\displaystyle C_{e}=C_{X}-C_{\hat {X}}=C_{X}-C_{XY}C_{Y}^{-1}C_{YX},}$
${\displaystyle \operatorname {LMMSE} =\operatorname {tr} \{C_{e}\}.}$

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

${\displaystyle {\hat {x}}={\frac {\sigma _{XY}}{\sigma _{Y}^{2}}}(y-{\bar {y}})+{\bar {x}},}$
${\displaystyle \sigma _{e}^{2}=\sigma _{X}^{2}-{\frac {\sigma _{XY}^{2}}{\sigma _{Y}^{2}}}.}$

### Computation

Standard method like Gauss elimination can be used to solve the matrix equation for ${\displaystyle W}$. A more numerically stable method is provided by QR decomposition method. Since the matrix ${\displaystyle C_{Y}}$ is a symmetric positive definite matrix, ${\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 ${\displaystyle C_{Y}}$ is also a Toeplitz matrix. This can happen when ${\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: ${\displaystyle y=Ax+z}$, where ${\displaystyle A}$ is a known matrix and ${\displaystyle z}$ is random noise vector with the mean ${\displaystyle \operatorname {E} \{z\}=0}$ and cross-covariance ${\displaystyle C_{XZ}=0}$. Here the required mean and the covariance matrices will be

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

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

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

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

${\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

${\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 ${\displaystyle y}$) need not be at least as large as the number of unknowns, n, (i.e. the dimension of ${\displaystyle x}$). The estimate for the linear observation process exists so long as the m-by-m matrix ${\displaystyle (AC_{X}A^{T}+C_{Z})^{-1}}$ exists; this is the case for any m if, for instance, ${\displaystyle C_{Z}}$ is positive definite. Physically the reason for this property is that since ${\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 ${\displaystyle C_{Z}=0}$, because as long as ${\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

${\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 ${\displaystyle (AC_{X}A^{T}+C_{Z})}$ and pre-multiplying by ${\displaystyle (A^{T}C_{Z}^{-1}A+C_{X}^{-1}),}$ to obtain

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

and

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

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

${\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 weighed least square and Gauss–Markov estimate. In particular, when ${\displaystyle C_{X}^{-1}=0}$, corresponding to infinite variance of the apriori information concerning ${\displaystyle x}$, the result ${\displaystyle W=(A^{T}C_{Z}^{-1}A)^{-1}A^{T}C_{Z}^{-1}}$ is identical to the weighed linear least square estimate with ${\displaystyle C_{Z}^{-1}}$ as the weight matrix. Moreover, if the components of ${\displaystyle z}$ are uncorrelated and have equal variance such that ${\displaystyle C_{Z}=\sigma ^{2}I,}$ where ${\displaystyle I}$ is an identity matrix, then ${\displaystyle W=(A^{T}A)^{-1}A^{T}}$ is identical to the ordinary least square estimate.

## Sequential linear MMSE estimation

In many real-time application, observational data is not available in a single batch. Instead the observations are made in a sequence. A naive application of previous formulas would have us discard an old estimate and recompute a new estimate as fresh data is made available. But then we lose all information provided by the old observation. When the observations are scalar quantities, one possible way of avoiding such re-computation is to first concatenate the entire sequence of observations and then apply the standard estimation formula as done in Example 2. But this can be very tedious because as the number of observation increases so does the size of the matrices that need to be inverted and multiplied grow. Also, this method is difficult to extend to the case of vector observations. Another approach to estimation from sequential observations is to simply update an old estimate as additional data becomes available, leading to finer estimates. Thus a recursive method is desired where the new measurements can modify the old estimates. Implicit in these discussions is the assumption that the statistical properties of ${\displaystyle x}$ does not change with time. In other words, ${\displaystyle x}$ is stationary.

For sequential estimation, if we have an estimate ${\displaystyle {\hat {x}}_{1}}$ based on measurements generating space ${\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.

Suppose an optimal estimate ${\displaystyle {\hat {x}}_{1}}$ has been formed on the basis of past measurements and that error covariance matrix is ${\displaystyle C_{e_{1}}}$. For linear observation processes the best estimate of ${\displaystyle y}$ based on past observation, and hence old estimate ${\displaystyle {\hat {x}}_{1}}$, is ${\displaystyle {\hat {y}}=A{\hat {x}}_{1}}$. Subtracting ${\displaystyle {\hat {y}}}$ from ${\displaystyle y}$, we obtain

${\displaystyle {\tilde {y}}=y-{\hat {y}}=A(x-{\hat {x}}_{1})+z=Ae_{1}+z}$.

The new estimate based on additional data is now

${\displaystyle {\hat {x}}_{2}={\hat {x}}_{1}+C_{X{\tilde {Y}}}C_{\tilde {Y}}^{-1}{\tilde {y}},}$

where ${\displaystyle C_{X{\tilde {Y}}}}$ is the cross-covariance between ${\displaystyle x}$ and ${\displaystyle {\tilde {y}}}$ and ${\displaystyle C_{\tilde {Y}}}$ is the auto-covariance of ${\displaystyle {\tilde {y}}.}$

Using the fact that ${\displaystyle \operatorname {E} \{{\tilde {y}}\}=0}$ and ${\displaystyle x={\hat {x}}_{1}+e_{1}}$, we can obtain the covariance matrices in terms of error covariance as

${\displaystyle C_{\tilde {Y}}=AC_{e_{1}}A^{T}+C_{Z},}$
${\displaystyle C_{X{\tilde {Y}}}=\operatorname {E} \{({\hat {x}}_{1}+e_{1}-{\bar {x}})(Ae_{1}+z)^{T}\}=C_{e_{1}}A^{T}.}$

Putting everything together, we have the new estimate as

${\displaystyle {\hat {x}}_{2}={\hat {x}}_{1}+C_{e_{1}}A^{T}(AC_{e_{1}}A^{T}+C_{Z})^{-1}(y-A{\hat {x}}_{1}),}$

and the new error covariance as

${\displaystyle C_{e_{2}}=C_{e_{1}}-C_{e_{1}}A^{T}(AC_{e_{1}}A^{T}+C_{Z})^{-1}AC_{e_{1}}.}$

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

1. ${\displaystyle K_{t+1}=C_{e_{t}}A^{T}(AC_{e_{t}}A^{T}+C_{Z})^{-1},}$
2. ${\displaystyle {\hat {x}}_{t+1}={\hat {x}}_{t}+K_{t+1}(y-A{\hat {x}}_{t}),}$
3. ${\displaystyle C_{e_{t+1}}=(I-K_{t+1}A)C_{e_{t}}.}$

The matrix ${\displaystyle K}$ is often referred to as the gain factor. 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.

### Special case: scalar observations

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

${\displaystyle {\hat {x}}_{t+1}={\hat {x}}_{t}+k_{t+1}(y_{t+1}-a_{t+1}^{T}{\hat {x}}_{t})}$

where ${\displaystyle y_{t+1}}$ is the new scalar observation and the gain factor ${\displaystyle k_{t+1}}$ is n-by-1 column vector given by

${\displaystyle k_{t+1}={\frac {(C_{e})_{t}a_{t+1}}{\sigma _{t+1}^{2}+a_{t+1}^{T}(C_{e})_{t}a_{t+1}}}.}$

The ${\displaystyle (C_{e})_{t+1}}$ is n-by-n error covariance matrix given by

${\displaystyle (C_{e})_{t+1}=(I-k_{t+1}a_{t+1}^{T})(C_{e})_{t}.}$

Here no matrix inversion is required. Also the gain factor ${\displaystyle k_{t+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 ${\displaystyle {\hat {x}}}$ and ${\displaystyle C_{e}}$ are taken to be the mean and covariance of the aprior probability density function of ${\displaystyle x}$.

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 gradient descent methods. These methods bypass the need for covariance matrices.

## Examples

### Example 1

We shall take a linear prediction problem as an example. Let a linear combination of observed scalar random variables ${\displaystyle z_{1},z_{2}}$ and ${\displaystyle z_{3}}$ be used to estimate another future scalar random variable ${\displaystyle z_{4}}$ such that ${\displaystyle {\hat {z}}_{4}=\sum _{i=1}^{3}w_{i}z_{i}}$. If the random variables ${\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

${\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 ${\displaystyle w_{i}}$ such that it will yield an optimal linear estimate ${\displaystyle {\hat {z}}_{4}}$.

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

${\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 ${\displaystyle C_{YX}}$ is defined as

${\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 ${\displaystyle C_{Y}W^{T}=C_{YX}}$ by inverting ${\displaystyle C_{Y}}$ and pre-multiplying to get

${\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 ${\displaystyle w_{1}=2.57,}$ ${\displaystyle w_{2}=-0.142,}$ and ${\displaystyle w_{3}=.5714}$ as the optimal coefficients for ${\displaystyle {\hat {z}}_{4}}$. Computing the minimum mean square error then gives ${\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 ${\displaystyle C_{Y}}$ to compute the value of ${\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 ${\displaystyle y}$ formed by taking ${\displaystyle N}$ observations of a fixed but unknown scalar parameter ${\displaystyle x}$ disturbed by white Gaussian noise. We can describe the process by a linear equation ${\displaystyle y=1x+z}$, where ${\displaystyle 1=[1,1,\ldots ,1]^{T}}$. Depending on context it will be clear if ${\displaystyle 1}$ represents a scalar or a vector. Suppose that we know ${\displaystyle [-x_{0},x_{0}]}$ to be the range within which the value of ${\displaystyle x}$ is going to fall in. We can model our uncertainty of ${\displaystyle x}$ by an aprior uniform distribution over an interval ${\displaystyle [-x_{0},x_{0}]}$, and thus ${\displaystyle x}$ will have variance of ${\displaystyle \sigma _{X}^{2}=x_{0}^{2}/3.}$. Let the noise vector ${\displaystyle z}$ be normally distributed as ${\displaystyle N(0,\sigma _{Z}^{2}I)}$ where ${\displaystyle I}$ is an identity matrix. Also ${\displaystyle x}$ and ${\displaystyle z}$ are independent and ${\displaystyle C_{XZ}=0}$. It is easy to see that

{\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

{\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 ${\displaystyle W}$ as

{\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 ${\displaystyle y=[y_{1},y_{2},\ldots ,y_{N}]^{T}}$ we have ${\displaystyle {\bar {y}}={\frac {1^{T}y}{N}}={\frac {\sum _{i=1}^{N}y_{i}}{N}}.}$

Similarly, the variance of the estimator is

${\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

${\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 ${\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

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

while the variance will be unaffected by data ${\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 ${\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 ${\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 ${\displaystyle x\in [0,1].}$ Thus the fraction of votes the other candidate will receive will be ${\displaystyle 1-x.}$ We shall take ${\displaystyle x}$ as a random variable with a uniform prior distribution over ${\displaystyle [0,1]}$ so that its mean is ${\displaystyle {\bar {x}}=1/2}$ and variance is ${\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 ${\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 ${\displaystyle z_{1}}$ with zero mean and variance ${\displaystyle \sigma _{Z_{1}}^{2}.}$ Similarly, the second pollster declares their estimate to be ${\displaystyle y_{2}}$ with an error ${\displaystyle z_{2}}$ with zero mean and variance ${\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

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

Here both the ${\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 ${\displaystyle y_{1}}$ and ${\displaystyle y_{2}}$ as

${\displaystyle {\hat {x}}=w_{1}(y_{1}-{\bar {x}})+w_{2}(y_{2}-{\bar {x}})+{\bar {x}},}$

where the weights are given by

{\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 the prediction is given by

${\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 ${\displaystyle \sigma _{\hat {X}}^{2}}$ smaller than ${\displaystyle \sigma _{X}^{2}.}$

In general, if we have ${\displaystyle N}$ pollsters, then the weight for i-th pollster is given by ${\displaystyle w_{i}={\frac {1/\sigma _{Z_{i}}^{2}}{\sum _{i=1}^{N}1/\sigma _{Z_{i}}^{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 ${\displaystyle a_{1}}$ and ${\displaystyle a_{2}}$, which are assumed to be known constants. Similarly, let the noise at each microphone be ${\displaystyle z_{1}}$ and ${\displaystyle z_{2}}$, each with zero mean and variances ${\displaystyle \sigma _{Z_{1}}^{2}}$ and ${\displaystyle \sigma _{Z_{2}}^{2}}$ respectively. Let ${\displaystyle x}$ denote the sound produced by the musician, which is a random variable with zero mean and variance ${\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

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

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

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

where the i-th weight is given as

${\displaystyle w_{i}={\frac {a_{i}/\sigma _{Z_{i}}^{2}}{\sum _{i}a_{i}^{2}/\sigma _{Z_{i}}^{2}+1/\sigma _{X}^{2}}}.}$

## Notes

1. ^ "Mean Squared Error (MSE)". www.probabilitycourse.com. Retrieved 2017-05-09.
2. ^ Moon and Stirling.

• Johnson, D. Minimum Mean Squared Error Estimators "Minimum Mean Squared Error Estimators" Check |url= value (help). Connexions. Retrieved 8 January 2013.