The Error: A weather station averages 3 temperature sensors (DS18B20) expecting ±0.5°C accuracy. Instead, all 3 sensors report 22.1°C when actual temperature is 24.8°C - averaging gives 22.1°C (2.7°C error, worse than ±0.5°C spec).
Why Averaging Failed: All 3 sensors had correlated errors: - Mounted on same PCB → shared heat source from nearby voltage regulator (adds +2°C bias to all 3) - Same batch/manufacturing run → same calibration offset (-0.7°C for this batch) - Same environmental exposure → all affected equally by solar radiation heating the enclosure
The Math of Correlated vs Uncorrelated Errors:
Uncorrelated errors (ideal case):
- Sensor 1: μ + ε₁ where ε₁ ~ N(0, σ²)
- Sensor 2: μ + ε₂ where ε₂ ~ N(0, σ²)
- Sensor 3: μ + ε₃ where ε₃ ~ N(0, σ²)
- Average: (μ + ε₁ + ε₂ + ε₃) / 3
- Error variance: σ² / 3 (1.7x improvement, or 1/√3 standard deviation)
Correlated errors (actual case):
- All sensors: μ + bias + εᵢ where bias = -2.7°C (shared)
- Average: μ + bias + (ε₁ + ε₂ + ε₃)/3
- Random noise variance drops to σ²/3, but bias remains fully intact
- The dominant error (2.7°C bias) is unchanged — averaging only helps with the small random component
Correct Approach - Sensor Diversity:
Instead of 3x DS18B20, use: 1. DS18B20 (digital, 1-Wire) 2. Thermistor (analog, resistance-based) 3. Thermocouple (differential voltage)
These have: - Different physics (electronics vs resistance vs Seebeck effect) - Different error sources (calibration curves, non-linearity, cold-junction) - Independent biases → averaging DOES reduce error
Results After Fix:
- 3x DS18B20 averaged: 2.7°C error (shared bias)
- 3 diverse sensors averaged: 0.4°C error (biases cancel)
Key Lesson:
- N identical sensors: Only reduces random noise by √N, does NOT reduce systematic bias
- N diverse sensors: Reduces both noise and bias (different biases partially cancel)
- Diversity beats quantity: 3 different sensor types > 10 identical sensors
How to Check for Correlation:
- Measure sensor outputs when truth is known (ice bath = 0°C, boiling water = 100°C)
- If all sensors report same error direction (all too high or all too low), they are correlated
- If sensors report errors in random directions, they are uncorrelated → averaging helps