Tutorials › Stochastic Processes › Choosing a Gaussian Model for Endpoint and Noisy Data

Gaussian Processes · Tutorial 888 of 994

Choosing a Gaussian Model for Endpoint and Noisy Data

Learn how endpoint constraints and measurement noise change the conditional mean and covariance of Gaussian process predictions.

Advanced 12 min read

What You'll Learn

  • Derive the conditional mean and covariance of Brownian motion given its endpoint.
  • Compute predictions inside an Ornstein–Uhlenbeck bridge from two fixed endpoints.
  • Use the observation-noise covariance when conditioning a Gaussian process on noisy data.
  • Check how exact endpoint constraints differ from noisy observations.
  • Identify a common error that incorrectly treats noisy data as exact.

Three Models for Constrained or Observed Paths

A prediction between fixed endpoints is not the same problem as a prediction from noisy measurements. In the first case, the path is required to match its endpoints exactly; in the second, the observed values include measurement error, so the latent process need not pass through them. The covariance model matters too: Brownian motion and an Ornstein–Uhlenbeck process respond differently to the same endpoint constraints. This tutorial works through each case by conditioning a Gaussian vector of endpoint or observation values together with the quantity to be predicted.

All processes below are defined on a probability space \((\Omega,\mathcal{F},\mathbb{P})\), have continuous time \(t\ge0\), and take values in \(S=\mathbb{R}\). We use the finite-dimensional Gaussian conditioning formula: if \(U\) and \(V\) are jointly Gaussian, \(\operatorname{Cov}(V)\) is invertible, and their means and covariance blocks are known, then

$$ \mathbb{E}[U\mid V=v] =m_U+\operatorname{Cov}(U,V)\operatorname{Cov}(V)^{-1}(v-m_V), $$

and the conditional covariance is \(\operatorname{Cov}(U)-\operatorname{Cov}(U,V)\operatorname{Cov}(V)^{-1}\operatorname{Cov}(V,U)\). For conditioning at a finite set of process times, apply this formula to the corresponding Gaussian vectors.

Why the formula works: Subtract the linear prediction from \(U\) and set \(R=U-m_U-\operatorname{Cov}(U,V)\operatorname{Cov}(V)^{-1}(V-m_V)\). Direct calculation gives \(\operatorname{Cov}(R,V)=0\). Since \(R\) and \(V\) are jointly Gaussian, zero cross-covariance implies independence (their joint Gaussian characteristic function factors). Thus, given \(V\), the residual \(R\) keeps its unconditional mean zero and covariance, while the subtracted linear term is determined by \(V\). This gives the stated mean and covariance.

When an endpoint value is specified, the event that a continuous Gaussian variable equals that particular value usually has probability zero. We use the Gaussian conditional distribution as a regular conditional law, with the continuous version of its mean and covariance formulas. This gives a well-defined bridge model for each specified endpoint value; it is not ordinary conditioning on a positive-probability event.

Brownian Motion Conditioned at Its Endpoint

Let \((B_t)_{t\ge0}\) be standard Brownian motion, so \(\mathbb{E}[B_t]=0\) and \(\operatorname{Cov}(B_s,B_t)=\min(s,t)\). Fix \(T>0\) and an endpoint \(b\in\mathbb{R}\). For \(0\le t\le T\), conditioning on \(B_T=b\) gives

$$ \mathbb{E}[B_t\mid B_T=b]=\frac{t}{T}b, \qquad \operatorname{Cov}(B_s,B_t\mid B_T=b) =\min(s,t)-\frac{st}{T}. $$

Derivation. The endpoint has mean zero and variance \(T\), while \(\operatorname{Cov}(B_t,B_T)=t\) for \(t\le T\). The conditional mean formula therefore gives \(tT^{-1}b\). For \(s,t\le T\), the conditional covariance is \(\min(s,t)-sT^{-1}t\). In particular, the mean reaches \(b\) at \(T\), and the conditional variance there is \(T-T^2/T=0\). The covariance describes uncertainty remaining between the fixed endpoints.

Worked Example: A Brownian Bridge to a Fixed Value

Suppose standard Brownian motion is conditioned to satisfy \(B_2=3\). Find its conditional mean at times \(1/2\) and \(1\), and its conditional variance at time \(1/2\) and covariance between times \(1/2\) and \(1\).

Here \(T=2\) and \(b=3\). The mean at time \(1/2\) is \((\tfrac12/2)3=\tfrac34\). The mean at time \(1\) is \((1/2)3=\tfrac32\). The variance at \(1/2\) is \(\min(\tfrac12,\tfrac12)-(\tfrac12)^2/2=\tfrac12-\tfrac18=\tfrac38\). The covariance between times \(1/2\) and \(1\) is \(\tfrac12-(\tfrac12)(1)/2=\tfrac14\).

Check: At the endpoint, the conditional mean is \((2/2)3=3\), and the conditional variance is \(2-2\cdot2/2=0\), as required. The positive covariance \(\tfrac14\) is consistent with the two interior values sharing uncertainty about the path.

Conditioning an Ornstein–Uhlenbeck Process at Both Ends

Now consider a stationary, mean-zero Ornstein–Uhlenbeck process with covariance \(C(s,t)=c e^{-\theta|t-s|}\), where \(c=\sigma^2/(2\theta)>0\) and \(\theta>0\). Fix \(T>0\) and condition on \(X_0=a\) and \(X_T=b\). These endpoint values have a nonsingular joint Gaussian distribution because the endpoint covariance matrix has determinant \(c^2(1-e^{-2\theta T})>0\).

Endpoint-conditioned OU formulas: For \(0\le u\le T\), the conditional mean is $$ \mathbb{E}[X_u\mid X_0=a,X_T=b] =\frac{a\sinh(\theta(T-u))+b\sinh(\theta u)}{\sinh(\theta T)}. $$ For \(0\le s\le t\le T\), the conditional covariance is $$ \operatorname{Cov}(X_s,X_t\mid X_0=a,X_T=b) =c\,\frac{\sinh(\theta s)\sinh(\theta(T-t))}{\sinh(\theta T)}. $$ For \(t<s\), exchange \(s\) and \(t\).

Justification. Write \(r=e^{-\theta T}\). The endpoint covariance matrix is \(c\begin{bmatrix}1&r\\r&1\end{bmatrix}\), whose inverse is \(\{c(1-r^2)\}^{-1}\begin{bmatrix}1&-r\\-r&1\end{bmatrix}\). The covariance of \(X_u\) with the endpoints is \(c(e^{-\theta u},e^{-\theta(T-u)})\). Multiplying this row by the inverse and by \((a,b)^\mathsf{T}\) gives the conditional mean. Replacing the exponentials by their definitions in terms of \(\sinh\), and using \(\sinh(\theta T)=\sinh(\theta u)e^{\theta(T-u)}+\sinh(\theta(T-u))e^{-\theta u}\), gives the displayed expression. For the covariance, the Gaussian conditioning formula subtracts the endpoint-mediated covariance from \(c e^{-\theta(t-s)}\). Substitution of the same inverse and the identities \(2\sinh x\sinh y=\cosh(x+y)-\cosh(x-y)\) gives \(c\sinh(\theta s)\sinh(\theta(T-t))/\sinh(\theta T)\). The formula is symmetric in \(s,t\) and is zero when either time is an endpoint.

The hyperbolic-sine weights are determined by the OU covariance, not by a linear interpolation rule. In particular, the mean is pulled toward zero in the middle according to the mean-reverting covariance structure. The bridge covariance also depends on \(\theta\): even with the endpoints fixed, the amount and timing of uncertainty differ from the Brownian bridge.

Worked Example: An OU Bridge with Unequal Endpoints

Take \(\theta=1\), \(\sigma^2=2\), \(T=2\), \(a=1\), and \(b=0\). Then \(c=\sigma^2/(2\theta)=1\). Find the conditional mean and variance at time \(u=1\).

The mean formula gives \(\{\sinh(1)+0\cdot\sinh(1)\}/\sinh(2)=\sinh(1)/\sinh(2)=1/(2\cosh(1))\), using \(\sinh(2)=2\sinh(1)\cosh(1)\). The variance is the covariance formula with \(s=t=1\): \(1\cdot\sinh(1)\sinh(1)/\sinh(2)=\sinh(1)/(2\cosh(1))\).

Check: The mean formula gives \(1\) at \(u=0\), since \(\sinh(2)/\sinh(2)=1\), and \(0\) at \(u=2\). The covariance formula gives zero variance at both endpoints because one of its numerator factors is \(\sinh(0)=0\). The interior variance is positive because \(\sinh(1)>0\) and \(\cosh(1)>0\).

Noisy Gaussian Process Observations

Let \(f(t)\) be a Gaussian process with mean \(m(t)\) and covariance \(C(s,t)\). At observation times \(t_1,\ldots,t_n\), suppose we observe \(Y_i=f(t_i)+\varepsilon_i\), where the errors are independent Gaussian variables, independent of the process, with mean zero and variances \(r_i>0\). Let \(K\) be the \(n\) by \(n\) matrix with entries \(K_{ij}=C(t_i,t_j)\), let \(R\) be diagonal with entries \(r_i\), and let \(k_*\) be the column vector with entries \(C(t_i,t_*)\). The observation covariance is \(K+R\), which is invertible when \(R\) is positive definite. The conditional distribution of the latent value \(f(t_*)\) has mean and variance

$$ m(t_*)+k_*^\mathsf{T}(K+R)^{-1}(y-m_X), \qquad C(t_*,t_*)-k_*^\mathsf{T}(K+R)^{-1}k_*, $$

where \(m_X\) is the column vector with entries \(m(t_i)\). These expressions follow by applying finite-dimensional Gaussian conditioning to the joint vector of \(f(t_*)\) and \(Y\). Independence of the errors leaves the cross-covariance \(\operatorname{Cov}(f(t_*),Y)=k_*^\mathsf{T}\), while adding the errors changes the observation covariance from \(K\) to \(K+R\). For noiseless observations, take \(R=0\) when \(K\) is invertible; the latent process is then constrained to match those observed values.

Worked Example: Predicting from Two Noisy Measurements

Let the two latent values \(f(t_1),f(t_2)\) have mean zero and covariance matrix \(K=\begin{bmatrix}1&\tfrac12\\\tfrac12&1\end{bmatrix}\). Observe \(y=(1,0)^\mathsf{T}\) with independent error variances \(1\), and predict \(f(t_1)\). Compute its conditional mean and variance.

Here \(R=I\), so \(K+R=\begin{bmatrix}2&\tfrac12\\\tfrac12&2\end{bmatrix}\), with determinant \(4-\tfrac14=\tfrac{15}{4}\). Its inverse is \(\begin{bmatrix}\tfrac{8}{15}&-\tfrac{2}{15}\\-\tfrac{2}{15}&\tfrac{8}{15}\end{bmatrix}\). For prediction at \(t_1\), \(k_*=(1,\tfrac12)^\mathsf{T}\). Multiplying the inverse by \(y\) gives \((\tfrac{8}{15},-\tfrac{2}{15})^\mathsf{T}\), so the conditional mean is \(1\cdot\tfrac{8}{15}+\tfrac12(-\tfrac{2}{15})=\tfrac{7}{15}\). Multiplying the inverse by \(k_*\) gives \((\tfrac{7}{15},\tfrac{2}{15})^\mathsf{T}\). Thus the conditional variance is \(1-(1\cdot\tfrac{7}{15}+\tfrac12\cdot\tfrac{2}{15})=1-\tfrac{8}{15}=\tfrac{7}{15}\).

Check: The observation covariance times its inverse has diagonal entries \(2\cdot\tfrac{8}{15}+\tfrac12(-\tfrac{2}{15})=1\) and off-diagonal entries \(2(-\tfrac{2}{15})+\tfrac12(\tfrac{8}{15})=0\). Also, the predicted latent mean \(\tfrac{7}{15}\) is not forced to equal the noisy measurement \(1\), and its remaining variance is positive.

Choosing the Model and Avoiding a Common Error

The conditioning operation is the same in each case, but its inputs encode different assumptions. A Brownian bridge uses the Brownian covariance and one fixed endpoint; an OU bridge uses the OU covariance and two fixed endpoints; noisy-data prediction adds the measurement-error covariance before inversion.

SituationConditioning valuesObservation covarianceMust the latent path match the data?
Brownian bridgeOne Brownian endpointEndpoint variance \(T\)Yes, at the fixed endpoint
OU bridgeTwo OU endpointsEndpoint covariance matrixYes, at both fixed endpoints
Noisy Gaussian processMeasurements plus error\(K+R\)No

Common mistake: treating noisy measurements as exact. In the two-measurement example, using \(K^{-1}\) instead of \((K+R)^{-1}\) would treat the data as noiseless. Since \(f(t_1)\) is then observed exactly as \(1\), that calculation gives conditional mean \(1\) and conditional variance \(0\). But the actual measurements have error variance \(1\), so the correct calculations use \(K+R\) and give mean \(\tfrac{7}{15}\) and variance \(\tfrac{7}{15}\). The error is not a small algebraic discrepancy: it replaces an uncertain measurement with a hard constraint.

Before conditioning, specify which values are fixed and which are noisy, and choose a covariance model appropriate to the process. Then form the cross-covariance with the target and the covariance of the conditioning vector. This keeps endpoint constraints, measurement error, and latent-process uncertainty in their proper roles.

Check Your Understanding

Use the conditioning formulas to answer each question, and check endpoint or covariance claims by substitution.

  1. For a standard Brownian bridge on \([0,4]\) conditioned to end at \(b=2\), find the conditional mean at time \(1\) and variance at time \(2\).
  2. In the OU bridge formula, what happens to the conditional variance when \(s=0\) or \(t=T\), and which factor makes it happen?
  3. For noisy observations, explain why the cross-covariance between \(f(t_*)\) and \(Y\) is \(k_*^\mathsf{T}\), not \(k_*^\mathsf{T}+R\).
  4. In the two-measurement example, calculate the conditional mean of \(f(t_2)\) using the same inverse matrix and verify it by multiplication.
  5. State the modeling change made when \(R=0\), assuming the observation covariance matrix \(K\) is invertible.