Combining Measurements With Different Reliability
Two thermometers disagree. Their known error variances tell us how strongly each reading should influence a shared estimate.
13 sections · 4 questions · 2 coding challenges
The arrow keys move between sections too.
Following a Quantity Through Noisy Measurements
BOTIE
Our thermometers isolate the measurement-combination step. The full Kalman filter also predicts how the state and its uncertainty change over time; averaging simultaneous readings alone is not that complete algorithm.
Sources for this history
Which Thermometer Should Botie Trust More?
Two thermometers read the same room at the same time. One is much noisier than the other. Simply averaging them gives both the same influence, even though they do not carry the same information.
How much more influence should the quieter thermometer have? We can derive a weighting rule if the errors are independent and Gaussian, have no bias, and have known positive variances. Under those assumptions, a smaller error variance gives a reading more weight. Its reciprocal is called precision. We will use it to work out the contribution of each thermometer.
The measurement variances are supplied and the instrument errors are assumed independent.
Step 1 of 4
Read both instruments
The example variances describe measurement errors, not the temperatures.
| Instrument | Readings | Variances |
|---|---|---|
| Instrument A | 20 | 1 |
| Instrument B | 24 | 4 |
Instrument A
- Readings
- 20
- Variances
- 1
Instrument B
- Readings
- 24
- Variances
- 4
Step 2 of 4
Convert variance to precision
A larger error variance gives a smaller weight.
| Instrument | Precisions | Normalised weights |
|---|---|---|
| Instrument A | 1 | 0.8 |
| Instrument B | 0.25 | 0.2 |
Instrument A
- Precisions
- 1
- Normalised weights
- 0.8
Instrument B
- Precisions
- 0.25
- Normalised weights
- 0.2
Step 3 of 4
Combine evidence
The more precise instrument pulls the estimate closer to its reading.
Estimate = (0.8 × 20) + (0.2 × 24) = 20.8 Combined variance = 1 / (1 + 0.25) = 0.8
Step 4 of 4
Two readings can share the same error
If both instruments respond to the same disturbance, their errors are related. Treating them as independent would count some evidence twice. We need that dependence before interpreting the reduced variance as a reliable uncertainty estimate.
| Measurement situation | What the second reading adds |
|---|---|
| Independent instrument errors | Another independent piece of evidence |
| A shared disturbance | Some information already present in the first reading |
Independent instrument errors
- What the second reading adds
- Another independent piece of evidence
A shared disturbance
- What the second reading adds
- Some information already present in the first reading
Precision expresses how much independent evidence a reading supplies
Independent measurements contribute in proportion to their precision.
Which thermometer should influence the estimate more?
Two thermometers disagree, but one may be much noisier. Change an instrument's variance and watch its influence on the combined temperature.
BOTIE
Precision-weighted temperature estimate
20.8
Follow the operations
1. Temperature readings
- 020
- 124
2. Positive error variances
- 01
- 14
3. Take positive reciprocals
- 01
- 10.25
4. Dot product
26
5. Add a list
1.25
6. Divide
20.8
7. Result
20.8
Requires common units, positive known variances, unbiased readings, and independent errors.
1. Separate Error Size From Measurement Value
A reading is an observed temperature. Its error variance describes the spread of repeated measurement errors around the true temperature. A high temperature is not automatically a noisy temperature.
We assume both thermometers measure the same quantity in the same units and have zero average error. Calibration bias is not repaired by pretending it is independent random noise.
The known-variance assumption lets us study weighting before estimating reliability from data.
2. Use Precision as the Weight
Precision is the reciprocal of variance. Add the precisions to measure the combined information, then divide each precision by their total to obtain weights summing to one.
Variances = [1, 4]
Precisions = [1, 0.25]
Weights = [0.8, 0.2]
Estimate = 20 × 0.8 + 24 × 0.2 = 20.8Doubling a variance reduces its precision; it does not double its influence.
3. Carry the Remaining Uncertainty
The variance of the combined estimate is the reciprocal of total precision for independent Gaussian errors. It is smaller than either individual variance, because both readings supply independent information.
Equal variances give the ordinary mean. A very noisy instrument contributes little, while a zero variance would claim perfect information and needs separate treatment rather than division by zero.
Combined variance = 1 / (1 + 0.25) = 0.8This is uncertainty about the common temperature under the stated error model.
Start with two equally reliable thermometers
The instruments report different temperatures but have the same known variance. Calculate their precision weights before combining the readings.
import numpy as np
readings = np.array([18., 22.])
variances = np.array([4., 4.])
precision = 1.0 / variances
weights = precision / precision.sum()
print(weights.tolist())
print(float(weights @ readings))
print(float(1.0 / precision.sum()))[0.5, 0.5]
20.0
2.0Equal variances give equal influence. Under independent errors, the combined variance is smaller than either instrument's variance. The challenge then gives the instruments different reliabilities.
4. Ask Whether the Errors Are Independent
Two instruments can share a power supply problem or calibration mistake. Their agreement then does not provide two independent confirmations. A full covariance model is needed when errors are correlated.
Check residuals against a reference instrument, inspect bias, and avoid fitting error variances using the same tiny sample you want to evaluate. An impressively narrow interval can be misleading if the model assumptions are wrong.
Botie’s workshop exposes each precision so the weighting remains visible.
5. Independent Evidence Earns Additional Precision
Two independent noisy readings of the same quantity can reduce uncertainty. A reading with smaller variance contributes more precision and therefore more weight. The combined variance is smaller because we have added independent information.
The variances must describe uncertainty in comparable units. A sensor's short-term repeatability is not necessarily its total measurement error if it also has an unknown calibration offset.
Fuse a precise reading with a noisy one
Both thermometers are assumed unbiased and independent for this calculation.
import numpy as np
reading = np.array([20., 24.])
variance = np.array([1., 9.])
precision = 1/variance
mean = (precision@reading)/precision.sum()
combined_variance = 1/precision.sum()
print(round(float(mean), 3))
print(round(float(combined_variance), 3))20.4
0.9The noisier reading moves the estimate only modestly. We give it less influence because its variance says that it is a less precise measurement.
6. Copying One Thermometer Does Not Give Us Two Thermometers
If both displayed readings come from the same instrument, their errors can move together. Treating them as independent would count the same information twice and report unjustified precision.
For equal-variance readings, the variance of their average includes their covariance. As correlation approaches one, averaging offers almost no reduction. Independence is therefore a substantive assumption about the sensors, not a convenient detail of the formula.
Var((X + Y)/2) = (Var(X) + Var(Y) + 2 Cov(X,Y)) / 4
Equal variance σ² and correlation ρ:
Var(average) = σ²(1 + ρ)/27. Shared Bias Survives Averaging
Two thermometers can agree closely because both were calibrated against the same incorrect reference. Averaging reduces certain random errors; it does not automatically remove a shared offset.
Compare against an independent reference when possible, retain calibration records and inspect disagreement over time. If the readings differ far more than their stated uncertainties predict, investigate the assumptions before producing a confident combined estimate.
Check yourself
Questions on Parts 1 to 7
Question 1 of 4
Which has greater precision?
Use the information below.
Two unbiased independent sensors have variances 1 and 4.Try it with Botie
Build with Botie
Write and run Python