Minimum mean square error

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

[math]\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)\}, }[/math]

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

[math]\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\}. }[/math]

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

[math]\displaystyle{ \hat{x}_{\operatorname{MMSE}}(y) = \operatorname{argmin}_{\hat{x}} \operatorname{MSE}. }[/math]

Properties

  • When the means and variances are finite, the MMSE estimator is uniquely defined[1] and is given by:
[math]\displaystyle{ \hat{x}_{\operatorname{MMSE}}(y) = \operatorname{E} \{x \mid y\}. }[/math]
In other words, the MMSE estimator is the conditional expectation of [math]\displaystyle{ x }[/math] given the known observed value of the measurements. Also, since [math]\displaystyle{ \hat{x}_{\mathrm{MMSE}} }[/math] is the posterior mean, the error covariance matrix [math]\displaystyle{ C_e }[/math]is equal to the posterior covariance [math]\displaystyle{ C_{X|Y} }[/math] matrix,
[math]\displaystyle{ C_e = C_{X|Y} }[/math].
  • The MMSE estimator is unbiased (under the regularity assumptions mentioned above):
[math]\displaystyle{ \operatorname{E}\{\hat{x}_{\operatorname{MMSE}}(y)\} = \operatorname{E}\{\operatorname{E}\{x\mid y\}\} = \operatorname{E}\{x\}. }[/math]
  • The MMSE estimator is asymptotically unbiased and it converges in distribution to the normal distribution:
[math]\displaystyle{ \sqrt{n}(\hat{x}_{\operatorname{MMSE}} - x) \xrightarrow{d} \mathcal{N}\left(0 , I^{-1}(x)\right), }[/math]
where [math]\displaystyle{ I(x) }[/math] is the Fisher information of [math]\displaystyle{ x }[/math]. Thus, the MMSE estimator is asymptotically efficient.
  • The orthogonality principle: When [math]\displaystyle{ x }[/math] is a scalar, an estimator constrained to be of certain form [math]\displaystyle{ \hat{x}=g(y) }[/math] is an optimal estimator, i.e. [math]\displaystyle{ \hat{x}_{\operatorname{MMSE}}=g^*(y), }[/math] if and only if
[math]\displaystyle{ \operatorname{E} \{ (\hat{x}_{\operatorname{MMSE}}-x) g(y) \} = 0 }[/math]
for all [math]\displaystyle{ g(y) }[/math] in closed, linear subspace [math]\displaystyle{ \mathcal{V} = \{g(y)\mid g:\mathbb{R}^m \rightarrow \mathbb{R}, \operatorname{E}\{g(y)^2\} \lt + \infty \} }[/math] 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:
[math]\displaystyle{ \operatorname{E} \{ (g_i^*(y)-x_i) g_j(y) \} = 0, }[/math]
for all i and j. More succinctly put, the cross-correlation between the minimum estimation error [math]\displaystyle{ \hat{x}_{\operatorname{MMSE}}-x }[/math] and the estimator [math]\displaystyle{ \hat{x} }[/math] should be zero,
[math]\displaystyle{ \operatorname{E} \{ (\hat{x}_{\operatorname{MMSE}}-x)\hat{x}^T \} = 0. }[/math]
  • If [math]\displaystyle{ x }[/math] and [math]\displaystyle{ y }[/math] are jointly Gaussian, then the MMSE estimator is linear, i.e., it has the form [math]\displaystyle{ Wy+b }[/math] for matrix [math]\displaystyle{ W }[/math] and constant [math]\displaystyle{ b }[/math]. 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 [math]\displaystyle{ \operatorname{E}\{x\mid y\} }[/math] 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 [math]\displaystyle{ x }[/math] given [math]\displaystyle{ y }[/math] is a simple linear function of [math]\displaystyle{ y }[/math], [math]\displaystyle{ \operatorname{E}\{x\mid y\} = W y + b }[/math], where the measurement [math]\displaystyle{ y }[/math] is a random vector, [math]\displaystyle{ W }[/math] is a matrix and [math]\displaystyle{ b }[/math] is a vector. This can be seen as the first order Taylor approximation of [math]\displaystyle{ \operatorname{E}\{x\mid y\} }[/math]. The linear MMSE estimator is the estimator achieving minimum MSE among all estimators of such form. That is, it solves the following optimization problem:

[math]\displaystyle{ \min_{W,b} \operatorname{MSE} \qquad \text{s.t.} \qquad \hat{x} = W y + b. }[/math]

One advantage of such linear MMSE estimator is that it is not necessary to explicitly calculate the posterior probability density function of [math]\displaystyle{ x }[/math]. Such linear estimator only depends on the first two moments of [math]\displaystyle{ x }[/math] and [math]\displaystyle{ y }[/math]. So although it may be convenient to assume that [math]\displaystyle{ x }[/math] and [math]\displaystyle{ y }[/math] 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 [math]\displaystyle{ b }[/math] and [math]\displaystyle{ W }[/math] is given by:

[math]\displaystyle{ b = \bar{x} - W \bar{y}, }[/math]
[math]\displaystyle{ W = C_{XY}C^{-1}_{Y}. }[/math]

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

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

[math]\displaystyle{ \hat{x} = C_{XY}C^{-1}_{Y}(y-\bar{y}) + \bar{x}, }[/math]
[math]\displaystyle{ \operatorname{E}\{\hat{x}\} = \bar{x}, }[/math]
[math]\displaystyle{ C_{\hat{X}} = C_{XY} C^{-1}_Y C_{YX}, }[/math]

where the [math]\displaystyle{ C_{YX} }[/math] is cross-covariance matrix between [math]\displaystyle{ y }[/math] and [math]\displaystyle{ x }[/math].

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

[math]\displaystyle{ C_e = C_X - C_{\hat{X}} = C_X - C_{XY} C^{-1}_Y C_{YX}, }[/math]
[math]\displaystyle{ \operatorname{LMMSE} = \operatorname{tr} \{C_e\}. }[/math]
Derivation using orthogonality principle

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

[math]\displaystyle{ \operatorname{E}\{\hat{x}\} = \operatorname{E}\{x\}. }[/math]

Plugging the expression for [math]\displaystyle{ \hat{x} }[/math] in above, we get

[math]\displaystyle{ b = \bar{x} - W \bar{y}, }[/math]

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

[math]\displaystyle{ \hat{x} = W(y-\bar{y}) + \bar{x} }[/math]

and the expression for estimation error becomes

[math]\displaystyle{ \hat{x} - x = W(y-\bar{y}) - (x-\bar{x}). }[/math]

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

[math]\displaystyle{ \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 \} \\ &= WC_Y - C_{XY}. \end{align} }[/math]

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

[math]\displaystyle{ W = C_{XY}C^{-1}_Y . }[/math]

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

[math]\displaystyle{ W^T = C^{-1}_Y C_{YX} . }[/math]

Thus the full expression for the linear MMSE estimator is

[math]\displaystyle{ \hat{x} = C_{XY} C^{-1}_Y (y-\bar{y}) + \bar{x}. }[/math]

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

[math]\displaystyle{ \begin{align} 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 \\ &= W C_Y W^T .\\ \end{align} }[/math]

Putting the expression for [math]\displaystyle{ W }[/math] and [math]\displaystyle{ W^T }[/math], we get

[math]\displaystyle{ C_{\hat{X}} = C_{XY} C^{-1}_Y C_{YX}. }[/math]

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

[math]\displaystyle{ \begin{align} 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{align} }[/math]

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

[math]\displaystyle{ C_e = C_X - C_{XY} C^{-1}_Y C_{YX} . }[/math]

This we can recognize to be the same as [math]\displaystyle{ C_e = C_X - C_{\hat{X}}. }[/math] Thus the minimum mean square error achievable by such a linear estimator is

[math]\displaystyle{ \operatorname{LMMSE} = \operatorname{tr}\{C_e\} }[/math].

Univariate case

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

[math]\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}, }[/math]
[math]\displaystyle{ \sigma^2_e = \sigma_X^2 - \frac{\sigma_{XY}^2}{\sigma_Y^2} = (1 - \rho^2)\sigma_X^2, }[/math]

where [math]\displaystyle{ \rho = \frac{\sigma_{XY}}{\sigma_X \sigma_Y} }[/math] is the Pearson's correlation coefficient between [math]\displaystyle{ x }[/math] and [math]\displaystyle{ y }[/math].

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

[math]\displaystyle{ \left(\frac{\hat{x} - \bar{x}}{\sigma_{X}}\right) = \rho \left(\frac{y-\bar{y}}{\sigma_Y}\right) }[/math]

or as square root of the ratio of two variances

[math]\displaystyle{ \rho^2 = \frac{\sigma_X^2 - \sigma_e^2}{\sigma_X^2} = \frac{\sigma^2_{\hat{X}}}{\sigma^2_X} }[/math].

When [math]\displaystyle{ \rho = 0 }[/math], we have [math]\displaystyle{ \hat{x} = \bar{x} }[/math] and [math]\displaystyle{ \sigma^2_e = \sigma_X^2 }[/math]. In this case, no new information is gleaned from the measurement which can decrease the uncertainty in [math]\displaystyle{ x }[/math]. On the other hand, when [math]\displaystyle{ \rho = \pm 1 }[/math], we have [math]\displaystyle{ \hat{x} = \frac{\sigma_{XY}}{\sigma_Y}(y-\bar{y}) + \bar{x} }[/math] and [math]\displaystyle{ \sigma^2_e = 0 }[/math]. Here [math]\displaystyle{ x }[/math] is completely determined by [math]\displaystyle{ y }[/math], as given by the equation of straight line.

Computation

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

[math]\displaystyle{ \operatorname{E}\{y\} = A\bar{x}, }[/math]
[math]\displaystyle{ C_Y = AC_XA^T + C_Z, }[/math]
[math]\displaystyle{ C_{XY} = C_X A^T . }[/math]

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

[math]\displaystyle{ W = C_X A^T(AC_XA^T + C_Z)^{-1} . }[/math]

Putting everything into the expression for [math]\displaystyle{ \hat{x} }[/math], we get

[math]\displaystyle{ \hat{x} = C_X A^T(AC_XA^T + C_Z)^{-1}(y-A\bar{x}) + \bar{x}. }[/math]

Lastly, the error covariance is

[math]\displaystyle{ C_e = C_X - C_{\hat{X}} = C_X - C_X A^T(AC_XA^T + C_Z)^{-1}AC_X . }[/math]

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

[math]\displaystyle{ C_X A^T(AC_XA^T + C_Z)^{-1} = (A^TC_Z^{-1}A + C_X^{-1})^{-1} A^T C_Z^{-1}, }[/math]

which can be established by post-multiplying by [math]\displaystyle{ (AC_XA^T + C_Z) }[/math] and pre-multiplying by [math]\displaystyle{ (A^TC_Z^{-1}A + C_X^{-1}), }[/math] to obtain

[math]\displaystyle{ W = (A^TC_Z^{-1}A + C_X^{-1})^{-1} A^TC_Z^{-1}, }[/math]

and

[math]\displaystyle{ C_e = (A^TC_Z^{-1}A + C_X^{-1})^{-1}. }[/math]

Since [math]\displaystyle{ W }[/math] can now be written in terms of [math]\displaystyle{ C_e }[/math] as [math]\displaystyle{ W = C_e A^T C_Z^{-1} }[/math], we get a simplified expression for [math]\displaystyle{ \hat{x} }[/math] as

[math]\displaystyle{ \hat{x} = C_e A^T C_Z^{-1}(y-A\bar{x}) + \bar{x}. }[/math]

In this form the above expression can be easily compared with weighed least square and Gauss–Markov estimate. In particular, when [math]\displaystyle{ C_X^{-1}=0 }[/math], corresponding to infinite variance of the apriori information concerning [math]\displaystyle{ x }[/math], the result [math]\displaystyle{ W = (A^TC_Z^{-1}A)^{-1} A^TC_Z^{-1} }[/math] is identical to the weighed linear least square estimate with [math]\displaystyle{ C_Z^{-1} }[/math] as the weight matrix. Moreover, if the components of [math]\displaystyle{ z }[/math] are uncorrelated and have equal variance such that [math]\displaystyle{ C_Z = \sigma^2 I, }[/math] where [math]\displaystyle{ I }[/math] is an identity matrix, then [math]\displaystyle{ W = (A^TA)^{-1}A^T }[/math] is identical to the ordinary least square estimate.

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 [math]\displaystyle{ k }[/math] observations, [math]\displaystyle{ y_1, \ldots, y_k }[/math], Bayes' rule gives us the posterior density of [math]\displaystyle{ x_k }[/math] as

[math]\displaystyle{ \begin{align} 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{align} }[/math]

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

[math]\displaystyle{ p(y_k|x_k,y_1,\ldots,y_{k-1}) = p(y_k|x_k). }[/math]

This is the Markov assumption.

The MMSE estimate [math]\displaystyle{ \hat{x}_k }[/math] given the k-th observation is then the mean of the posterior density [math]\displaystyle{ p(x_k|y_1,\ldots, y_k) }[/math]. With the lack of dynamical information on how the state [math]\displaystyle{ x }[/math] changes with time, we will make a further stationarity assumption about the prior:

[math]\displaystyle{ p(x_k|y_1, \ldots, y_{k-1}) = p(x_{k-1}|y_1, \ldots, y_{k-1}). }[/math]

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: [math]\displaystyle{ \hat{x} = C_{XY}C^{-1}_{Y}(y-\bar{y}) + \bar{x}. }[/math] However, the mean and covariance matrices of [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math] will need to be replaced by those of the prior density [math]\displaystyle{ p(x_k|y_1,\ldots, y_{k-1}) }[/math] and likelihood [math]\displaystyle{ p(y_k|x_k) }[/math], respectively.

For the prior density [math]\displaystyle{ p(x_k|y_1, \ldots, y_{k-1}) }[/math], its mean is given by the previous MMSE estimate,

[math]\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} }[/math],

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

[math]\displaystyle{ C_{X_k|Y_1,\ldots,Y_{k-1}} = C_{X_{k-1}|Y_1,\ldots,Y_{k-1}} = C_{e_{k-1}}, }[/math]

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

Similarly, for the linear observation process, the mean of the likelihood [math]\displaystyle{ p(y_k|x_k) }[/math] is given by [math]\displaystyle{ \bar{y}_k = A\bar{x}_k = A\hat{x}_{k-1} }[/math] and the covariance matrix is as before

[math]\displaystyle{ \begin{align} C_{Y_k|X_k} &= A C_{X_k|Y_1,\ldots,Y_{k-1}} A^T + C_Z = A C_{e_{k-1}} A^T + C_Z. \end{align} }[/math].

The difference between the predicted value of [math]\displaystyle{ Y_k }[/math], as given by [math]\displaystyle{ \bar{y}_k = A\hat{x}_{k-1} }[/math], and its observed value [math]\displaystyle{ y_k }[/math] gives the prediction error [math]\displaystyle{ \tilde{y}_k = y_k - \bar{y}_k }[/math], 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 [math]\displaystyle{ \mathrm{E}[\tilde{y}_k] = 0 }[/math] and [math]\displaystyle{ C_{\tilde{Y}_k} = C_{Y_k|X_k} }[/math].

Hence, in the estimate update formula, we should replace [math]\displaystyle{ \bar{x} }[/math] and [math]\displaystyle{ C_X }[/math] by [math]\displaystyle{ \hat{x}_{k-1} }[/math] and [math]\displaystyle{ C_{e_{k-1}} }[/math], respectively. Also, we should replace [math]\displaystyle{ \bar{y} }[/math] and [math]\displaystyle{ C_Y }[/math] by [math]\displaystyle{ \bar{y}_{k-1} }[/math] and [math]\displaystyle{ C_{\tilde{Y}_k} }[/math]. Lastly, we replace [math]\displaystyle{ C_{XY} }[/math] by

[math]\displaystyle{ \begin{align} 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{align} }[/math]

Thus, we have the new estimate as new observation [math]\displaystyle{ y_k }[/math] arrives as

[math]\displaystyle{ \begin{align} \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{align} }[/math]

and the new error covariance as

[math]\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}}. }[/math]

From the point of view of linear algebra, for sequential estimation, if we have an estimate [math]\displaystyle{ \hat{x}_1 }[/math] based on measurements generating space [math]\displaystyle{ Y_1 }[/math], 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

[math]\displaystyle{ W_{k} = C_{e_{k-1}} A^T(AC_{e_{k-1}}A^T + C_Z)^{-1}, }[/math]
[math]\displaystyle{ \hat{x}_{k} = \hat{x}_{k-1} + W_{k} (y_{k}-A\hat{x}_{k-1}), }[/math]
[math]\displaystyle{ C_{e_{k}} = (I - W_{k} A)C_{e_{k-1}}. }[/math]

The matrix [math]\displaystyle{ W_k }[/math] is often referred to as the Kalman gain factor. The alternative formulation of the above algorithm will give

[math]\displaystyle{ C_{e_{k}}^{-1} = C_{e_{k-1}}^{-1} + A^T C_Z^{-1} A, }[/math]
[math]\displaystyle{ W_{k} = C_{e_{k}} A^T C_Z^{-1}, }[/math]
[math]\displaystyle{ \hat{x}_{k} = \hat{x}_{k-1} + W_{k} (y_{k}-A\hat{x}_{k-1}), }[/math]

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 [math]\displaystyle{ y_k = a_k^T x_k + z_k }[/math], where [math]\displaystyle{ a_k }[/math] is n-by-1 known column vector whose values can change with time, [math]\displaystyle{ x_k }[/math] is n-by-1 random column vector to be estimated, and [math]\displaystyle{ z_k }[/math] is scalar noise term with variance [math]\displaystyle{ \sigma_k^2 }[/math]. After (k+1)-th observation, the direct use of above recursive equations give the expression for the estimate [math]\displaystyle{ \hat{x}_{k+1} }[/math] as:

[math]\displaystyle{ \hat{x}_{k+1} = \hat{x}_k + w_{k+1}(y_{k+1} - a^T_{k+1} \hat{x}_k) }[/math]

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

[math]\displaystyle{ w_{k+1} = \frac{C_{e_k} a_{k+1}}{\sigma^2_{k+1} + a^T_{k+1}C_{e_k} a_{k+1}}. }[/math]

The [math]\displaystyle{ C_{e_{k+1}} }[/math] is n-by-n error covariance matrix given by

[math]\displaystyle{ C_{e_{k+1}} = (I - w_{k+1}a^T_{k+1})C_{e_k} . }[/math]

Here, no matrix inversion is required. Also, the gain factor, [math]\displaystyle{ w_{k+1} }[/math], 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 [math]\displaystyle{ \hat{x} }[/math] and [math]\displaystyle{ C_e }[/math] are taken to be the mean and covariance of the aprior probability density function of [math]\displaystyle{ x }[/math].

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 [math]\displaystyle{ e }[/math] cannot be directly observed, these methods try to minimize the mean squared prediction error [math]\displaystyle{ \mathrm{E}\{\tilde{y}^T \tilde{y}\} }[/math]. For instance, in the case of scalar observations, we have the gradient [math]\displaystyle{ \nabla_{\hat{x}} \mathrm{E}\{\tilde{y}^2\} = -2 \mathrm{E}\{\tilde{y} a\}. }[/math] Thus, the update equation for the least mean square filter is given by

[math]\displaystyle{ \hat{x}_{k+1} = \hat{x}_k + \eta_k \mathrm{E}\{\tilde{y}_k a_k\}, }[/math]

where [math]\displaystyle{ \eta_k }[/math] is the scalar step size and the expectation is approximated by the instantaneous value [math]\displaystyle{ \mathrm{E}\{a_k \tilde{y}_k\} \approx a_k \tilde{y}_k }[/math]. 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, [math]\displaystyle{ C_Z }[/math] is a diagonal matrix. In such cases, it is advantageous to consider the components of [math]\displaystyle{ y }[/math] as independent scalar measurements, rather than vector measurement. This allows us to reduce computation time by processing the [math]\displaystyle{ m \times 1 }[/math] measurement vector as [math]\displaystyle{ m }[/math] 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:

[math]\displaystyle{ w_{k+1}^{(\ell)} = \frac{ C_{e_k}^{(\ell)} A^{(\ell) T}_{k+1} }{ C_{Z_{k+1}}^{(\ell)} + A_{k+1}^{(\ell)} C_{e_k}^{(\ell)} (A^{(\ell) T}_{k+1}) } }[/math]
[math]\displaystyle{ C_{e_{k+1}}^{(\ell)} = (I - w_{k+1}^{(\ell)} A_{k+1}^{(\ell)})C_{e_k}^{(\ell)} }[/math]
[math]\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)}) }[/math]

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

Examples

Example 1

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

[math]\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], }[/math]

then our task is to find the coefficients [math]\displaystyle{ w_{i} }[/math] such that it will yield an optimal linear estimate [math]\displaystyle{ \hat z_{4} }[/math].

In terms of the terminology developed in the previous sections, for this problem we have the observation vector [math]\displaystyle{ y = [z_1, z_2, z_3]^T }[/math], the estimator matrix [math]\displaystyle{ W = [w_1, w_2, w_3] }[/math] as a row vector, and the estimated variable [math]\displaystyle{ x = z_4 }[/math] as a scalar quantity. The autocorrelation matrix [math]\displaystyle{ C_Y }[/math] is defined as

[math]\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]. }[/math]

The cross correlation matrix [math]\displaystyle{ C_{YX} }[/math] is defined as

[math]\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]. }[/math]

We now solve the equation [math]\displaystyle{ C_Y W^T=C_{YX} }[/math] by inverting [math]\displaystyle{ C_Y }[/math] and pre-multiplying to get

[math]\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. }[/math]

So we have [math]\displaystyle{ w_1=2.57, }[/math] [math]\displaystyle{ w_2=-0.142, }[/math] and [math]\displaystyle{ w_{3}=.5714 }[/math] as the optimal coefficients for [math]\displaystyle{ \hat z_4 }[/math]. Computing the minimum mean square error then gives [math]\displaystyle{ \left\Vert e\right\Vert _{\min}^2=\operatorname{E}[z_4 z_4]-WC_{YX}=15-WC_{YX}=.2857 }[/math].[2] Note that it is not necessary to obtain an explicit matrix inverse of [math]\displaystyle{ C_Y }[/math] to compute the value of [math]\displaystyle{ W }[/math]. 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 [math]\displaystyle{ y }[/math] formed by taking [math]\displaystyle{ N }[/math] observations of a fixed but unknown scalar parameter [math]\displaystyle{ x }[/math] disturbed by white Gaussian noise. We can describe the process by a linear equation [math]\displaystyle{ y = 1x+ z }[/math], where [math]\displaystyle{ 1 = [1,1,\ldots,1]^T }[/math]. Depending on context it will be clear if [math]\displaystyle{ 1 }[/math] represents a scalar or a vector. Suppose that we know [math]\displaystyle{ [-x_0,x_0] }[/math] to be the range within which the value of [math]\displaystyle{ x }[/math] is going to fall in. We can model our uncertainty of [math]\displaystyle{ x }[/math] by an aprior uniform distribution over an interval [math]\displaystyle{ [-x_0,x_0] }[/math], and thus [math]\displaystyle{ x }[/math] will have variance of [math]\displaystyle{ \sigma_X^2 = x_0^2/3. }[/math]. Let the noise vector [math]\displaystyle{ z }[/math] be normally distributed as [math]\displaystyle{ N(0,\sigma_Z^2I) }[/math] where [math]\displaystyle{ I }[/math] is an identity matrix. Also [math]\displaystyle{ x }[/math] and [math]\displaystyle{ z }[/math] are independent and [math]\displaystyle{ C_{XZ} = 0 }[/math]. It is easy to see that

[math]\displaystyle{ \begin{align} & \operatorname{E}\{y\} = 0, \\ & C_Y = \operatorname{E}\{yy^T\} = \sigma_X^2 11^T + \sigma_Z^2I, \\ & C_{XY} = \operatorname{E}\{xy^T\} = \sigma_X^2 1^T. \end{align} }[/math]

Thus, the linear MMSE estimator is given by

[math]\displaystyle{ \begin{align} \hat{x} &= C_{XY}C_Y^{-1} y \\ &= \sigma_X^2 1^T(\sigma_X^2 11^T + \sigma_Z^2I)^{-1} y. \end{align} }[/math]

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

[math]\displaystyle{ \begin{align} \hat{x} &= \left(1^T \frac{1}{\sigma_Z^2}I 1 + \frac{1}{\sigma_X^2}\right)^{-1} 1^T \frac{1}{\sigma_Z^2} I y \\ &= \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{align} }[/math]

where for [math]\displaystyle{ y = [y_1,y_2,\ldots,y_N]^T }[/math] we have [math]\displaystyle{ \bar{y} = \frac{1^Ty}{N} = \frac{\sum_{i=1}^N y_i}{N}. }[/math]

Similarly, the variance of the estimator is

[math]\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. }[/math]

Thus the MMSE of this linear estimator is

[math]\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. }[/math]

For very large [math]\displaystyle{ N }[/math], 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

[math]\displaystyle{ \hat{x} = \frac 1 N \sum_{i=1}^N y_i, }[/math]

while the variance will be unaffected by data [math]\displaystyle{ \sigma_{\hat{X}}^2 = \sigma_{X}^2, }[/math] 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 [math]\displaystyle{ x }[/math] 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 [math]\displaystyle{ x }[/math], 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 [math]\displaystyle{ x \in [0,1]. }[/math] Thus the fraction of votes the other candidate will receive will be [math]\displaystyle{ 1-x. }[/math] We shall take [math]\displaystyle{ x }[/math] as a random variable with a uniform prior distribution over [math]\displaystyle{ [0,1] }[/math] so that its mean is [math]\displaystyle{ \bar{x} = 1/2 }[/math] and variance is [math]\displaystyle{ \sigma_X^2 = 1/12. }[/math] 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 [math]\displaystyle{ y_1 }[/math] 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 [math]\displaystyle{ z_1 }[/math] with zero mean and variance [math]\displaystyle{ \sigma_{Z_1}^2. }[/math] Similarly, the second pollster declares their estimate to be [math]\displaystyle{ y_2 }[/math] with an error [math]\displaystyle{ z_2 }[/math] with zero mean and variance [math]\displaystyle{ \sigma_{Z_2}^2. }[/math] 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

[math]\displaystyle{ \begin{align} y_1 &= x + z_1 \\ y_2 &= x + z_2. \end{align} }[/math]

Here, both the [math]\displaystyle{ \operatorname{E}\{y_1\} = \operatorname{E}\{y_2\} = \bar{x} = 1/2 }[/math]. Thus, we can obtain the LMMSE estimate as the linear combination of [math]\displaystyle{ y_1 }[/math] and [math]\displaystyle{ y_2 }[/math] as

[math]\displaystyle{ \hat{x} = w_1 (y_1 - \bar{x}) + w_2 (y_2 - \bar{x}) + \bar{x}, }[/math]

where the weights are given by

[math]\displaystyle{ \begin{align} 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{align} }[/math]

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 [math]\displaystyle{ \hat{x} }[/math] is given by

[math]\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 , }[/math]

which makes [math]\displaystyle{ \sigma_{\hat{X}}^2 }[/math] smaller than [math]\displaystyle{ \sigma_X^2. }[/math] Thus, the LMMSE is given by

[math]\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}. }[/math]

In general, if we have [math]\displaystyle{ N }[/math] pollsters, then [math]\displaystyle{ \hat{x} = \sum_{i=1}^N w_i (y_i - \bar{x}) + \bar{x}, }[/math] where the weight for i-th pollster is given by [math]\displaystyle{ w_i = \frac{1/\sigma_{Z_i}^2}{\sum_{j=1}^N 1/\sigma_{Z_j}^2 + 1/\sigma_X^2} }[/math] and the LMMSE is given by [math]\displaystyle{ \mathrm{LMMSE} = \frac{1}{\sum_{j=1}^N 1/\sigma_{Z_j}^2 + 1/\sigma_X^2}. }[/math]

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 [math]\displaystyle{ a_1 }[/math] and [math]\displaystyle{ a_2 }[/math], which are assumed to be known constants. Similarly, let the noise at each microphone be [math]\displaystyle{ z_1 }[/math] and [math]\displaystyle{ z_2 }[/math], each with zero mean and variances [math]\displaystyle{ \sigma_{Z_1}^2 }[/math] and [math]\displaystyle{ \sigma_{Z_2}^2 }[/math] respectively. Let [math]\displaystyle{ x }[/math] denote the sound produced by the musician, which is a random variable with zero mean and variance [math]\displaystyle{ \sigma_X^2. }[/math] 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

[math]\displaystyle{ \begin{align} y_1 &= a_1 x + z_1 \\ y_2 &= a_2 x + z_2. \end{align} }[/math]

Here both the [math]\displaystyle{ \operatorname{E}\{y_1\} = \operatorname{E}\{y_2\} = 0 }[/math]. Thus, we can combine the two sounds as

[math]\displaystyle{ y = w_1 y_1 + w_2 y_2 }[/math]

where the i-th weight is given as

[math]\displaystyle{ w_i = \frac{a_i/\sigma_{Z_i}^2}{\sum_j a_j^2/\sigma_{Z_j}^2 + 1/\sigma_{X}^2}. }[/math]

See also

Notes

Further reading