Author-reviewedEvidence: highv1.0.0

Kalman Filter

A recursive estimator that predicts an evolving latent state and updates that estimate and its uncertainty when a new noisy measurement arrives.

Status
Published, version 1.0.0
Last reviewed
24 Sep 2026, by Dr Darrin Baines
Report a problem
Tell us if something is wrong or out of date

Concept Architecture

Kalman Filter: Concept Architecture

Estimate an evolving state from noisy observations

The Kalman filter is a recursive method for estimating an unobserved, changing state from measurements that contain noise. At each time point it first predicts the state using a model of how it evolves, then adjusts that prediction when a new observation arrives. It carries forward both an estimate and its uncertainty. Under a correctly specified linear Gaussian state-space model, the resulting filtered state distribution is the exact conditional distribution given observations available through that time.

The state might represent an underlying disease-severity trajectory, a latent biomarker level, a service-demand trend, or a changing economic parameter. A filter does not discover such a state without a model: its interpretation depends on the transition and measurement equations, their noise assumptions, and the observation times. Filtering uses current and past data; smoothing uses later observations to revise an earlier state and is therefore a different task.

Specify the state and measurement equations

For a state vector xtx_t and observation vector yty_t at time tt, a linear model can be written as:

xt=Atxt−1+Btut+wt,yt=Htxt+vt.x_t=A_tx_{t-1}+B_tu_t+w_t,\qquad y_t=H_tx_t+v_t.

Here AtA_t describes how the latent state changes, utu_t is an observed input such as an intervention and BtB_t its influence, and HtH_t maps the state to measured outcomes. The process disturbance wtw_t has mean zero and covariance QtQ_t; the measurement disturbance vtv_t has mean zero and covariance RtR_t. The standard formulation assumes appropriately independent disturbances across time and between the two equations, together with a specified initial state distribution. Dimensions must align: if xtx_t has pp components and yty_t has mm, AtA_t is p×pp\times p, HtH_t is m×pm\times p, QtQ_t is p×pp\times p, and RtR_t is m×mm\times m. Covariance matrices must be valid, and the observations must mean what the measurement equation says they mean.

For an exact Gaussian interpretation, the initial state and noise terms are jointly Gaussian under the stated independence structure. Without Gaussianity, the conventional linear filter can still be understood as a best linear mean-square estimator under appropriate second-moment conditions, but its reported Gaussian distribution or likelihood may no longer be exact. A linear Kalman filter is not automatically appropriate for counts, bounded utilities, discrete disease states, or strongly nonlinear response curves.

Predict before looking at the new measurement

Let mt−1∣t−1m_{t-1\mid t-1} and Pt−1∣t−1P_{t-1\mid t-1} be the state mean and covariance after processing observations through t−1t-1. The one-step prediction is:

mt∣t−1=Atmt−1∣t−1+Btut,Pt∣t−1=AtPt−1∣t−1AtT+Qt.m_{t\mid t-1}=A_tm_{t-1\mid t-1}+B_tu_t,\qquad P_{t\mid t-1}=A_tP_{t-1\mid t-1}A_t^{\mathrm{T}}+Q_t.

The predicted covariance increases by QtQ_t because the evolving state has process uncertainty in addition to uncertainty carried from the last estimate. A high value of QtQ_t lets the state move more freely; a low value implies a relatively predictable transition. Process variance is not interchangeable with observation variance: one describes real evolution not explained by the transition equation, the other describes noise in measuring the current state.

When a new observation is unavailable, the filter can propagate this prediction without a measurement update. Its uncertainty often grows while data are absent. Missingness that depends on unobserved clinical deterioration can invalidate a simple analysis that treats missing observations as ignorable, even though the recursion itself can skip a measurement.

Correct the prediction with the innovation

When yty_t arrives, compare it with the measurement predicted from the state. The innovation ete_t, innovation covariance StS_t, and Kalman gain KtK_t are:

et=yt−Htmt∣t−1,St=HtPt∣t−1HtT+Rt,Kt=Pt∣t−1HtTSt−1.e_t=y_t-H_tm_{t\mid t-1},\qquad S_t=H_tP_{t\mid t-1}H_t^{\mathrm{T}}+R_t,\qquad K_t=P_{t\mid t-1}H_t^{\mathrm{T}}S_t^{-1}.

The update is:

mt∣t=mt∣t−1+Ktet,Pt∣t=(I−KtHt)Pt∣t−1.m_{t\mid t}=m_{t\mid t-1}+K_te_t,\qquad P_{t\mid t}=(I-K_tH_t)P_{t\mid t-1}.

The gain balances model prediction against the measurement according to their uncertainties. In the scalar case with direct measurement, a more precise observation (smaller RtR_t) receives greater weight; a noisier observation receives less. For multidimensional states, KtK_t is a matrix, and correlations between components matter. The simple covariance formula above is exact algebraically under the model; implementations may use a numerically more robust equivalent, often called the Joseph form, to better preserve symmetry and nonnegative covariance under finite precision.

Do not compute a general matrix inverse explicitly when solving for KtK_t in a numerical implementation. Use a suitable linear system solve or factorization and check whether StS_t is well-conditioned. Model parameters such as At,Qt,Ht,RtA_t,Q_t,H_t,R_t are usually specified or estimated separately; the filter equations alone do not determine them from one observation.

Work a one-dimensional update

Suppose the previous estimate of an unobserved level is 10 with variance 4. For a one-step random-walk transition, set A=H=1A=H=1, no input, process variance Q=1Q=1, and measurement variance R=4R=4. The predicted mean remains 10, and predicted variance is 4+1=54+1=5. A new measurement is 12, giving innovation 2, innovation variance 5+4=95+4=9, and gain K=5/9K=5/9.

The corrected mean and variance are:

mt∣t=10+59(12−10)=1009≈11.11,Pt∣t=(1−59)5=209≈2.22.m_{t\mid t}=10+\frac{5}{9}(12-10)=\frac{100}{9}\approx11.11,\qquad P_{t\mid t}=\left(1-\frac{5}{9}\right)5=\frac{20}{9}\approx2.22.

The estimate moves from 10 toward 12 but does not simply become the new reading, since that reading is noisy. Under this model the updated variance is smaller than the predicted variance of 5 because the measurement adds information. The standard deviation is approximately 20/9≈1.49\sqrt{20/9}\approx1.49 in the state's units; variance 2.22 is not a standard deviation. The figures are illustrative, and their meaning depends on a well-calibrated choice of QQ and RR.

If the observation were missing, the time-tt estimate would stay at the predicted 10 with variance 5. If measurements became much more precise relative to process uncertainty, the gain would rise. If the state changed unexpectedly but QQ were fixed too low, the filter might respond too slowly and provide overconfident estimates.

Fit, check, and extend the model

Choose an initial mean and covariance, specify observation timing and any known inputs, and estimate or justify transition and noise parameters. Innovations should be examined for systematic bias, remaining serial correlation, and miscalibrated variability under the model. Check whether estimates or forecasts change substantially under plausible QQ, RR, initial conditions, structural alternatives, and missing-data assumptions. In a fitted state-space model, the sequence of innovation distributions supports likelihood-based parameter estimation; fitting and validating on the same data can still overstate prospective predictive performance.

Filtering answers what could be inferred at time tt from data then available. Fixed-interval smoothing conditions the earlier state on the entire observed sequence; it can improve retrospective reconstruction but would leak future measurements if presented as a real-time prediction. Forecasting extends the state transition forward beyond the last observation, usually with growing uncertainty. Keep these outputs labeled separately, especially in a clinical decision tool.

For nonlinear transitions or measurement functions, an extended Kalman filter linearizes locally and an unscented filter approximates propagated uncertainty by selected points; neither is an exact solution to every nonlinear model. Particle filtering can represent broader, possibly non-Gaussian state distributions at greater computational cost. Model choice should follow the data-generating mechanism and decision question, not merely the availability of an algorithm.

Use with care in health economics

Longitudinal health data often include irregular visits, measurement error, missing measurements, treatment changes, and latent disease progression. A suitable state-space model may estimate a continuous trajectory that feeds risk, resource-use, or outcome predictions in an economic analysis. A filtered estimate at a visit is conditional on observations through that visit and on the model; it should not be mistaken for a directly observed clinical state or for a future treatment effect.

A cohort Markov model commonly uses discrete health states and transition probabilities, whereas the basic Kalman filter above uses a continuous Gaussian latent state with linear dynamics. Both can have a Markov property, but the filter does not supply a valid disease transition matrix or a cost-effectiveness result by itself. If filtered states inform future event probabilities, costs, or QALYs, validate that mapping, propagate parameter and state uncertainty, and avoid using smoothed future information in decisions that would have been made earlier.

Report state and observation definitions, time interval, At,Bt,Ht,Qt,RtA_t,B_t,H_t,Q_t,R_t, initial distribution, parameter estimation, handling of missing and irregular data, diagnostics, and whether results are predicted, filtered, or smoothed. Interpret the gain and uncertainty in the units of the actual health or economic measurement. A credible application makes its assumptions and prospective use explicit.

Sources and further reading

Library

Publications

1
  • BookFeatured

    Decision Modelling for Health Economic Evaluation — Briggs, Claxton & Sculpher, 1st Edition ed., 2006 (Oxford University Press)

    Foundational textbook on decision-analytic modelling for economic evaluation, covering decision trees, Markov models, handling parameter and structural uncertainty, probabilistic sensitivity analysis, and value of information. Volume 1 in the Handbooks in Health Economic Evaluation series.

Frequently Asked Questions (6)

  • What is a Kalman filter?

    A recursive algorithm estimating a dynamic system's unknown state over time by combining noisy observations with a model of how the system evolves.

    Source: Kalman 1960

  • What problem does a Kalman filter solve?

    A Kalman filter estimates the changing state of a system that cannot be observed directly, using measurements that are noisy and incomplete. It combines two sources of information, a prediction of where the system should be from a model of how it evolves, and the latest imperfect measurement, weighting each by its reliability to form a better estimate than either alone. This lets it track a quantity through time despite uncertainty in both the model and the data. Kalman (1960) introduced the method.

    Source: Kalman 1960

  • How does a Kalman filter work?

    A Kalman filter works in two repeating steps. In the prediction step, it uses a model of the system's dynamics to project the current state estimate and its uncertainty forward to the next time. In the update step, it combines this prediction with the new observation, weighting each by its uncertainty, to produce a refined estimate with reduced uncertainty. This predict-and-update cycle, applied recursively as observations arrive, tracks the evolving state, giving an estimate that balances the model and the measurements.

    Source: Kalman 1960

  • Why is the Kalman filter recursive?

    The Kalman filter is recursive because it updates its estimate using only the current state estimate and the latest observation, rather than reprocessing all past data at each step. This makes it efficient, since it does not need to store or revisit the entire history, and suitable for real-time estimation as observations arrive continuously. The recursive structure carries forward a summary of past information in the current estimate and its uncertainty, so each new observation refines the estimate incrementally.

    Source: Press et al. 2007

  • What are the assumptions of the Kalman filter?

    The standard Kalman filter assumes the system dynamics and the relationship between state and observations are linear, and that the process and measurement noise are normally distributed with known variances. Under these assumptions, it produces the optimal estimate in a least-squares sense. Where the system is non-linear, extensions such as the extended or unscented Kalman filter are used to approximate the filter, since the linear assumptions no longer hold, so the basic filter is exact only for linear, Gaussian systems.

    Source: Kalman 1960

  • Where is the Kalman filter used?

    The Kalman filter is used to estimate and track the changing state of systems from noisy measurements in fields such as navigation, control, signal processing, and economics. In health and epidemiology, it can be applied to estimate evolving quantities, such as the state of an epidemic or a physiological signal, from imperfect observations over time. Wherever a dynamic quantity must be inferred from a sequence of noisy measurements combined with a model of its evolution, the Kalman filter provides a systematic estimation method.

    Source: Press et al. 2007

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 24 Sep 2026

Content version: 1.0.0

Canonical Identity

Term code
HE-EM-MP-021
Wikidata
Q846780

Stable URI · Machine-readable · Resolvable · CC BY 4.0