Lite / Independent Engineering Research / Week 16
Inverse-variance weighting
Two sensors measure the same distance. One is twice as precise. Should you trust it twice as much? Four times? All the way?
Why should I care?
This one formula is the foundation of sensor fusion: GPS with odometry, star tracker with gyro, camera with lidar. It says how much to trust each source and promises a result better than the best single sensor, if its assumptions hold.
- Fuse two independent unbiased measurements by inverse-variance weighting.
- Derive that these weights minimise the fused variance.
- State the fused uncertainty and the conditions under which it is valid.
Predict
Sensor A has σ = 1 m, sensor B has σ = 2 m. What weight should A get in the optimal blend?
- 2/3
- 4/5
- 1/2
- 1 (ignore B)
Guess first, then reveal
Weights ∝ 1/σ²: A gets 1, B gets 1/4, so w_A = 1/(1 + 1/4) = 0.8. Twice as precise means four times the weight. The fused σ = 1/√(1.25) ≈ 0.89 m, better than A alone.
Discover
Set σ₁ = 1, σ₂ = 2. Drag your weight w from 0 to 1 and watch the lower curve: the blend's σ dips to a minimum. Find it by hand, then press 'snap' to check. Repeat with equal σ's: where is the minimum now, and what is the fused σ?
What the interactive shows (text version)
The fusion diagram plots both sensor curves, your blend and the optimal fusion, plus a curve of blend σ against weight with its minimum marked. The readout gives the optimal weight, fused value and σ, and how far your chosen weight is from optimal.
Watch (optional)
Watch for: Listen for the reasons to fuse: improving quality, increasing coverage and estimating things no single sensor measures.
Explains why robots and cars combine several imperfect sensors to get a better picture of the world.
“Understanding Sensor Fusion and Tracking, Part 1: What Is Sensor Fusion?” by MATLAB (opens YouTube; streaming video uses a lot of data)
The video is optional. Everything you need is in this lesson's text.
Understand
The recipe
x̂ = (z₁/σ₁² + z₂/σ₂²)/(1/σ₁² + 1/σ₂²) and σ_f = 1/√(1/σ₁² + 1/σ₂²). The fused value sits between the readings, closer to the more precise one; the fused σ is smaller than the smaller σ. Two equal sensors give σ/√2.
The fine print
It assumes both readings are unbiased, independent and have correctly known σ. A biased sensor drags the fused value with full confidence. Correlated errors (two cameras with the same calibration fault) give less improvement than the formula promises.
A consistency check
If the readings disagree by much more than √(σ₁² + σ₂²), something is wrong: a fault, a bias, a wrong σ. Real systems test the difference before fusing and reject outliers. In Kalman language this is innovation gating.
Explain it another way
Intuitive
A friend with sharp eyes and a friend with blurry eyes both guess the distance to a tree. You lean towards sharp-eyes, but blurry-eyes still adds a little information, so together they beat either one.
Technical
This is the minimum-variance unbiased linear estimator, and for Gaussian errors also the maximum-likelihood estimate. It is identical to the conjugate normal update with one reading as prior.
Mathematical
z₁ = 10, σ₁ = 3; z₂ = 13, σ₂ = 2: weights 1/9 and 1/4, w₁ = 4/13 ≈ 0.31. x̂ = (10/9 + 13/4)/(13/36) ≈ 12.08, σ_f = √(36/13) ≈ 1.66.
Applied
Deep-space orbit determination fuses radio range, Doppler and optical images of the target body; each pass is weighted by its accuracy, so a few very precise range points can outweigh many noisy ones.
Derivation: Why inverse-variance weights are optimal
Blend two independent unbiased readings: x̂ = w·z₁ + (1 − w)·z₂. It is unbiased for any w.
Its variance is V(w) = w²σ₁² + (1 − w)²σ₂² (no cross term, by independence).
Minimise: dV/dw = 2wσ₁² − 2(1 − w)σ₂² = 0 ⇒ w = σ₂²/(σ₁² + σ₂²) = (1/σ₁²)/(1/σ₁² + 1/σ₂²).
d²V/dw² = 2(σ₁² + σ₂²) > 0, so this is a minimum.
Substitute back: V_min = σ₁²σ₂²/(σ₁² + σ₂²), i.e. 1/σ_f² = 1/σ₁² + 1/σ₂². For n sensors, weights ∝ 1/σᵢ² and precisions add.
Worked example 1
Readings 10 (σ = 3) and 13 (σ = 2). Fuse them.
Weights 1/9 : 1/4 = 4 : 9. x̂ = (4 × 10 + 9 × 13)/13 ≈ 12.08. σ_f = 6/√13 ≈ 1.66.
Common mix-ups
Fusing with a worse sensor makes the result worse.
✓ With correct σ's and independent, unbiased errors, adding any sensor can only help (its weight shrinks as it gets worse).Twice as precise means twice the weight.
✓ Weight goes with 1/σ², so twice as precise means four times the weight.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Write a 'fuse-or-reject' rule for two range sensors: fuse if |z₁ − z₂| < 3√(σ₁² + σ₂²), otherwise flag a fault. Test it in the diagram with σ's of 1 and 2 m: what readings trigger the flag?
Reflect
Which assumption of inverse-variance weighting is hardest to check on a real rover, and why?
Write your answer on paper or in your own notes. Lite never stores what you write.