Minimum mean square error explained

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

be a

n x 1

hidden random vector variable, and let

y

be a

m x 1

known random vector variable (the measurement or observation), both of them not necessarily of the same dimension. An estimator

\hat{x}(y)

of

x

is any function of the measurement

y

. The estimation error vector is given by

e=\hat{x}-x

and its mean squared error (MSE) is given by the trace of error covariance matrix

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

\operatorname{E}

is taken over

x

conditioned on

y

. When

x

is a scalar variable, the MSE expression simplifies to

\operatorname{E}\left\{(\hat{x}-x)2\right\}

. Note that MSE can equivalently be defined in other ways, since

\operatorname{tr}\left\{\operatorname{E}\{eeT\}\right\}=\operatorname{E}\left\{\operatorname{tr}\{eeT\}\right\}=\operatorname{E}\{eTe\}=

n
\sum
i=1
2\}.
\operatorname{E}\{e
i

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

\hat{x}\operatorname{MMSE

}(y) = \operatorname_ \operatorname.

Properties

\hat{x}\operatorname{MMSE

}(y) = \operatorname \.

In other words, the MMSE estimator is the conditional expectation of

x

given the known observed value of the measurements. Also, since

\hat{x}MMSE

is the posterior mean, the error covariance matrix

Ce=\operatorname{E}\{(\hat{x}-x)(\hat{x}-x)T\}

is equal to the posterior covariance

CX|Y

matrix,

Ce=CX|Y

.

\operatorname{E}\{\hat{x}\operatorname{MMSE

}(y)\} = \operatorname\ = \operatorname\.

\sqrt{n}(\hat{x}\operatorname{MMSE

} - x) \xrightarrow \mathcal\left(0, I^(x)\right),

where

I(x)

is the Fisher information of

x

. Thus, the MMSE estimator is asymptotically efficient.

x

is a scalar, an estimator constrained to be of certain form

\hat{x}=g(y)

is an optimal estimator, i.e.

\hat{x}\operatorname{MMSE

}=g^*(y), if and only if

\operatorname{E}\{(\hat{x}\operatorname{MMSE

}-x) g(y) \} = 0

for all

g(y)

in closed, linear subspace

l{V}=\{g(y)\midg:RmR,\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:

\operatorname{E}\{

*(y)-x
(g
i)

gj(y)\}=0,

for all i and j. More succinctly put, the cross-correlation between the minimum estimation error

\hat{x}\operatorname{MMSE

}-x and the estimator

\hat{x}

should be zero,

\operatorname{E}\{(\hat{x}\operatorname{MMSE

}-x)\hat^T \} = 0.

x

and

y

are jointly Gaussian, then the MMSE estimator is linear, i.e., it has the form

Wy+b

for matrix

W

and constant

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

\operatorname{E}\{x\midy\}

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

given

y

is a simple linear function of

y

,

\operatorname{E}\{x\midy\}=Wy+b

, where the measurement

y

is a random vector,

W

is a matrix and

b

is a vector. This can be seen as the first order Taylor approximation of

\operatorname{E}\{x\midy\}

. The linear MMSE estimator is the estimator achieving minimum MSE among all estimators of such form. That is, it solves the following optimization problem:

minW,b\operatorname{MSE}    s.t.    \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

. Such linear estimator only depends on the first two moments of

x

and

y

. So although it may be convenient to assume that

x

and

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

and

W

is given by:

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

W=CXY

-1
C
Y

.

where

\bar{x}=\operatorname{E}\{x\}

,

\bar{y}=\operatorname{E}\{y\},

the

CXY

is cross-covariance matrix between

x

and

y

, the

CY

is auto-covariance matrix of

y

.

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

\hat{x}=CXY

-1
C
Y

(y-\bar{y})+\bar{x},

\operatorname{E}\{\hat{x}\}=\bar{x},

C\hat{X

} = C_ C^_Y C_,

where the

CYX

is cross-covariance matrix between

y

and

x

.

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

Ce=CX-C\hat{X

} = C_X - C_ C^_Y C_,

\operatorname{LMMSE}=\operatorname{tr}\{Ce\}.

Let us have the optimal linear MMSE estimator given as

\hat{x}=Wy+b

, where we are required to find the expression for

W

and

b

. It is required that the MMSE estimator be unbiased. This means,

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

Plugging the expression for

\hat{x}

in above, we get

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

where

\bar{x}=\operatorname{E}\{x\}

and

\bar{y}=\operatorname{E}\{y\}

. Thus we can re-write the estimator as

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

and the expression for estimation error becomes

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

From the orthogonality principle, we can have

\operatorname{E}\{(\hat{x}-x)(y-\bar{y})T\}=0

, where we take

g(y)=y-\bar{y}

. Here the left-hand-side term is

\begin{align} \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\}\ &=WCY-CXY.\end{align}

When equated to zero, we obtain the desired expression for

W

as

W=CXY

-1
C
Y

.

The

CXY

is cross-covariance matrix between X and Y, and

CY

is auto-covariance matrix of Y. Since

CXY

T
=C
YX
, the expression can also be re-written in terms of

CYX

as

WT=

-1
C
Y

CYX.

Thus the full expression for the linear MMSE estimator is

\hat{x}=CXY

-1
C
Y

(y-\bar{y})+\bar{x}.

Since the estimate

\hat{x}

is itself a random variable with

\operatorname{E}\{\hat{x}\}=\bar{x}

, we can also obtain its auto-covariance as

\begin{align} C\hat{X

} &= \operatorname\ \\ &= W \operatorname\ W^T \\ &= W C_Y W^T .\\\end

Putting the expression for

W

and

WT

, we get

C\hat{X

} = C_ C^_Y C_.

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

\begin{align} Ce&=\operatorname{E}\{(\hatx-x)(\hatx-x)T\}\\ &=\operatorname{E}\{(\hatx-x)(W(y-\bar{y})-(x-\bar{x}))T\}\\ &=\underbrace{\operatorname{E}\{(\hatx-x)(y-\bar{y})T\}}0WT-\operatorname{E}\{(\hatx-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\}\\ &=CX-WCYX. \end{align}

The first term in the third line is zero due to the orthogonality principle. Since

W=CXY

-1
C
Y
, we can re-write

Ce

in terms of covariance matrices as

Ce=CX-CXY

-1
C
Y

CYX.

This we can recognize to be the same as

Ce=CX-C\hat{X

}. Thus the minimum mean square error achievable by such a linear estimator is

\operatorname{LMMSE}=\operatorname{tr}\{Ce\}

.

Univariate case

For the special case when both

x

and

y

are scalars, the above relations simplify to

\hat{x}=

\sigmaXY
2
\sigma
Y

(y-\bar{y})+\bar{x}=\rho

\sigmaX
\sigmaY

(y-\bar{y})+\bar{x},

2
\sigma
e

=

2
\sigma
X

-

2
\sigma
XY
2
\sigma
Y

=(1-

2,
\rho
X

where

\rho=

\sigmaXY
\sigmaX\sigmaY
is the Pearson's correlation coefficient between

x

and

y

.

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

\left(\hat{x
-

\bar{x}}{\sigmaX

}\right) = \rho \left(\frac\right)

or as square root of the ratio of two variances

\rho2=

2
\sigma-
2
\sigma
e
X
2
\sigma
X

=

2
\sigma
\hat{X
}.

When

\rho=0

, we have

\hat{x}=\bar{x}

and
2
\sigma
e

=

2
\sigma
X
. In this case, no new information is gleaned from the measurement which can decrease the uncertainty in

x

. On the other hand, when

\rho=\pm1

, we have

\hat{x}=

\sigmaXY
\sigmaY

(y-\bar{y})+\bar{x}

and
2
\sigma
e

=0

. Here

x

is completely determined by

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

. A more numerically stable method is provided by QR decomposition method. Since the matrix

CY

is a symmetric positive definite matrix,

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

CY

is also a Toeplitz matrix. This can happen when

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=Ax+z

, where

A

is a known matrix and

z

is random noise vector with the mean

\operatorname{E}\{z\}=0

and cross-covariance

CXZ=0

. Here the required mean and the covariance matrices will be

\operatorname{E}\{y\}=A\bar{x},

CY=

T
AC
XA

+CZ,

CXY=CXAT.

Thus the expression for the linear MMSE estimator matrix

W

further modifies to

W=CX

T
A
XA

+

-1
C
Z)

.

Putting everything into the expression for

\hat{x}

, we get

\hat{x}=CX

T
A
XA

+

-1
C
Z)

(y-A\bar{x})+\bar{x}.

Lastly, the error covariance is

Ce=CX-C\hat{X

} = C_X - C_X A^T(AC_XA^T + C_Z)^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

) need not be at least as large as the number of unknowns, n, (i.e. the dimension of

x

). The estimate for the linear observation process exists so long as the m-by-m matrix
T
(AC
XA

+

-1
C
Z)
exists; this is the case for any m if, for instance,

CZ

is positive definite. Physically the reason for this property is that since

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

CZ=0

, because as long as
T
AC
XA
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

CX

T
A
XA

+

-1
C
Z)

=

-1
(A
Z

A+

-1
C
X

)-1AT

-1
C
Z

,

which can be established by post-multiplying by
T
(AC
XA

+CZ)

and pre-multiplying by
-1
(A
Z

A+

-1
C
X

),

to obtain

W=

-1
(A
Z

A+

-1
C
X

)-1

-1
A
Z

,

and

Ce=

-1
(A
Z

A+

-1
C
X

)-1.

Since

W

can now be written in terms of

Ce

as

W=CeAT

-1
C
Z
, we get a simplified expression for

\hat{x}

as

\hat{x}=CeAT

-1
C
Z

(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

-1
C
X

=0

, corresponding to infinite variance of the apriori information concerning

x

, the result

W=

-1
(A
Z

A)-1

-1
A
Z
is identical to the weighed linear least square estimate with
-1
C
Z
as the weight matrix. Moreover, if the components of

z

are uncorrelated and have equal variance such that

CZ=\sigma2I,

where

I

is an identity matrix, then

W=(ATA)-1AT

is identical to the ordinary least square estimate. When apriori information is available as
-1
C
X

I

and the

z

are uncorrelated and have equal variance, we have

W=(ATA+λI)-1AT

, 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

observations,

y1,\ldots,yk

, Bayes' rule gives us the posterior density of

xk

as

\begin{align} p(xk|y1,\ldots,yk)&\proptop(yk|x,y1,\ldots,yk-1)p(xk|y1,\ldots,yk-1)\\ &=p(yk|xk)p(xk|y1,\ldots,yk-1). \end{align}

The

p(xk|y1,\ldots,yk)

is called the posterior density,

p(yk|xk)

is called the likelihood function, and

p(xk|y1,\ldots,yk-1)

is the prior density of k-th time step. Here we have assumed the conditional independence of

yk

from previous observations

y1,\ldots,yk-1

given

x

as

p(yk|xk,y1,\ldots,yk-1)=p(yk|xk).

This is the Markov assumption.

The MMSE estimate

\hat{x}k

given the k-th observation is then the mean of the posterior density

p(xk|y1,\ldots,yk)

. With the lack of dynamical information on how the state

x

changes with time, we will make a further stationarity assumption about the prior:

p(xk|y1,\ldots,yk-1)=p(xk-1|y1,\ldots,yk-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:

\hat{x}=CXY

-1
C
Y

(y-\bar{y})+\bar{x}.

However, the mean and covariance matrices of

X

and

Y

will need to be replaced by those of the prior density

p(xk|y1,\ldots,yk-1)

and likelihood

p(yk|xk)

, respectively.

For the prior density

p(xk|y1,\ldots,yk-1)

, its mean is given by the previous MMSE estimate,

\bar{x}k=E[xk|y1,\ldots,yk-1]=E[xk-1|y1,\ldots,yk-1]=\hat{x}k-1

,

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

C
Xk|Y1,\ldots,Yk-1

=

C
Xk-1|Y1,\ldots,Yk-1

=

C
ek-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(yk|xk)

is given by

\bar{y}k=A\bar{x}k=A\hat{x}k-1

and the covariance matrix is as before
\begin{align} C
Yk|Xk

&=A

C
Xk|Y1,\ldots,Yk-1

AT+CZ=A

C
ek-1

AT+CZ. \end{align}

.

The difference between the predicted value of

Yk

, as given by

\bar{y}k=A\hat{x}k-1

, and its observed value

yk

gives the prediction error

\tilde{y}k=yk-\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[\tilde{y}k]=0

and

C\tilde{Yk}=

C
Yk|Xk
.

Hence, in the estimate update formula, we should replace

\bar{x}

and

CX

by

\hat{x}k-1

and
C
ek-1
, respectively. Also, we should replace

\bar{y}

and

CY

by

\bar{y}k-1

and

C\tilde{Yk}

. Lastly, we replace

CXY

by
\begin{align} C
XkYk|Y1,\ldots,Yk-1

&=

C
ek-1\tilde{Y

k}=

C
ek-1

AT. \end{align}

Thus, we have the new estimate as new observation

yk

arrives as

\begin{align} \hat{x}k&=\hat{x}k-1+

C
ek-1\tilde{Y

k}C\tilde{Y

-1
k}

(yk-\bar{y}k)\ &=\hat{x}k-1+

C
ek-1

AT

(AC
ek-1

AT+

-1
C
Z)

(yk-A\hat{x}k-1) \end{align}

and the new error covariance as
C
ek

=

C
ek-1

-

C
ek-1
T(AC
A
ek-1

AT+

-1
C
Z)
AC
ek-1

.

From the point of view of linear algebra, for sequential estimation, if we have an estimate

\hat{x}1

based on measurements generating space

Y1

, 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

Wk=

C
ek-1
T(AC
A
ek-1

AT+

-1
C
Z)

,

\hat{x}k=\hat{x}k-1+Wk(yk-A\hat{x}k-1),

C
ek

=(I-Wk

A)C
ek-1

.

The matrix

Wk

is often referred to as the Kalman gain factor. The alternative formulation of the above algorithm will give
-1
C
ek

=

-1
C
ek-1

+AT

-1
C
Z

A,

Wk=

C
ek

AT

-1
C
Z

,

\hat{x}k=\hat{x}k-1+Wk(yk-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

yk=

T
a
k

xk+zk

, where

ak

is n-by-1 known column vector whose values can change with time,

xk

is n-by-1 random column vector to be estimated, and

zk

is scalar noise term with variance
2
\sigma
k
. After (k+1)-th observation, the direct use of above recursive equations give the expression for the estimate

\hat{x}k+1

as:

\hat{x}k+1=\hat{x}k+wk+1(yk+1-

T
a
k+1

\hat{x}k)

where

yk+1

is the new scalar observation and the gain factor

wk+1

is n-by-1 column vector given by

wk+1=

Cak+1
ek
2
\sigma+
T
a
k+1
C
ek
ak+1
k+1

.

The
C
ek+1
is n-by-n error covariance matrix given by
C
ek+1

=(I-wk+1

T
a
k+1
)C
ek

.

Here, no matrix inversion is required. Also, the gain factor,

wk+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

\hat{x}

and

Ce

are taken to be the mean and covariance of the aprior probability density function of

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

cannot be directly observed, these methods try to minimize the mean squared prediction error

E\{\tilde{y}T\tilde{y}\}

. For instance, in the case of scalar observations, we have the gradient

\nabla\hat{x

} \mathrm\ = -2 \mathrm\. Thus, the update equation for the least mean square filter is given by

\hat{x}k+1=\hat{x}k+ηkE\{\tilde{y}kak\},

where

ηk

is the scalar step size and the expectation is approximated by the instantaneous value

E\{ak\tilde{y}k\}ak\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,

CZ

is a diagonal matrix. In such cases, it is advantageous to consider the components of

y

as independent scalar measurements, rather than vector measurement. This allows us to reduce computation time by processing the

m x 1

measurement vector as

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:
(\ell)
w
k+1

=

(\ell)
C
ek
(\ell)T
A
k+1
(\ell)
C
Zk+1
+
(\ell)
A
k+1
(\ell)
C
ek
(\ell)T
(A
k+1
)
(\ell)
C
ek+1

=(I-

(\ell)
w
k+1
(\ell)
A
k+1
(\ell)
)C
ek
(\ell)
\hat{x}
k+1

=

(\ell-1)
\hat{x}
k

+

(\ell)
w
k+1
(\ell)
(y
k+1

-

(\ell)
A
k+1
(\ell-1)
\hat{x}
k

)

where

\ell=1,2,\ldots,m

, using the initial values
(0)
C
ek+1

=

C
ek
and
(0)
\hat{x}
k+1

=\hat{x}k

. The intermediate variables
(\ell)
C
Zk+1
is the

\ell

-th diagonal element of the

m x m

diagonal matrix
C
Zk+1
; while
(\ell)
A
k+1
is the

\ell

-th row of

m x n

matrix

Ak+1

. The final values are
(m)
C
ek+1

=

C
ek+1
and
(m)
\hat{x}
k+1

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

z1,z2

and

z3

be used to estimate another future scalar random variable

z4

such that

\hatz4

3
=\sum
i=1

wizi

. If the random variables

z=[z1,z2,z3,z4]T

are real Gaussian random variables with zero mean and its covariance matrix given by

\operatorname{cov}(Z)=\operatorname{E}[zzT]=\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

wi

such that it will yield an optimal linear estimate

\hatz4

.

In terms of the terminology developed in the previous sections, for this problem we have the observation vector

y=[z1,z2,

T
z
3]
, the estimator matrix

W=[w1,w2,w3]

as a row vector, and the estimated variable

x=z4

as a scalar quantity. The autocorrelation matrix

CY

is defined as

CY=\left[\begin{array}{ccc} E[z1,z1]&E[z2,z1]&E[z3,z1]\\ E[z1,z2]&E[z2,z2]&E[z3,z2]\\ E[z1,z3]&E[z2,z3]&E[z3,z3]\end{array}\right]=\left[\begin{array}{ccc} 1&2&3\\ 2&5&8\\ 3&8&6\end{array}\right].

The cross correlation matrix

CYX

is defined as

CYX=\left[\begin{array}{c} E[z4,z1]\\ E[z4,z2]\\ E[z4,z3]\end{array}\right]=\left[\begin{array}{c} 4\\ 9\\ 10\end{array}\right].

We now solve the equation

CY

T=C
W
YX
by inverting

CY

and pre-multiplying to get
-1
C
Y

CYX=\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]=WT.

So we have

w1=2.57,

w2=-0.142,

and

w3=.5714

as the optimal coefficients for

\hatz4

. Computing the minimummean square error then gives

\left\Verte\right\Vert

2=\operatorname{E}[z
4

z4]-WCYX=15-WCYX=.2857

.[2] Note that it is not necessary to obtain an explicit matrix inverse of

CY

to compute the value of

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

formed by taking

N

observations of a fixed but unknown scalar parameter

x

disturbed by white Gaussian noise. We can describe the process by a linear equation

y=1x+z

, where

1=[1,1,\ldots,1]T

. Depending on context it will be clear if

1

represents a scalar or a vector. Suppose that we know

[-x0,x0]

to be the range within which the value of

x

is going to fall in. We can model our uncertainty of

x

by an aprior uniform distribution over an interval

[-x0,x0]

, and thus

x

will have variance of
2
\sigma
X

=

2/3.
x
0
. Let the noise vector

z

be normally distributed as
2I)
N(0,\sigma
Z
where

I

is an identity matrix. Also

x

and

z

are independent and

CXZ=0

. It is easy to see that

\begin{align} &\operatorname{E}\{y\}=0,\\ &CY=\operatorname{E}\{yyT\}=

2
\sigma
X

11T+

2I,
\sigma
Z

\\ &CXY=\operatorname{E}\{xyT\}=

2
\sigma
X

1T. \end{align}

Thus, the linear MMSE estimator is given by

\begin{align} \hat{x}&=CXY

-1
C
Y

y\\ &=

2
\sigma
X
2
1
X

11T+

2I)
\sigma
Z

-1y.\end{align}

We can simplify the expression by using the alternative form for

W

as

\begin{align} \hat{x}&=\left(1T

1
2
\sigma
Z

I1+

1
2
\sigma
X

\right)-11T

1
2
\sigma
Z

Iy\\ &=

1
2
\sigma
Z

\left(

N
2
\sigma
Z

+

1
2
\sigma
X

\right)-11Ty\\ &=

2
\sigma
X
2
\sigma+
2/N
\sigma
Z
X

\bar{y}, \end{align}

where for

y=[y1,y2,\ldots,y

T
N]
we have

\bar{y}=

1Ty
N

=

N
\sumyi
i=1
N

.

Similarly, the variance of the estimator is

\sigma\hat{X

}^2 = C_C_Y^C_ = \Big(\frac\Big) \sigma_X^2.

Thus the MMSE of this linear estimator is

\operatorname{LMMSE}=

2
\sigma
X

-\sigma\hat{X

}^2 = \Big(\frac\Big) \frac N.

For very large

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

\hat{x}=

1
N
N
\sum
i=1

yi,

while the variance will be unaffected by data

\sigma\hat{X

}^2 = \sigma_^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

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

, 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\in[0,1].

Thus the fraction of votes the other candidate will receive will be

1-x.

We shall take

x

as a random variable with a uniform prior distribution over

[0,1]

so that its mean is

\bar{x}=1/2

and variance is
2
\sigma
X

=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

y1

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

z1

with zero mean and variance
2.
\sigma
Z1
Similarly, the second pollster declares their estimate to be

y2

with an error

z2

with zero mean and variance
2.
\sigma
Z2
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

\begin{align} y1&=x+z1\\ y2&=x+z2. \end{align}

Here, both the

\operatorname{E}\{y1\}=\operatorname{E}\{y2\}=\bar{x}=1/2

. Thus, we can obtain the LMMSE estimate as the linear combination of

y1

and

y2

as

\hat{x}=w1(y1-\bar{x})+w2(y2-\bar{x})+\bar{x},

where the weights are given by

\begin{align} w1&=

2
1/\sigma
Z1
2
1/\sigma+
2
1/\sigma
Z2
+
2
1/\sigma
X
Z1

,\\ w2&=

2
1/\sigma
Z2
2
1/\sigma+
2
1/\sigma
Z2
+
2
1/\sigma
X
Z1

. \end{align}

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

\hat{x}

is given by

\sigma\hat{X

}^2 = \frac \sigma_X^2,which makes

\sigma\hat{X

}^2 smaller than
2.
\sigma
X
Thus, the LMMSE is given by

LMMSE=

2
\sigma
X

-\sigma\hat{X

}^2 = \frac.

In general, if we have

N

pollsters, then

\hat{x}=

N
\sum
i=1

wi(yi-\bar{x})+\bar{x},

where the weight for i-th pollster is given by

wi=

2
1/\sigma
Zi
N
\sum
2
1/\sigma
Zj
+
2
1/\sigma
X
j=1
and the LMMSE is given by

LMMSE=

1
N
\sum
2
1/\sigma
Zj
+
2
1/\sigma
X
j=1

.

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

a1

and

a2

, which are assumed to be known constants. Similarly, let the noise at each microphone be

z1

and

z2

, each with zero mean and variances
2
\sigma
Z1
and
2
\sigma
Z2
respectively. Let

x

denote the sound produced by the musician, which is a random variable with zero mean and variance
2.
\sigma
X
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

\begin{align} y1&=a1x+z1\\ y2&=a2x+z2. \end{align}

Here both the

\operatorname{E}\{y1\}=\operatorname{E}\{y2\}=0

. Thus, we can combine the two sounds as

y=w1y1+w2y2

where the i-th weight is given as

wi=

a
2
Zi
i/\sigma
\sum
2
a
Zj
+
2
1/\sigma
X
j

.

See also

Notes

  1. Web site: Mean Squared Error (MSE). www.probabilitycourse.com. en. 2017-05-09.
  2. Moon and Stirling.

Further reading