A11 · Lesson 24 · Estimation from correlated data
The best guess of X from a noisy Y
A sensor reading is the true value plus noise; a temperature at one point is correlated with the temperature at another. When two random quantities are related, observing one tells you something about the other, and probability says exactly how much. The minimum mean-square-error estimate is the guess whose squared error is smallest on average. For jointly Gaussian quantities it's a straight line through the data, and it explains three everyday engineering moves: shrinking a noisy reading toward its expected value, combining two sensors by weighting each by how much you trust it, and predicting one signal from a correlated one.
- A quantity with spread is measured as , with noise of spread .
- The best linear estimate is with gain . The curve shows against ; the readouts give and the remaining error.
- With little noise, : trust the reading. With a lot, : fall back on the expected value, 0.
Predict
Two sensors measure the same quantity, one with 1 °C of noise and the other with 2 °C. How should their readings be combined?
Weight it four times as heavily: weights go as , so against , normalized to 0.8 and 0.2. The combined reading has variance , a standard deviation of 0.89 °C: better than the good sensor alone. An equal average would give °C, worse than the good sensor.
Name it
The linear MMSE estimate
To estimate from with a straight line , minimizing gives
with mean-square error , where is the correlation. If and are jointly Gaussian, no other function of does better.
A noisy measurement
For with and independent, zero mean:
The gain is the fraction of 's variance that is signal. This is the scalar Wiener filter; applied frequency by frequency it becomes the Wiener filter for signals, and applied step by step in time, the Kalman filter.
Combining measurements
Two independent unbiased readings with variances and combine best with weights proportional to and . The combined variance satisfies : information adds.
Worked example
A quantity with spread 2 is measured with noise of spread 1. What is the best estimate, and how good is it?
Show the solution
- Gain. The quantity has variance 4 and the noise variance 1: so .
- Error variance. a standard deviation of 0.89: better than the raw reading's 1.
- Why shrinking helps. Shrinking toward the mean trades a little bias in each estimate for less error on average.
Answer the best estimate is , with an error standard deviation of 0.89.
Worked example
Two temperatures have correlation 0.9. How much of one's spread is left after predicting it from the other?
Show the solution
- Error variance.
- Residual spread. Take the square root: of the original.
- What it means. Correlation 0.9 sounds high, but it leaves 44% of the spread unexplained; it takes to get below 10%.
Answer 44% of the spread is left.
Worked example
Combine readings with noise 1 °C and 2 °C optimally.
Show the solution
- Weights. Weight each reading by one over its variance: for the 1 °C reading, and 0.2 for the 2 °C one.
- Combined variance. a spread of 0.89 °C.
- The noisy sensor still helps. It helps a little: it carries a fifth of the information.
Answer weight the readings 0.8 and 0.2; the combination has a spread of 0.89 °C.
Check
, with of spread 2 and independent noise of spread 0.5. What gain makes the best estimate?
Check
Two independent sensors have noise 0.5 and 2. What is the noise of their best combination?
Check
Two quantities have correlation 0.8. What fraction of one's spread remains after predicting it linearly from the other?
Check
has mean 20, has mean 18 and variance 9, and their covariance is 6. is observed to be .
(a)
What is the slope of the best linear estimate?
(b)
What is the estimate of ?
Check
, with of variance and independent noise of variance .
Step 1
What is the best gain?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is the error variance?
Check
Draw with spread 2 and independent noise with spread 1, 10⁵ samples each (np.random.default_rng(2)), and form . Set g_data to from the samples, and err to the RMS of .
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
Why does the best estimate shrink a noisy reading toward the expected value, instead of taking the reading at face value?
A reading is equally likely to be pushed up or down by noise, but itself is more likely to be near its mean than far from it. So an unusually large reading is more likely to be a moderate plus positive noise than a huge with no noise. Shrinking by the gain weighs those two explanations by how large each kind of variation typically is. Each individual estimate is biased toward the mean, but the average squared error is smaller than with the raw reading, which is the criterion that matters when the estimates feed a decision or a control loop.
Practice
Keep practicing
6 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.