Geostatistics Lessons
Methodology
Cite

Cite this lesson

Citation format

Erten, O., & Deutsch, C. V. (2020). Combination of Multivariate Gaussian Distributions through Error Ellipses. In J. L. Deutsch (Ed.), Geostatistics Lessons. Retrieved from https://geostatisticslessons.com/lessons/errorellipses

Erten, Oktay, and Clayton V. Deutsch. “Combination of Multivariate Gaussian Distributions through Error Ellipses.” Geostatistics Lessons, edited by J. L. Deutsch, 2020, https://geostatisticslessons.com/lessons/errorellipses.

Erten, Oktay, and Clayton V. Deutsch. 2020. “Combination of Multivariate Gaussian Distributions through Error Ellipses.” In Geostatistics Lessons, edited by J. L. Deutsch. https://geostatisticslessons.com/lessons/errorellipses.

@incollection{errorellipses,
  author = {Erten, Oktay and Deutsch, Clayton V.},
  editor = {Deutsch, J. L.},
  title = {Combination of {Multivariate} {Gaussian} {Distributions}
    through {Error} {Ellipses}},
  booktitle = {Geostatistics Lessons},
  year = {2020},
  url = {https://geostatisticslessons.com/lessons/errorellipses}
}

Download PDF(2837KB) (opens in a new tab)

Combination of Multivariate Gaussian Distributions through Error Ellipses

  • Oktay Erten, University of Alberta
  • Clayton V. Deutsch, University of Alberta

Learning Objectives

  • Understand how to draw an error ellipse (or density contour) of a bivariate Gaussian distribution considering a given confidence level.
  • Derive the equations for combining multivariate Gaussian distributions through error ellipses.
  • Appreciate the error ellipses method using a simulated bivariate Gaussian dataset.

Introduction

The combination of probability distributions is a common challenge encountered in geology, engineering, and statistics. The distributions come from different data sources or sensors. The distributions could be univariate, bivariate or multivariate. The techniques to combine the distributions include (1) formulating and parameterizing a high dimensional distribution from which conditional distributions can be computed - called cokriging in geostatistics (C. V. Deutsch & Journel, 1998; Doyen, 1988) (2) considering a known prior distribution and making a neutral assumption about the redundancy in the information content - called collocated cokriging or Bayesian Updating in geostatistics (Doyen, Boer, & Pillet, 1996; Xu, Tran, Srivastava, & Journel, 1992), and (3) considering no prior distribution and conditional independence in the likelihood distributions - called Error Ellipses in the literature (Blachman, 1989). This Lesson aims to develop the latter technique.

There is a reasonably informed prior distribution in most spatial prediction problems; it comes from a careful choice of a stationary population and declustering of the available data. The error ellipses method would not be appropriate. There are situations, however, where there is no prior and the data sources are very different; the error ellipses technique is useful when a combined estimate of the probability distribution is required. For example, the horizontal variogram calculated from a few wells is highly uncertain, whereas the horizontal variogram calculated from dense seismic information would be more structured but noisier. The estimation of the horizontal variogram from the wells can be improved by combining the distributions of the squared differences from wells and seismic information for each lag (Rezvandehy, 2016). In this Lesson, the construction of the confidence ellipse of a bivariate Gaussian distribution is first reviewed. The error ellipse method and derivation of its equations are explained, and the method is demonstrated using a simulated bivariate Gaussian dataset.

Multivariate Gaussian Distribution

Probability Density Function

Consider a p×1p\times 1 random vector X=[X1,...,Xp]T\mathbf{X}=[X_{1},...,X_{p}]^{T} that has a multivariate Gaussian distribution X∼Np(μ,Σ)\mathbf{X}\sim N_{p}(\boldsymbol{\mu},\Sigma). Its probability density function is given as follows:

f(X∣μ,Σ)=1(2π)p/2∣Σ∣1/2exp{−12(X−μ)TΣ−1(X−μ)}f(\mathbf{X}|\boldsymbol{\mu}, \Sigma)=\dfrac{1}{(2\pi)^{p/2}|\Sigma|^{1/2}} exp\left\{-\dfrac{1}{2}(\mathbf{X}-\boldsymbol {\mu})^{T}\Sigma^{-1}(\mathbf{X}-\boldsymbol{\mu})\right\}

where pp is the dimension of the vector; μ\boldsymbol{\mu} is the p×1p\times 1 vector of means μ=[μ1,...,μp]T\boldsymbol{\mu}=[\mu_{1},...,\mu_{p}]^{T}, and Σ\Sigma is the p×pp\times p positive definite covariance matrix Σ\Sigma of X\mathbf{X}:

Σ=[σ11σ12⋯σ1pσ21σ22⋯σ2p⋮⋮⋱⋮σp1σp2⋯σpp]\Sigma= \begin{bmatrix} \sigma_{11} & \sigma_{12} & \cdots & \sigma_{1p}\\ \sigma_{21} & \sigma_{22} & \cdots & \sigma_{2p}\\ \vdots & \vdots &\ddots & \vdots \\ \sigma_{p1} & \sigma_{p2} & \cdots & \sigma_{pp}\\ \end{bmatrix}

If a random vector X\mathbf{X} is multivariate Gaussian, each random variable of X\mathbf{X} is also Gaussian. If ρ=0\rho=0, that is, Σ\Sigma is a diagonal matrix (all off-diagonal elements are zero), the multivariate Gaussian distribution factorizes into the product of pp univariate Gaussian densities (Johnson & Wichern, 1988).

Density Contours of a Bivariate Gaussian Distribution

The plot of the density (or probability) contours of a bivariate Gaussian distribution represents a three-dimensional surface. The constant probability contours, however, can be plotted on a two-dimensional format by considering the same height on the z-axis (or the constant height of the surface). Consider that a random vector X=[X1,X2]\mathbf{X} = [X_{1}, X_{2}] has a bivariate (p=2)(p=2) Gaussian distribution. The scalar quantity of the square of the distance (X−μ)TΣ−1(X−μ)=K(\mathbf{X}-\boldsymbol {\mu})^{T}\Sigma^{-1}(\mathbf{X}- \boldsymbol{\mu})=K is referred to as the squared Mahalanobis distance of the vector X\mathbf{X} to the mean vector μ\boldsymbol{\mu}. The surface on which the random variable KK is constant is an ellipse (or a pp-dimensional ellipsoid in the multivariate case) centered at μ=[μ1,μ2]\boldsymbol {\mu} = [\mu_{1},\mu_{2}]. This ellipse (or a probability contour) defines the region of a minimum area (or volume in multivariate case) containing a given probability under the Gaussian assumption. Figure 1 illustrates confidence (error) ellipses with one-, two-, and three-sigma axis lengths (enclosing approximately 39.3%39.3\%, 86.5%86.5\%, and 98.9%98.9\% in two dimensions), considering the cases where the random variables are (1) positively correlated ρ>0\rho>0, (2) negatively correlated ρ<0\rho<0, and (3) independent ρ=0\rho=0.

Error ellipses with one-, two-, and three-sigma axis lengths
Figure 1: Error ellipses with one-, two-, and three-sigma axis lengths

This figure shows how the ranges (or lengths) and directions of the axes of the ellipses change depending on the selected confidence level and the covariance matrix of the random vector X\mathbf{X}. The confidence ellipses constructed based on the given confidence levels can be used to check the bivariate Gaussianity of a given distribution (J. L. Deutsch & Deutsch, 2011).

Step 1: Selecting a probability level for the error ellipse

The quadratic form defining the scalar random variable KK has a chi-square distribution with two degrees of freedom:

P{K≤χ22(α)}=P{(X−μ)TΣ−1(X−μ)≤χ22(α)}=1−αP\left\{K\le \chi^{2}_{2}(\alpha)\right\} = P\left\{(\mathbf{X}-\boldsymbol {\mu})^{T}\Sigma^{-1}(\mathbf{X}-\boldsymbol{\mu})\le \chi^{2}_{2}(\alpha)\right\}=1-\alpha

where χ22(α)\chi^{2}_{2}(\alpha) is the upper-tail critical value with exceedance probability α\alpha of the χ2\chi^{2}-distribution with two degrees of freedom. 1−α1-\alpha is the probability (or a confidence level) that the value of the random vector X\mathbf{X} will be inside the ellipse. For example, consider that the given probability is α=0.05\alpha=0.05, that is, χ22(0.05)=5.99\chi^{2}_{2}(0.05)=5.99, then the 95%95\% confidence ellipse is defined by:

P{K≤χ22(0.05)}=P{(X−μ)TΣ−1(X−μ)≤5.99}=0.95P\left\{K\le \chi^{2}_{2}(0.05)\right\} = P\left\{(\mathbf{X}-\boldsymbol {\mu})^{T}\Sigma^{-1}(\mathbf{X}-\boldsymbol{\mu})\le 5.99\right\}=0.95

Step 2: Calculating the eigenvalues of the covariance matrix

The positive definite (∣Σ∣≠0|\Sigma|\ne 0 and Σ−1\Sigma^{-1} exists) covariance matrix Σ\Sigma of the random vector X=[X1,X2]\mathbf{X} = [X_{1}, X_{2}] is as follows:

Σ=[σ11σ12σ21σ22]\Sigma= \begin{bmatrix} \sigma_{11} & \sigma_{12}\\ \sigma_{21} & \sigma_{22}\\ \end{bmatrix}

The eigenvalues λ=[λ1,λ2]\boldsymbol{\lambda}=[\lambda_{1}, \lambda_{2}] of Σ\Sigma are calculated by:

λ1=12[σ11+σ22+(σ11−σ22)2+4σ11σ22ρ2]λ2=12[σ11+σ22−(σ11−σ22)2+4σ11σ22ρ2]\begin{gathered}\lambda_{1}=\dfrac{1}{2}\left[\sigma_{11}+\sigma_{22}+\sqrt{(\sigma_{11}-\sigma_{22})^{2}+4\sigma_{11}\sigma_{22}\rho^{2}}\hspace{3pt}\right]\\\\ \lambda_{2}=\dfrac{1}{2}\left[\sigma_{11}+\sigma_{22}-\sqrt{(\sigma_{11}-\sigma_{22})^{2}+4\sigma_{11}\sigma_{22}\rho^{2}}\hspace{3pt}\right]\end{gathered}

where σ11\sigma_{11} and σ22\sigma_{22} are the variances of the random variables X1X_{1} and X2X_{2}, and ρ\rho is the linear correlation coefficient.

Step 3: Calculating the lengths of the ellipse axes

The lengths of the ellipse axes are a function of the critical value χ22(α)\chi^{2}_{2}(\alpha), the eigenvalues λ=[λ1,λ2]\boldsymbol{\lambda}=[\lambda_{1}, \lambda_{2}] and the linear correlation coefficient ρ\rho. For example, 95%95\% confidence ellipse is defined by:

[X1−μ1X2−μ2]Σ−1[X1−μ1X2−μ2]≤χ22(0.05)[X_{1}-\mu_{1}\hspace{5pt}X_{2}-\mu_{2}]\hspace{3pt}\Sigma^{-1}\begin{bmatrix} X_{1}-\mu_{1}\\ X_{2}-\mu_{2}\\ \end{bmatrix} \le \chi^{2}_{2}(0.05)

As Σ\Sigma denotes a symmetric matrix, its eigenvectors can be chosen to be orthonormal. Therefore, Σ\Sigma can be written as follows:

Σ=TDT−1\Sigma=TDT^{-1}

where T=[υ1∣υ2]T=[\upsilon_{1}|\upsilon_{2}] are the eigenvectors of Σ\Sigma and DD is the diagonal matrix of the eigenvalues λ=[λ1,λ2]\boldsymbol{\lambda}=[\lambda_{1}, \lambda_{2}]:

D=[λ100λ2]D= \begin{bmatrix} \lambda_{1} & 0\\ 0 & \lambda_{2}\\ \end{bmatrix} replacing Σ−1\Sigma^{-1} by TD−1T−1TD^{-1}T^{-1}, the square of the difference can be written as: [X1−μ1X2−μ2]TD−1T−1[X1−μ1X2−μ2]≤χ22(0.05)[X_{1}-\mu_{1}\hspace{5pt}X_{2}-\mu_{2}]\hspace{3pt}TD^{-1}T^{-1}\begin{bmatrix} X_{1}-\mu_{1}\\ X_{2}-\mu_{2}\\ \end{bmatrix} \le \chi^{2}_{2}(0.05)

Denoting

[ω1ω2]=T−1[X1−μ1X2−μ2]\begin{bmatrix} \omega_{1}\\ \omega_{2}\\ \end{bmatrix} = T^{-1}\begin{bmatrix} X_{1}-\mu_{1}\\ X_{2}-\mu_{2}\\ \end{bmatrix}

As TT=T−1T^{T}=T^{-1}, the square of difference can be expressed as:

[ω1ω2][λ100λ2]−1[ω1ω2]≤χ22(0.05)[\omega_{1}\hspace{5pt}\omega_{2}]\hspace{3pt}\begin{bmatrix} \lambda_{1} & 0\\ 0 & \lambda_{2}\\ \end{bmatrix}^{-1}\hspace{3pt} \begin{bmatrix} \omega_{1}\\ \omega_{2}\\ \end{bmatrix} \le \chi^{2}_{2}(0.05)

If the above equation is further evaluated, the resulting equation is the equation of an ellipse aligned with the axis ω1\omega_{1} and ω2\omega_{2} in the new coordinate system.

ω12χ22(0.05)λ1+ω22χ22(0.05)λ2≤1\dfrac{\omega^{2}_{1}}{\chi^{2}_{2}(0.05)\lambda_{1}}+\dfrac{\omega^{2}_{2}}{\chi^{2}_{2}(0.05)\lambda_{2}}\le 1

The axes of the ellipse are defined by ω1\omega_{1} axis with a length 2χ22(0.05)λ12\sqrt{\chi^{2}_{2}(0.05)\lambda_{1}} and ω2\omega_{2} axis with a length 2χ22(0.05)λ22\sqrt{\chi^{2}_{2}(0.05)\lambda_{2}}.

When ρ=0\rho=0, the eigenvalues are σ11\sigma_{11} and σ22\sigma_{22}. Choosing the eigenvectors in coordinate-axis order, the TT matrix becomes an identity matrix. The final equation of an ellipse is then defined by:

(X1−μ1)2χ22(0.05)σ11+(X2−μ2)2χ22(0.05)σ22≤1\dfrac{(X_{1}-\mu_{1})^{2}}{\chi^{2}_{2}(0.05)\sigma_{11}}+\dfrac{(X_{2}-\mu_{2})^{2}}{\chi^{2}_{2}(0.05)\sigma_{22}}\le 1

It is clear from the equation given above that the axes of the ellipse are parallel to the coordinate axes. The lengths of the axes of the ellipse are then defined as 2σ11χ22(0.05)2\sqrt{\sigma_{11}\chi^{2}_{2}(0.05)} and 2σ22χ22(0.05)2\sqrt{\sigma_{22}\chi^{2}_{2}(0.05)}. Figure 2 displays 95%95\% confidence ellipses drawn when the variables are positively correlated and when they are independent.

95\% confidence ellipses and their semi-diameters when \rho>0 and \rho=0
Figure 2: 95%95\% confidence ellipses and their semi-diameters when ρ>0\rho>0 and ρ=0\rho=0

It is clearly seen from Figure 2 that when ρ>0\rho>0, the axes of the ellipse are aligned with the rotated axes in the transformed coordinate system, and when ρ=0\rho=0, axes of the ellipse are parallel to the original coordinate system.

Error Ellipses Method

The error ellipses method, first introduced by (Blachman, 1989), aims to combine individual probability distributions by the linear weighted averaging of the means. The optimal weighting minimizes the resulting variance of the combined distribution:

Cx‾=[∑i=1nCi−1]−1C_{\overline{\mathbf{x}}}=\left[\sum\limits_{i=1}^{n}C^{-1}_{i}\right]^{-1}

where Cx‾C_{\overline{x}} is the minimized covariance matrix of the combined probability distribution, and Ci−1C^{-1}_{i} is the inverse covariance matrix of the individual probability distributions. The estimated mean vector of the combined distribution is then defined by:

x‾=Cx‾[∑i=1nCi−1xi]\overline{\mathbf{x}}=C_{\overline{\mathbf{x}}}\left[\sum\limits_{i=1}^{n}C^{-1}_{i}\mathbf{x}_{i}\right]

where x‾\overline{\mathbf{x}} is the mean of the combined probability distribution.

Derivation of the Error Ellipse Equations-1D Case

Consider that {x‾i;i=1,...,n}\{\overline{x}_{i}; i=1,...,n\} are the means of nn number of probability distributions, and {σi2;i=1,...,n}\{\sigma^{2}_{i}; i=1,...,n\} are the corresponding variances of these probability distributions. The unbiased estimate of the mean of the combined probability distribution is defined by:

x‾=∑i=1nλix‾i∑i=1nλi\overline{x}=\dfrac{\sum\limits_{i=1}^{n} \lambda_{i}\overline{x}_{i}}{\sum\limits_{i=1}^{n}\lambda_{i}}

For independent estimates, the variance of the estimate x‾\overline{x} can be written as:

Var[x‾]=∑i=1n[λi/∑i=1nλi]2Var[x‾i]Var[\overline{x}] = \sum\limits_{i=1}^{n} \left[\lambda_{i} / \sum\limits_{i=1}^{n}\lambda_{i}\right]^{2} Var[\overline{x}_{i}]

Recall that Var[x‾]=E[x‾2]−{E[x‾]}2Var[\overline{x}]=E[\overline{x}^{2}]-\{E[\overline{x}]\}^{2}. Differentiating the equation given above with respect to λj\lambda_{j} guarantees the condition for the variance to be minimum:

λjVar[x‾j]=∑i=1nλi2Var[x‾i]∑i=1nλi\lambda_{j}Var[\overline{x}_{j}]=\dfrac{\sum\limits_{i=1}^{n}\lambda^{2}_{i}Var[\overline{x}_{i}]}{\sum\limits_{i=1}^{n}\lambda_{i}}

The right hand side of the equation does not depend on jj and therefore, λj\lambda_{j} is proportional to 1/Var[x‾j]1/Var[\overline{x} _{j}]. Substituting these weights into the first and second equations given above yields:

x‾=[∑i=1nVar[x‾i]−1]−1∑i=1nVar[x‾i]−1x‾i\overline{x}=\left[\sum\limits_{i=1}^{n}Var[\overline{x}_{i}]^{-1}\right]^{-1} \sum\limits_{i=1}^{n}Var[\overline{x}_{i}]^{-1}\overline{x}_{i}

Var[x‾]=[∑i=1nVar[x‾i]−1]−1Var[\overline{x}]=\left[\sum\limits_{i=1}^{n}Var[\overline{x}_{i}]^{-1}\right]^{-1}

Finally, the mean of the combined distribution with the minimized variance can then be defined by:

x‾=Var[x‾]∑i=1nVar[x‾i]−1x‾i\overline{x}=Var[\overline{x}]\sum\limits_{i=1}^{n}Var[\overline{x}_{i}]^{-1}\overline{x}_{i}

Derivation of the Error Ellipse Equations in a Multivariate Case

Consider mm independent sets of observations, O=[O1,...,Om]\textbf{O} =[O_{1},...,O_{m}] of the same target. Each observation OiO_{i}, i=1,…,mi=1,\ldots,m is an individual estimate of the target. The error ellipse of each observation is a contour of the Gaussian conditional probability density function P(x,y∣Oi)P(x,y|O_{i}) of the target (Blachman, 1989). Considering the Bayes’ theorem, for which the readers could refer to the lesson by (C. V. Deutsch & Deutsch, 2018), the aforementioned posterior distribution based on one set of observations can be defined by:

P(x,y∣Oi)=Pi(x,y)∗P(Oi∣x,y)P(Oi)P(x,y|O_{i})=\dfrac{P_{i}(x,y)*P(O_{i}|x,y)}{P(O_{i})}

Provided that Pi(x,y)P_{i}(x,y) is constant over the area of interest, the likelihood can be defined by:

P(Oi∣x,y)=P(Oi)∗P(x,y∣Oi)Pi(x,y)P(O_{i}|x,y)=\dfrac{P(O_{i})*P(x,y|O_{i})}{P_{i}(x,y)}

Assuming that the observations are conditionally independent given (x,y)(x,y), the total conditional probability over all observations, P(O1,…,Om∣x,y)P(O_{1},\ldots,O_{m}|x,y) can then be defined as the product of individual likelihoods P(Oi∣x,y)P(O_{i}|x,y), that is,

P(O1,…,Om∣x,y)=∏i=1mP(Oi)∗P(x,y∣Oi)Pi(x,y)P(O_{1},\ldots,O_{m}|x,y) =\prod_{i=1}^{m} \dfrac{P(O_{i})*P(x,y|O_{i})}{P_{i}(x,y)}

The conditional probability of the target given all observations is defined by the following function:

P(x,y∣O1,…,Om)=P(x,y)P(O1,…,Om)∗∏i=1mP(Oi)∗P(x,y∣Oi)Pi(x,y)P(x,y|O_{1},\ldots,O_{m})=\dfrac{P(x,y)}{P(O_{1},\ldots,O_{m})}*\prod_{i=1}^{m} \dfrac{P(O_{i})*P(x,y|O_{i})}{P_{i}(x,y)}

Because the prior P(x,y)P(x,y) and Pi(x,y)P_{i}(x,y) are assumed to be constant over the area of interest, they can be absorbed into a normalizing constant. P(Oi)P(O_{i}) and P(O1,…,Om)P(O_{1},\ldots,O_{m}) depend only on the observation and are normalizing constants. Therefore, the conditional probability distribution of the target given all observations is defined as follows:

P(x,y∣O1,…,Om)=K∗∏i=1mP(x,y∣Oi)P(x,y|O_{1},\ldots,O_{m})=K*\prod_{i=1}^{m} P(x,y|O_{i})

Because P(x,y∣Oi)P(x,y|O_{i}) is Gaussian, its conditional probability density function can be defined by:

P(x∣O1,…,Om)=K∗exp{−12∑i=1m(x−Oi)TCi−1(x−Oi)}P(\mathbf{x}|\mathbf{O}_{1},\ldots,\textbf{O}_{m})=K*exp \left\{- \dfrac{1}{2}\sum\limits_{i=1}^{m}(\mathbf{x}-\mathbf{O} _{i})^{T}\mathbf{C}^{-1}_{i}(\mathbf{x}-\mathbf{O}_{i})\right\} where KK is the scaling factor; x\mathbf{x} is the vector defining target location; Oi\mathbf{O}_{i} is the observation of x\mathbf{x} and Ci−1\mathbf{C}^{-1}_{i} is the inverse covariance matrix associated with observation Oi\mathbf{O}_{i}. The combined Gaussian mean is also its mode, which is found by differentiating the probability density function given above:

∂p∂x=K∗e−Em/2{−12∂Em∂x}\dfrac{\partial p}{\partial \textbf{x}}=K*e^{-E_{m}/2}\left\{-\dfrac{1}{2}\dfrac{\partial E_{m}}{\partial \textbf{x}}\right\}

where EmE_{m} is defined by:

Em=∑i=1m(x−Oi)TCi−1(x−Oi)E_{m}=\sum\limits_{i=1}^{m}(\mathbf{x}-\mathbf{O}_{i})^{T}\mathbf{C}^{-1}_{i}(\mathbf{x}-\mathbf{O}_{i})

∂Em∂x=[∂Em∂x1⋮∂Em∂xn]\begin{split} \dfrac{\partial E_{m}}{\partial \textbf{x}}= \begin{bmatrix} \dfrac{\partial E_{m}}{\partial x_{1}}\\ \vdots \\ \dfrac{\partial E_{m}}{\partial x_{n}} \end{bmatrix} \end{split}

where mm is the number of observations and nn is the dimensionality of the vector x\mathbf{x} and O\mathbf{O}. Consider the case where there is a single observation, O1\textbf{O}_{1} then,

E1=(x−O1)TC1−1(x−O1)=[x1−O11⋯xn−O1n][B11⋯B1n⋮⋮Bn1⋯Bnn][x1−O11⋮xn−O1n]=[∑i=1nBi1(xi−O1i)⋯∑i=1nBin(xi−O1i)][x1−O11⋮xn−O1n]=∑j=1n(xj−O1j)∑i=1nBij(xi−O1i)\begin{split} E_{1}&=(\mathbf{x}-\mathbf{O}_{1})^{T}\mathbf{C}^{-1}_{1}(\mathbf{x}-\mathbf{O}_{1})\\ &=\begin{bmatrix} x_{1}-O_{11}& \cdots & x_{n}-O_{1n}\\ \end{bmatrix}\begin{bmatrix} B_{11} & \cdots & B_{1n} \\ \vdots & & \vdots \\ B_{n1} & \cdots & B_{nn} \\ \end{bmatrix}\begin{bmatrix} x_{1}-O_{11}\\ \vdots\\ x_{n} - O_{1n}\\ \end{bmatrix}\\ &=\begin{bmatrix} \sum\limits_{i=1}^{n} B_{i1}(x_{i}-O_{1i})& \cdots & \sum\limits_{i=1}^{n} B_{in} (x_{i}-O_{1i})\\ \end{bmatrix}\begin{bmatrix} x_{1}-O_{11}\\ \vdots\\ x_{n} - O_{1n}\\ \end{bmatrix}\\ &=\sum\limits_{j=1}^{n}(x_{j}-O_{1j})\sum\limits_{i=1}^{n}B_{ij}(x_{i}-O_{1i}) \end{split}

Taking the derivative of the above equation with respect to xx

∂E1∂xk=∑i=1nBik(xi−O1i)+∑j=1nBkj(xj−O1j)\dfrac{\partial E_{1}}{\partial x_{k}} =\sum\limits_{i=1}^{n}B_{ik}(x_{i}-O_{1i})+\sum\limits_{j=1}^{n}B_{kj}(x_{j}-O_{1j})

Because both sums run from 1 to nn and BB is symmetric, the component derivative and gradient can be written as follows:

∂E1∂xk=∑i=1nBik(xi−O1i)+∑i=1nBki(xi−O1i)=2∑i=1nBki(xi−O1i)∇xE1=2C1−1(x−O1)\begin{split} \dfrac{\partial E_{1}}{\partial x_{k}} &=\sum\limits_{i=1}^{n}B_{ik}(x_{i}-O_{1i})+\sum\limits_{i=1}^{n}B_{ki}(x_{i}-O_{1i})\\ &=2\sum\limits_{i=1}^{n}B_{ki}(x_{i}-O_{1i})\\ \nabla_{\mathbf{x}} E_1&=2\mathbf{C}^{-1}_{1}(\mathbf{x}-\mathbf{O}_{1}) \end{split}

Setting the derivative to zero

2C1−1(x−O1)=0C1−1x−C1−1O1=0x=O1\begin{split} 2\mathbf{C}^{-1}_{1}(\mathbf{x}-\mathbf{O}_{1})&=0\\ \mathbf{C}^{-1}_{1}\mathbf{x}-\mathbf{C}^{-1}_{1}\mathbf{O}_{1}&=0\\ \mathbf{x}&=\mathbf{O}_{1} \end{split}

If only one set of observations Oi\mathbf{O}_{i} is considered, the best estimation of the target’s location x\mathbf{x} will be equal to that observation Oi\mathbf{O}_{i} (Orechovesky, 1996). Expanding the estimation by considering MM observations:

EM=∑m=1M(∑j=1n(xj−Omj)∑i=1nBij(m)(xi−Omi))=∑m=1M(x−Om)TCm−1(x−Om)\begin{split} E_{M}&=\sum\limits_{m=1}^{M}\left(\sum\limits_{j=1}^{n}(x_{j}-O_{mj})\sum\limits_{i=1}^{n}B_{ij}^{(m)}(x_{i}-O_{mi})\right)\\ &=\sum\limits_{m=1}^{M}(\mathbf{x}-\mathbf{O}_{m})^{T}\mathbf{C}^{-1}_{m}(\mathbf{x}-\mathbf{O}_{m})\\ \end{split}

Here B(m)=Cm−1B^{(m)}=\mathbf{C}_m^{-1}. Taking the derivative of the above equation with respect to x\mathbf{x}

∂EM∂x=2∑m=1MCm−1(x−Om)\dfrac{\partial E_{M}}{\partial \textbf{x}} =2\sum\limits_{m=1}^{M}\textbf{C}^{-1}_{m}(\textbf{x}-\textbf{O}_{m})

Setting the derivative to zero

∑m=1M[Cm−1(x‾−Om)]=0(∑m=1MCm−1)x‾−∑m=1M(Cm−1Om)=0(∑m=1MCm−1)−1(∑m=1MCm−1)x‾−(∑m=1MCm−1)−1∑m=1M(Cm−1Om)=0x‾−∑m=1MC(Cm−1Om)=0\begin{split} \sum\limits_{m=1}^{M}\left[\textbf{C}^{-1}_{m}(\overline{\mathbf{x}}-\mathbf{O}_{m})\right]&=0\\ \left(\sum\limits_{m=1}^{M}\textbf{C}^{-1}_{m}\right)\overline{\mathbf{x}}-\sum\limits_{m=1}^{M}(\mathbf{C}^{-1}_{m}\mathbf{O}_{m})&=0\\ \left(\sum\limits_{m=1}^{M}\textbf{C}^{-1}_{m}\right)^{-1} \left(\sum\limits_{m=1}^{M}\textbf{C}^{-1}_{m}\right)\overline{\mathbf{x}}-\left(\sum\limits_{m=1}^{M}\textbf{C}^{-1}_{m}\right)^{-1}\sum\limits_{m=1}^{M}(\mathbf{C}^{-1}_{m}\mathbf{O}_{m})&=0\\ \overline{\mathbf{x}}-\sum\limits_{m=1}^{M}\mathbf{C}(\textbf{C}^{-1}_{m}\mathbf{O}_{m})&=0 \end{split}

Finally, the combined mean x‾\overline{\mathbf{x}} and variance C\mathbf{C} are defined by:

x‾=C∑m=1M(Cm−1Om),C=(∑m=1MCm−1)−1\overline{\mathbf{x}}=\mathbf{C}\sum\limits_{m=1}^{M}\left(\mathbf{C}^{-1}_{m}\mathbf{O}_{m}\right), \hspace{4pt}\hspace{4pt}\mathbf{C}=\left(\sum\limits_{m=1}^{M}\mathbf{C}^{-1}_{m}\right)^{-1}

Example

Consider two bivariate Gaussian distributions, X,Y∼N(μ,Σ)\mathbf{X}, \mathbf{Y} \sim N(\boldsymbol{\mu},\Sigma). The variables of these random vectors are X=[X1,X2]\mathbf{X} = [X_{1},X_{2}] and Y=[Y1,Y2]\mathbf{Y} = [Y_{1},Y_{2}]. The parameters of the aforementioned bivariate Gaussian distributions are μX=[4,6]\boldsymbol{\mu}_{X}=[4, 6], μY=[3,8]\boldsymbol{\mu}_{Y}=[3,8] and (2×2)(2\times 2) positive definite covariance matrices ΣX\Sigma_{\mathbf{X}}, ΣY\Sigma_{\mathbf{Y}} are:

ΣX=[0.70.90.91.9]ΣY=[0.5001.2]\Sigma_{\mathbf{X}} = \begin{bmatrix} 0.7 & 0.9\\ 0.9 & 1.9\\ \end{bmatrix} \hspace{4pt} \hspace{4pt} \Sigma_{\mathbf{Y}} = \begin{bmatrix} 0.5& 0\\ 0 & 1.2\\ \end{bmatrix}

Based on the parameters given above, the variables, X1,X2X_{1},X_{2} and Y1,Y2Y_{1},Y_{2} were simulated. Let {x1k,x2l;k,l=1,...,800}\{x^{k}_{1}, x^{l}_{2};\hspace{3pt} k,l=1,...,800\} be the simulated samples of X1,X2X_{1},X_{2}, and {y1k,y2l;k,l=1,...,800}\{y^{k}_{1}, y^{l}_{2};\hspace{3pt}k,l=1,...,800\} be the simulated samples of Y1,Y2Y_{1},Y_{2}. The histograms of the samples of the simulated variables are given in Figure 3.

Histograms of the simulated variables
Figure 3: Histograms of the simulated variables

The probability level (1−0.05=0.95)(1-0.05 = 0.95), χ22(0.05)=5.99\chi^{2}_{2}(0.05)=5.99 is first selected, as explained in Step 1. This means that there is a 95%95\% probability that the values of the random vectors X\mathbf{X} and Y\mathbf{Y} will be inside the ellipses. The eigenvalues (Step 2) of ΣX\Sigma_{\mathbf{X}} and ΣY\Sigma_{\mathbf{Y}} are calculated to be λX=[2.38,0.22]\boldsymbol{\lambda}_{X}=[2.38, 0.22] and λY=[1.2,0.5]\boldsymbol{\lambda}_{Y} =[1.2, 0.5], respectively.

Considering the first bivariate Gaussian distribution defined by the random vector X\mathbf{X}, the variables are positively correlated ρ=0.78\rho=0.78. Therefore, the axes of the ellipse will point in the directions of the eigenvectors (Step 3). The eigenvectors of ΣX\Sigma_{\mathbf{X}} are calculated to be υ1=[0.47,0.88]T\mathbf{\upsilon_{1}} =[0.47, 0.88]^{T} and υ2=[0.88,−0.47]T\mathbf{\upsilon_{2}}=[0.88, -0.47]^{T}. The lengths of the ellipse axes are calculated to be (25.99⋅2.38=7.55)(2\sqrt{5.99\cdot 2.38}=7.55), (25.99⋅0.22=2.3)(2\sqrt{5.99\cdot 0.22}=2.3). The axes of the 95%95\% confidence ellipse of the random vector X\mathbf{X} are then defined by ±5.99⋅2.38⋅[0.47,0.88]T\pm\sqrt{5.99\cdot 2.38}\cdot [0.47, 0.88]^{T} and ±5.99⋅0.22⋅[0.88,−0.47]T\pm \sqrt{5.99\cdot 0.22}\cdot [0.88, -0.47]^{T}.

Considering the second bivariate Gaussian distribution defined by the random vector Y\mathbf{Y}, the variables are independent. The eigenvalues of ΣY\Sigma_{\mathbf{Y}} are equal to the variances of Y2Y_{2} and Y1Y_{1}, respectively. As explained in Step 3, the axes of the ellipse are parallel to the original coordinate axes. The lengths of the axes are calculated to be (25.99⋅1.2=5.36)(2\sqrt{5.99\cdot 1.2} =5.36), (25.99⋅0.5=3.46)(2\sqrt{5.99\cdot 0.5}=3.46). The axes of the 95%95\% confidence ellipse of the random vector Y\mathbf{Y} are then defined by ±5.99⋅1.2⋅[0,1]T\pm\sqrt{5.99\cdot 1.2}\cdot [0, 1]^{T} and ±5.99⋅0.5⋅[1,0]T\pm\sqrt{5.99\cdot 0.5}\cdot [1, 0]^{T}. Figure 4 displays two-sigma ellipses for the given bivariate Gaussian distributions, enclosing approximately 86.5%86.5\% rather than 95%95\%.

Two-sigma error ellipses of the bivariate Gaussian distributions (approximately 86.5\% coverage)
Figure 4: Two-sigma error ellipses of the bivariate Gaussian distributions (approximately 86.5%86.5\% coverage)

The variance Cx‾C_{\overline{\mathbf{x}}} of the combined probability distribution is calculated as follows:

Cx‾=([0.70.90.91.9]−1+[0.5001.2]−1)−1Cx‾≈[0.230.190.190.61]\begin{split} C_{\overline{\mathbf{x}}}&=\left(\begin{bmatrix} 0.7& 0.9\\ 0.9 & 1.9\\ \end{bmatrix}^{-1}+\begin{bmatrix} 0.5& 0\\ 0 & 1.2\\ \end{bmatrix}^{-1}\right)^{-1}\\ C_{\overline{\mathbf{x}}}&\approx\begin{bmatrix} 0.23& 0.19\\ 0.19 & 0.61\\ \end{bmatrix} \end{split}

and the mean vector of the combined distribution x‾\overline{\mathbf{x}} is then defined by:

x‾=Cx‾([0.70.90.91.9]−1[46]+[0.5001.2]−1[38])x‾≈[3.846.64]\begin{split} \overline{\mathbf{x}}&=C_{\overline{\mathbf{x}}}\left(\begin{bmatrix} 0.7& 0.9\\ 0.9 & 1.9\\ \end{bmatrix}^{-1} \begin{bmatrix} 4 \\ 6 \\ \end{bmatrix}+\begin{bmatrix} 0.5& 0\\ 0 & 1.2\\ \end{bmatrix}^{-1} \begin{bmatrix} 3 \\ 8 \\ \end{bmatrix}\right)\\ \overline{\mathbf{x}}& \approx \begin{bmatrix} 3.84 \\ 6.64 \\ \end{bmatrix} \end{split}

Based on the estimated variance Cx‾C_{\overline{\mathbf{x}}} and the mean x‾\overline{\mathbf{x}}, the bivariate Gaussian variables are simulated. The two-sigma error ellipse of the combined distribution is given in Figure 5.

Two-sigma error ellipses of the bivariate Gaussian distributions and the combined distribution (approximately 86.5\% coverage)
Figure 5: Two-sigma error ellipses of the bivariate Gaussian distributions and the combined distribution (approximately 86.5%86.5\% coverage)

Summary

The error ellipses method combines Gaussian probability distributions through precision-weighted means. In the univariate case, the combined mean falls between the input means and the lower variance distribution has the greatest influence. In the multivariate case, the matrix weights need not place the combined mean within the convex hull of the input means. This method is especially useful when there is no clear prior distribution, for example, in the estimation of parameters from diverse data sources. The method should not be used for spatial prediction when a reasonable prior model is available.

References

Blachman, N. M. (1989). On combining target-location ellipses. IEEE Transactions on Aerospace and Electronic Systems, 25(2), 284–287.
Deutsch, C. V., & Deutsch, J. L. (2018). An Application of Bayes Theorem to Geostatistical Mapping. In J. L. Deutsch (Ed.), Geostatistics lessons. Retrieved from https://geostatisticslessons.com/lessons/bayesmapping
Deutsch, C. V., & Journel, A. G. (1998). GSLIB - geostatistical software library and user’s guide. Oxford University Press.
Deutsch, J. L., & Deutsch, C. V. (2011). Plotting and checking the bivariate distributions of multiple Gaussian data. Computers & Geosciences, 37(10), 1677–1684.
Doyen, P. M. (1988). Porosity from seismic data: A geostatistical approach. Geophysics, 53(10), 1263–1275.
Doyen, P. M., Boer, L. D. den, & Pillet, W. R. (1996). Seismic porosity mapping in the Ekofisk field using a new form of collocated cokriging. In SPE annual technical conference and exhibition (pp. 21–30).
Johnson, R. A., & Wichern, D. W. (1988). Applied Multivariate Statistical Analysis. Prentice-Hall, Inc.
Orechovesky, J. R., Jr. (1996). Single Source Error Ellipse Combination (Master’s thesis). Naval Postgraduate School, Monterey, California. Retrieved from https://hdl.handle.net/10945/32273
Rezvandehy, M. (2016). Geostatistical reservoir modeling with parameter uncertainty in presence of limited well data (PhD thesis). University of Alberta, Edmonton, Canada.
Xu, W., Tran, T. T., Srivastava, R. M., & Journel, A. G. (1992). Integrating seismic data in reservoir modeling: the collocated cokriging alternative. In SPE annual technical conference and exhibition (pp. 833–842).

Cite this lesson as:

Erten, O., & Deutsch, C. V. (2020). Combination of Multivariate Gaussian Distributions through Error Ellipses. In J. L. Deutsch (Ed.), Geostatistics Lessons. Retrieved from https://geostatisticslessons.com/lessons/errorellipses

Search lesson titles and content.