Tutorials › Stochastic Calculus › The Filtering Problem as Conditional State Estimation

Stochastic Filtering and the Kalman-Bucy Filter · Tutorial 542 of 600

The Filtering Problem as Conditional State Estimation

Learn how conditional expectation turns partial observations into state estimates, and how filtering, prediction, and smoothing use different information.

Advanced 10 min read

What You'll Learn

  • Define a hidden signal and an observation filtration
  • Interpret the conditional expectation as the minimum mean-square state estimate
  • Derive a scalar Gaussian posterior from noisy observations
  • Distinguish filtering from predicting a future observation
  • Compare filtering and smoothing when later data become available
  • Identify the information set that determines each estimate

State Estimation from Partial Information

In a filtering problem, a system has a state that is not directly observed. Instead, an observer sees data related to that state and uses the data available so far to estimate it. The central object is a conditional expectation: it incorporates the observation information while averaging over what remains unknown. The information set matters. Using observations only up to the present gives a filter; using them to estimate a future quantity gives a prediction; using later observations to estimate an earlier state gives a smoother.

For a common probability-space setting, let \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{P})\) carry a Brownian motion \(B_t\). An Ito integrand, whenever one is used, is progressively measurable and belongs to \(\mathcal{L}^2\) on \([0,T]\), meaning \(\mathbb{E}\int_0^T H_s^2\,ds<\infty\). No stochastic integral is needed in the calculations below. The illustrative signal is observed at integer times, with its measurement errors supplied by Brownian increments.

Definition: A hidden signal is a state process \(X_t\) whose values are not directly available to the observer. An observation process is data \(Y_t\) (or a sequence of observations) available to the observer. Its observation filtration \((\mathcal{G}_t)\) is the increasing family of sigma-fields generated by the observations available by time \(t\), usually completed by the \(\mathbb{P}\)-null sets. The conditional state estimate at time \(t\) is \(\widehat X_t=\mathbb{E}[X_t\mid\mathcal{G}_t]\), when \(X_t\) is integrable.

The estimate is a random variable measurable with respect to the observations: its value can depend on what has been seen. Conditional expectations are defined up to almost-sure equality, so two versions that differ only on a null event represent the same estimate. If the state has several components, the conditional expectation is taken componentwise.

Definition: Given an observation filtration \((\mathcal{G}_t)\), the filter of \(X_t\) is \(\mathbb{E}[X_t\mid\mathcal{G}_t]\). A prediction at time \(t\) of a later state \(X_{t+h}\), for \(h>0\), is \(\mathbb{E}[X_{t+h}\mid\mathcal{G}_t]\). A smoothing estimate of an earlier state \(X_s\), for \(s<t\), is \(\mathbb{E}[X_s\mid\mathcal{G}_t]\), which may use observations arriving after time \(s\).

These terms describe the information used, not different kinds of averages. A filter conditions on data through the state time; a predictor conditions on data available now but estimates a later state; a smoother estimates an earlier state with a larger, later observation set. In a static-signal example the predicted state may equal the filtered state, but a predicted future measurement still has additional measurement uncertainty.

Why the Conditional Mean Is the Natural Estimate

Proposition: Let \(X\) be square-integrable and let \(\mathcal{G}\) be an observation sigma-field. Among all square-integrable, \(\mathcal{G}\)-measurable estimates \(A\), the conditional expectation \(M=\mathbb{E}[X\mid\mathcal{G}]\) minimizes \(\mathbb{E}[(X-A)^2]\). The minimizer is unique up to almost-sure equality.

Proof. The conditional expectation \(M\) is square-integrable: conditional Jensen's inequality gives \(\mathbb{E}[M^2]\le\mathbb{E}[X^2]\). For any square-integrable \(\mathcal{G}\)-measurable \(A\), expand the squared error:

$$ \mathbb{E}[(X-A)^2] =\mathbb{E}[(X-M)^2]+\mathbb{E}[(M-A)^2]+2\mathbb{E}[(X-M)(M-A)]. $$

The cross term is zero. Indeed, \(M-A\) is \(\mathcal{G}\)-measurable and square-integrable, and the defining property of conditional expectation gives \(\mathbb{E}[X-M\mid\mathcal{G}]=0\). Therefore \(\mathbb{E}[(X-M)(M-A)]=0\). It follows that the error for \(A\) equals the error for \(M\) plus the nonnegative quantity \(\mathbb{E}[(M-A)^2]\). Equality of the errors holds precisely when \(\mathbb{E}[(M-A)^2]=0\), or \(A=M\) almost surely. \(\square\)

This proposition explains why conditional state estimation is often posed as a minimum mean-square error problem. It does not assert that the conditional mean is always an appropriate estimate under every loss function: absolute-error loss, for example, is minimized by a conditional median rather than necessarily by the mean.

A Scalar Gaussian Observation Model

For explicit calculations, take a random variable \(\Theta\sim N(m_0,p_0)\) with \(p_0>0\), independent of the Brownian motion \(B_t\), on a filtered probability space as above. Define the hidden signal by \(X_k=\Theta\) at every integer time \(k\ge0\). The observer records the increments

$$ Z_k=\Theta+(B_k-B_{k-1}),\qquad k=1,2,\ldots, \qquad \mathcal{G}_n=\sigma(Z_1,\ldots,Z_n), $$

with \(\mathcal{G}_0\) the trivial sigma-field, completed by null sets. Brownian increments over distinct unit intervals are independent \(N(0,1)\) variables and are independent of \(\Theta\). Thus each observation is the signal plus independent, mean-zero Gaussian noise of variance \(1\). This model is deliberately simple: the signal is constant, while the observer learns about it from repeated noisy measurements.

Theorem: For observations \(Z_1,\ldots,Z_n\) from the model above, the conditional distribution of \(\Theta\) given \(\mathcal{G}_n\) is Gaussian with variance \(p_n=(p_0^{-1}+n)^{-1}\) and mean $$ m_n=p_n\left(\frac{m_0}{p_0}+\sum_{j=1}^n Z_j\right). $$ For \(n=0\), the sum is zero, so the formula gives the prior mean and variance.

Proof. For \(n\ge1\), conditional on \(\Theta=\theta\), the observations are independent with densities proportional to \(\exp[-(Z_j-\theta)^2/2]\). Multiplying these likelihoods by the prior density shows that the conditional density of \(\theta\), as a function of \(\theta\) for fixed observations, is proportional to

$$ \exp\left[-\frac{(\theta-m_0)^2}{2p_0} -\frac12\sum_{j=1}^n(Z_j-\theta)^2\right]. $$

Collect the terms involving \(\theta\). The coefficient of \(\theta^2\) inside the negative half of the exponent is \(p_0^{-1}+n\), and the corresponding linear coefficient is \(m_0/p_0+\sum_{j=1}^n Z_j\). Completing the square therefore gives a normal density with precision \(p_0^{-1}+n\), variance \(p_n=(p_0^{-1}+n)^{-1}\), and mean \(p_n(m_0/p_0+\sum_{j=1}^n Z_j)\). The normalizing constant is finite and positive because \(p_0^{-1}+n>0\). For \(n=0\), no likelihood terms are present, and the conditional distribution is the prior itself, which agrees with the stated formula. Hence \(m_n=\mathbb{E}[\Theta\mid\mathcal{G}_n]\) and \(p_n\) is its conditional variance. \(\square\)

Filtering, Prediction, and Smoothing in the Example

Worked Example: Filtering after the First Observation

Let the prior be \(\Theta\sim N(2,4)\), and suppose the first observed value is \(Z_1=3\). Compute the filter and its conditional variance.

Here \(m_0=2\), \(p_0=4\), \(n=1\), and the sum of observations is \(3\). The posterior precision is \(p_0^{-1}+1=\tfrac14+1=\tfrac54\), so \(p_1=(\tfrac54)^{-1}=\tfrac45\). The posterior mean is

$$ m_1=\frac45\left(\frac24+3\right) =\frac45\left(\frac12+3\right) =\frac45\cdot\frac72 =\frac{14}{5}. $$

Thus the filtering distribution is \(N(\tfrac{14}{5},\tfrac45)\), and the conditional state estimate is \(\mathbb{E}[\Theta\mid\mathcal{G}_1]=\tfrac{14}{5}\). Check: the prior precision is \(\tfrac14\), and the observation contributes precision \(1\), giving posterior variance \(\tfrac45\) as calculated. The estimate lies between the prior mean \(2\) and the observed value \(3\), as expected for a finite-variance noisy measurement.

Worked Example: Predicting the Next Observation

Use the preceding posterior to predict \(Z_2\), before observing it. Since \(Z_2=\Theta+(B_2-B_1)\), the new Brownian increment is independent of \(\mathcal{G}_1\), has mean zero and variance \(1\), and is independent of \(\Theta\). Therefore

$$ \mathbb{E}[Z_2\mid\mathcal{G}_1]=m_1=\frac{14}{5}, \qquad \operatorname{Var}(Z_2\mid\mathcal{G}_1)=p_1+1=\frac45+1=\frac95. $$

The conditional predictive distribution is \(N(\tfrac{14}{5},\tfrac95)\). This is not the same as the predictive distribution of the hidden state \(X_2=\Theta\): for that state, \(\mathbb{E}[X_2\mid\mathcal{G}_1]=\tfrac{14}{5}\) and its conditional variance is \(\tfrac45\). The extra \(1\) in the observation prediction is measurement noise. Check: the predictive observation variance is the posterior uncertainty about \(\Theta\), \(\tfrac45\), plus the independent noise variance, \(1\), which totals \(\tfrac95\).

Worked Example: Smoothing the State at Time One

Suppose the second observation is subsequently recorded as \(Z_2=1\). Compute the estimate of the time-one state using both observations. Because \(X_1=\Theta\), this is the smoothing estimate \(\mathbb{E}[X_1\mid\mathcal{G}_2]\).

The two observations sum to \(Z_1+Z_2=3+1=4\). The posterior precision is \(p_0^{-1}+2=\tfrac14+2=\tfrac94\), so the posterior variance is \(p_2=(\tfrac94)^{-1}=\tfrac49\). The posterior mean is

$$ m_2=\frac49\left(\frac24+4\right) =\frac49\left(\frac12+4\right) =\frac49\cdot\frac92 =2. $$

Thus \(\mathbb{E}[X_1\mid\mathcal{G}_2]=2\), whereas the filter at time one, based only on \(Z_1\), was \(\tfrac{14}{5}\). Check: applying the one-observation update to the posterior \(N(\tfrac{14}{5},\tfrac45)\) and the new value \(1\) gives variance \((\tfrac54+1)^{-1}=\tfrac49\) and mean \(\tfrac49(\tfrac{(14/5)}{(4/5)}+1)=\tfrac49(\tfrac72+1)=2\), agreeing with the direct two-observation calculation.

The smoothing estimate uses later information to revise an earlier estimate. There is no contradiction in the estimate changing: \(\mathbb{E}[X_1\mid\mathcal{G}_1]\) and \(\mathbb{E}[X_1\mid\mathcal{G}_2]\) condition on different sigma-fields. More information can reduce conditional uncertainty, but a particular realized observation can move the estimate in either direction.

Information Sets and a Common Pitfall

A useful way to keep the three tasks straight is to name both the state time and the information time. Filtering estimates \(X_t\) with \(\mathcal{G}_t\); prediction estimates \(X_{t+h}\) with \(\mathcal{G}_t\); smoothing estimates \(X_s\), \(s<t\), with \(\mathcal{G}_t\). In this static example, the conditional mean of the future hidden state equals the current filter because \(X_{t+h}=X_t=\Theta\). This equality is a feature of a constant signal, not a general identity for evolving states.

Common mistake: treating a future observation as if it were the hidden state. After the first measurement in the example, one might report the predicted observation variance as \(\tfrac45\), simply reusing the posterior variance of \(\Theta\). That omits the next independent measurement error. The corrected calculation is \(\operatorname{Var}(Z_2\mid\mathcal{G}_1)=\operatorname{Var}(\Theta\mid\mathcal{G}_1)+\operatorname{Var}(B_2-B_1)=\tfrac45+1=\tfrac95\). The hidden-state prediction variance remains \(\tfrac45\); the future-observation prediction variance is \(\tfrac95\).

In general, state-estimation problems require specifying what is observed and when. The conditional expectation is defined relative to the observation filtration, not the full filtration \((\mathcal{F}_t)\), which contains information unavailable to the observer, including the hidden signal. Confusing those two information sets can produce an estimate that uses information the observer does not possess.

Check Your Understanding

Use the definitions and Gaussian update above to answer the following.

  1. For a prior \(N(m_0,p_0)\) and no observations, what are the filtering mean and variance at time zero?
  2. In the worked model, why does predicting \(X_2\) after one observation have a different variance from predicting \(Z_2\)?
  3. With prior \(N(2,4)\) and observation \(Z_1=3\), compute the posterior precision before taking its reciprocal.
  4. State the sigma-field used to smooth \(X_1\) after two observations, and explain why it differs from the one used to filter \(X_1\).
  5. Why is the conditional mean the minimum mean-square estimate among observation-measurable estimates?