Tutorials › Stochastic Calculus › Innovation Residuals and Filtering Diagnostics

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

Innovation Residuals and Filtering Diagnostics

Use innovation residuals to check a filter’s predictions while separating observation-noise effects from state-estimation error.

Advanced 12 min read

What You'll Learn

  • Define continuous-time innovation residuals and their sampled increments.
  • Derive the zero-mean and covariance predictions under a correctly specified model.
  • Explain when whiteness implies temporal independence and when it does not.
  • Calculate residual means with an omitted observation offset and state-prediction error.
  • Diagnose noise-scaling and signal-parameter misspecification using exact examples.
  • Distinguish model-based residual predictions from finite-sample diagnostic evidence.

What an Innovation Residual Measures

A filter predicts observations using the information available so far. The difference between a new observation and that prediction is an innovation residual. Under a correctly specified model, this residual has predicted mean zero and a covariance fixed by the observation-noise model. These properties make residuals useful diagnostics: persistent means suggest bias, incorrect spread suggests a noise-scale problem, and dependence across time can signal model misspecification.

Residuals must be interpreted with care. Subtracting the predicted observation drift does not usually leave only observation noise. The residual also includes the effect of any error in the predicted hidden state. Consequently, the observation-noise variance alone is the full residual variance only when the state contribution is known exactly, or when additional assumptions establish that the state-error contribution vanishes.

Work on a filtered probability space \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{P})\) carrying a two-dimensional Brownian motion \(\mathbf{B}_t=(B^1_t,B^2_t)\) with independent components. Consider the scalar linear Gaussian model \(dX_t=aX_t\,dt+q\,dB^1_t\) and \(dY_t=H X_t\,dt+\sqrt{R}\,dB^2_t\), where \(R>0\), and the initial state is Gaussian and independent of \(\mathbf{B}\). The signal and observation stochastic integrals are Ito integrals; their integrands are adapted, progressively measurable, and satisfy \(\mathbb{E}\int_0^T H_s^2\,ds<\infty\) on every finite horizon. Here the constant integrands \(q\) and \(\sqrt R\) satisfy this condition. The observation filtration is \(\mathcal{F}^Y_t=\sigma(Y_s:0\le s\le t)\), completed in the usual way. Write \(m_t=\mathbb{E}[X_t\mid\mathcal{F}^Y_t]\) for the filter’s conditional mean.

Definition: The innovation process is \(I_t=Y_t-\int_0^t Hm_s\,ds\). Its increment over \([s,t]\) is the innovation residual \(r_{s,t}=Y_t-Y_s-\int_s^t Hm_u\,du\). The residual standardized for an interval of length \(h=t-s>0\) is \(z_{s,t}=r_{s,t}/\sqrt{Rh}\), when the model predicts observation-noise variance rate \(R\).

For this correctly specified linear Gaussian model, the innovations result states that \(I_t/\sqrt R\) is a Brownian motion with respect to the observation filtration. This is a standard result from the earlier material on the innovations process; its filtering hypotheses include the correct signal and observation model and the conditional-mean filter. Thus its increments have zero conditional mean, variance \(R(t-s)\), and are independent over disjoint time intervals. This statement concerns the exact model residuals, not arbitrary residuals computed after fitting parameters to the same data.

Predictions Under the Correct Model

Proposition: Under the preceding correct-model assumptions, for \(0\le s<t\), \(\mathbb{E}[r_{s,t}\mid\mathcal{F}^Y_s]=0\) and \(\mathbb{E}[r_{s,t}^2\mid\mathcal{F}^Y_s]=R(t-s)\). Residuals over disjoint intervals are independent Gaussian random variables. In particular, \(z_{s,t}\) has distribution \(N(0,1)\), and standardized residuals on disjoint intervals are independent.

Proof. By definition, \(r_{s,t}=I_t-I_s\). The innovations result gives that \(I/\sqrt R\) is Brownian in the observation filtration. Therefore \(I_t-I_s\), conditional on \(\mathcal{F}^Y_s\), is centered normal with variance \(R(t-s)\). Its conditional mean and conditional second moment are consequently \(0\) and \(R(t-s)\). Brownian increments on disjoint time intervals are independent, so the corresponding residual increments are independent. Dividing each increment by the positive constant \(\sqrt{R(t-s)}\) gives a standard normal random variable and preserves independence. \(\square\)

The proposition supplies predictions, not a guarantee that a finite dataset will have an exactly zero sample mean or exactly zero sample autocorrelations. Random samples fluctuate. Diagnostics therefore compare observed patterns with these model-based predictions, accounting for the number and spacing of observations.

Worked Example: Standardizing Residuals on Unequal Intervals

Suppose the correct model has observation-noise variance rate \(R=4\). Two disjoint observation intervals have lengths \(h_1=\tfrac14\) and \(h_2=1\), and their observed residuals are \(r_1=1\) and \(r_2=-2\). Compute the predicted residual variances and standardized values.

For the first interval, the predicted variance is \(Rh_1=4\cdot\tfrac14=1\), so its standard deviation is \(1\). Therefore \(z_1=1/\sqrt{1}=1\). For the second interval, the predicted variance is \(Rh_2=4\cdot1=4\), so its standard deviation is \(2\). Therefore \(z_2=-2/\sqrt{4}=-1\).

Check: the squared standardized values are \(1^2=1\) and \((-1)^2=1\); both residuals are one predicted standard deviation from zero. Under the correct model each standardized residual is marginally \(N(0,1)\), and these two are independent because their intervals are disjoint. Their particular values do not prove the model correct.

Residual Decomposition: Include State-Prediction Error

Suppose the actual observation equation includes a deterministic offset \(b\,dt\), while the filter subtracts only its modelled drift \(Hm_u\,du\). On an interval \([s,t]\) the resulting residual is

$$ r_{s,t} =b(t-s)+\int_s^t H(X_u-m_u)\,du+\sqrt R\,(B^2_t-B^2_s). $$

This identity follows by integrating the observation equation and subtracting the filter’s predicted drift. Taking expectations gives the exact mean formula

$$ \mathbb{E}[r_{s,t}] =b(t-s)+\mathbb{E}\left[\int_s^t H(X_u-m_u)\,du\right]. $$

Thus the offset contributes \(b(t-s)\), but that contribution need not be the entire residual mean. If the filter updates its state estimate using observations affected by the offset, its state-prediction error may itself have nonzero mean. Likewise, the residual variance in general includes the variance of the integrated state error and its covariance with observation noise; it cannot be obtained by adding the observation-noise variance alone without justified assumptions.

Theorem: If the state contribution is known exactly on \([s,t]\), so that the only random part of the residual is the observation-noise increment, then an omitted constant offset \(b\) gives \(\mathbb{E}[r_{s,t}]=b(t-s)\) and \(\operatorname{Var}(r_{s,t})=R(t-s)\).

Proof. Exact knowledge of the state contribution means that subtracting the predicted observation drift leaves \(r_{s,t}=b(t-s)+\sqrt R(B^2_t-B^2_s)\). Brownian increments have mean zero and variance \(t-s\). The deterministic term has mean \(b(t-s)\) and zero variance. Hence the residual mean is \(b(t-s)\), while its variance is \(R(t-s)\). \(\square\)

Worked Example: Detecting an Omitted Observation Offset

Assume the state contribution to the observation is known exactly, the actual offset is \(b=2\), the observation-noise variance rate is \(R=1\), and each diagnostic interval has length \(h=\tfrac12\). Find the residual mean, variance, and standardized mean shift.

Because the state contribution is known exactly, the residual is \(r=bh+\sqrt R\,\Delta B^2\). Its mean is \(bh=2\cdot\tfrac12=1\). Its variance is \(Rh=1\cdot\tfrac12=\tfrac12\), so its standard deviation is \(\sqrt{\tfrac12}=1/\sqrt2\). The standardized mean shift is therefore \(1/(1/\sqrt2)=\sqrt2\).

Check: the residual second moment is its variance plus the square of its mean: \(\mathbb{E}[r^2]=\tfrac12+1^2=\tfrac32\). If the offset were zero, the same state-known calculation would give mean \(0\), variance \(\tfrac12\), and second moment \(\tfrac12\). Here the nonzero mean, rather than an increased variance, is the direct signature of the omitted deterministic offset under these assumptions.

Diagnosing Noise Scale and Parameter Errors

When a filter predicts variance rate \(\widehat R\) but the actual observation-noise variance rate is \(R\), standardized residuals formed using the filter’s scale have noise variance \(R/\widehat R\), provided the state contribution is known exactly. A value above one indicates that the actual noise is larger than predicted; a value below one indicates that it is smaller. With uncertain state, this comparison alone is insufficient: state-prediction error also affects the total residual spread.

Worked Example: Incorrect Noise Scaling with Known State

Suppose the state contribution is known exactly, there is no offset, the actual observation-noise variance rate is \(R=9\), but the filter uses \(\widehat R=4\). On an interval of length \(h=\tfrac14\), calculate the actual and predicted residual variances and the variance of the residual standardized using the filter’s scale.

The residual consists only of the observation-noise increment, so its actual variance is \(Rh=9\cdot\tfrac14=\tfrac94\). The filter predicts variance \(\widehat R h=4\cdot\tfrac14=1\). It therefore divides the residual by \(\sqrt{1}=1\). The variance of that standardized residual is \((Rh)/(\widehat R h)=\tfrac94/1=\tfrac94\).

Check: using the general ratio gives \(R/\widehat R=9/4=\tfrac94\), the same result. The state-known assumption is essential here: if state uncertainty were present, the full residual variance would also contain state-error terms and their covariances.

Parameter misspecification can instead produce a time-varying residual mean. A clean way to isolate this effect is to use a known deterministic signal trajectory, so no hidden-state estimation error is being mistaken for an observation-noise effect. More generally, if the true signal is \(X_u\) and the filter predicts \(\widehat X_u\), the mean contribution from their difference over an interval is \(\mathbb{E}[\int_s^t H(X_u-\widehat X_u)\,du]\), in addition to any omitted offset.

Worked Example: A Wrong Signal-Drift Parameter

Let the true signal be known and constant, \(X_u=1\), while the filter predicts \(\widehat X_u=e^u\). Take \(H=1\), observation-noise variance rate \(R=1\), no offset, and interval \([0,1]\). Find the residual mean and variance.

The residual is the integrated difference in observation drifts plus the noise increment: \(r=\int_0^1(1-e^u)\,du+(B^2_1-B^2_0)\). The deterministic integral is \([u-e^u]_0^1=(1-e)-(0-1)=2-e\). Hence \(\mathbb{E}[r]=2-e\). Since the state contribution is deterministic and the Brownian increment has variance \(1\), \(\operatorname{Var}(r)=1\).

Check: if the filter instead predicted the correct constant trajectory \(\widehat X_u=1\), the integral would be \(\int_0^1(1-1)\,du=0\); the residual mean would then be \(0\) and its variance would remain \(1\). The parameter error changes the mean here, not the noise variance. In a filter that estimates the state from the observations, the state error may evolve in response to the data, so the mean must be calculated from the full residual decomposition rather than assumed equal to a simple offset term.

Using Residuals Responsibly

For observations at times \(0=t_0<t_1<\cdots<t_n\), compute each residual by subtracting the integral of the filter’s predicted observation drift over that interval. Under the correct model, its predicted mean is zero and its variance is \(R(t_k-t_{k-1})\). Standardize by the square root of that variance before comparing residuals from intervals of different lengths. If the model predicts correlated observation noise or a different observation structure, the appropriate covariance prediction must replace this scalar formula.

Residual whiteness means zero covariance between distinct increments in the model’s prediction. In the linear Gaussian setting here, the exact innovations are Gaussian, so zero covariance across disjoint increments accompanies independence. For non-Gaussian residuals, zero covariance alone does not imply independence. Also, a sample autocorrelation close to zero is not proof of independence, and a nonzero sample autocorrelation can occur by chance in a finite sample.

A useful diagnostic sequence is to examine the residual mean, scale, and temporal pattern separately. A stable mean shift is consistent with bias, but can also arise from a persistent state-prediction error. A scale mismatch can indicate incorrect observation-noise variance, but state uncertainty must be included before assigning that cause. Serial structure can indicate missed dynamics, delayed observations, or an inadequate noise model. These checks identify tensions between data and model; they do not by themselves identify a unique cause.

Common mistake. It is wrong to say that an omitted offset \(b\) makes every residual mean exactly \(bh\), without qualification. The correct mean is \(bh+\mathbb{E}[\int_s^t H(X_u-m_u)\,du]\); only when that integrated state-error term has mean zero does the simpler answer follow. It is also wrong to call \(Rh\) the full residual variance under noise misspecification when state error remains. That is the variance of the noise component; the full variance requires the state-error variance and covariance terms, unless the state contribution is known exactly.

Check Your Understanding

Use the residual decomposition and state each assumption needed for your conclusion.

  1. Under the correctly specified model, what are the conditional mean and variance of an innovation residual on \([s,t]\)?
  2. If an observation offset \(b\) is omitted, write the full residual mean when the state estimate may also be biased.
  3. With known state contribution, actual noise variance rate \(R=16\), filter variance rate \(\widehat R=4\), and interval length \(h=\tfrac12\), find the actual residual variance and the variance after standardizing with the filter’s predicted scale.
  4. Why does zero covariance between residual increments not always establish their independence?
  5. If a residual has a nonzero mean, name two distinct sources that could contribute to it.