4. Statistical foundations for sensor fusion
Every fusion algorithm — from a simple weighted average to a full Kalman filter — is built on probability theory. This chapter establishes the statistical vocabulary and tools you will use throughout the rest of the course: probability distributions, Bayes' theorem, covariance matrices, correlation coefficients, and uncertainty propagation. Rather than treating these as abstract mathematics, we ground each concept in concrete sensor engineering scenarios so that when you later implement a fusion pipeline, you understand exactly what each quantity represents and why it matters.
4.1 Probability as a Sensor Model
A sensor measurement is never a single, exact number. When a temperature sensor reports 23.4 °C, the true temperature might be 23.1 °C or 23.7 °C. Probability theory gives us the language to describe this imperfection. We model a measurement z as a random variable drawn from a probability distribution conditioned on the true state x. The most common model in sensor fusion is the Gaussian (normal) distribution:
p(z | x) = N(z; x, σ²) = (1 / √(2πσ²)) · exp( −(z − x)² / (2σ²) )
Here x is the true value, and σ² is the measurement noise variance. A small σ² means the sensor is precise; a large σ² means it is noisy. This single parameter — variance — becomes the currency of trust in fusion: sensors with lower variance receive higher weight.
In practice, you estimate σ² from a calibration dataset. For example, place a sensor in a stable reference environment (say, a temperature-controlled bath at 25.0 °C), collect N = 200 readings, and compute the sample variance:
σ² = (1 / (N − 1)) · Σ (zᵢ − z̄)²
If the readings are 25.02, 24.98, 25.01, … with a sample standard deviation of 0.05 °C, then σ = 0.05 °C and σ² = 0.0025 °C². This variance value will directly feed into the fusion weights later.
4.2 Bayes' Theorem: Updating Beliefs with Evidence
Bayes' theorem is the mathematical engine of recursive sensor fusion. It tells us how to update our belief about the state x after observing a new measurement z:
p(x | z) = p(z | x) · p(x) / p(z)
In words: the posterior belief p(x | z) is proportional to the likelihood p(z | x) times the prior p(x). The denominator p(z) is a normalizing constant that ensures the posterior integrates to one.
Consider a practical example. A robot's GPS prior estimate of its position is x̂ = 100.0 m with variance σ²_prior = 4.0 m². A LiDAR-based landmark measurement gives z = 102.0 m with variance σ²_meas = 1.0 m². Assuming both distributions are Gaussian, the posterior is also Gaussian with:
σ²_post = (σ²_prior · σ²_meas) / (σ²_prior + σ²_meas)
= (4.0 · 1.0) / (4.0 + 1.0) = 0.8 m²
x̂_post = σ²_post · (x̂_prior / σ²_prior + z / σ²_meas)
= 0.8 · (100.0/4.0 + 102.0/1.0)
= 0.8 · (25.0 + 102.0) = 101.6 m
The fused estimate (101.6 m) lies between the prior (100.0 m) and the measurement (102.0 m), but closer to the measurement because the LiDAR has lower variance. The posterior variance (0.8 m²) is smaller than either input variance — fusion reduces uncertainty. This is the core promise of sensor fusion, and it follows directly from Bayes' theorem.
4.3 Covariance and Correlation
When fusing multiple variables — say, position (x, y) from a GPS and velocity (vx, vy) from an IMU — we must account for how these variables co-vary. The covariance matrix captures this:
Σ = [ σ²_x σ_xy ]
[ σ_xy σ²_y ]
The diagonal elements are variances; the off-diagonal element σ_xy is the covariance between x and y. If σ_xy > 0, x and y tend to increase together. If σ_xy = 0, they are uncorrelated (though not necessarily independent).
The correlation coefficient ρ normalizes covariance to the range [−1, 1]:
ρ_xy = σ_xy / (σ_x · σ_y)
Correlation is scale-independent, making it easier to interpret. A ρ of 0.9 indicates strong positive linear relationship; ρ = −0.7 indicates a strong negative one. In sensor fusion, correlated noise between sensors is dangerous: if two sensors share a common error source (e.g., both are affected by the same temperature drift), their errors are correlated, and naive fusion will overestimate confidence. The fusion formula must then use the full covariance matrix, not just individual variances.
4.4 Uncertainty Propagation
When you transform a noisy measurement through a function, the uncertainty transforms too. For a linear function y = a·x + b, the variance propagates as:
σ²_y = a² · σ²_x
For a nonlinear function y = f(x), we linearize around the operating point using the first derivative (the Jacobian):
σ²_y ≈ (∂f/∂x)² · σ²_x
For multivariate cases, the propagation rule becomes:
Σ_y = J · Σ_x · Jᵀ
where J is the Jacobian matrix of partial derivatives. This is the foundation of the Extended Kalman Filter (EKF), which you will encounter in later chapters.
Worked example: A distance sensor measures range r = 10.0 m with σ_r = 0.1 m. You compute Cartesian coordinates x = r·cos(θ), y = r·sin(θ) with θ = 30° (known exactly). The Jacobian with respect to r is [cos θ, sin θ]ᵀ = [0.866, 0.500]ᵀ. Then:
σ²_x = (0.866)² · (0.1)² = 0.0075 m²
σ²_y = (0.500)² · (0.1)² = 0.0025 m²
The uncertainty ellipse is elongated along the x-axis because the range error projects more strongly onto x at this angle. Understanding this anisotropy is critical when deciding which sensor to trust for which direction.
4.5 Practical Guidance: From Theory to Implementation
When building a fusion system, follow these steps to apply the statistical foundations correctly:
- Characterize each sensor's noise. Collect static calibration data and compute sample variance. Do not assume datasheet values are accurate for your specific unit and environment.
- Check for correlation. If two sensors share a power supply, mounting structure, or environmental exposure, their errors may be correlated. Compute the cross-covariance from simultaneous recordings and include it in the fusion covariance matrix.
- Propagate uncertainty through transformations. Whenever you convert units, rotate coordinate frames, or apply nonlinear functions, propagate the covariance using the Jacobian. Neglecting this step leads to overconfident estimates and filter divergence.
- Validate with consistency checks. After fusion, compute the Normalized Estimation Error Squared (NEES) or the Mahalanobis distance between the estimate and ground truth. If the NEES consistently exceeds the chi-squared bound, your covariance is underestimated — a sign that correlation or propagation errors were ignored.
4.6 Summary
Probability distributions model sensor noise; Bayes' theorem provides the update rule for combining prior knowledge with new measurements; covariance and correlation quantify relationships between variables and between sensor errors; uncertainty propagation ensures that transformations do not silently corrupt your confidence estimates. Together, these tools form the statistical backbone of every fusion algorithm you will implement in this course. In the next chapter, we will apply these foundations to the Kalman filter, where the covariance matrix becomes the central object of the recursion.