A1124 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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 X with spread σx is measured as Y=X+N, with noise of spread σn.
  • The best linear estimate is X^=gY with gain g=σx2σx2+σn2. The curve shows g against σn; the readouts give g and the remaining error.
  • With little noise, g→1: trust the reading. With a lot, g→0: 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?

Name it

The linear MMSE estimate

To estimate X from Y with a straight line X^=a+bY, minimizing E[(X−X^)2] gives

X^=μX+Cov(X,Y)σY2(Y−μY)

with mean-square error σX2(1−ρ2), where ρ is the correlation. If X and Y are jointly Gaussian, no other function of Y does better.

A noisy measurement

For Y=X+N with X and N independent, zero mean:

X^=σx2σx2+σn2Y,error variance=σx2σn2σx2+σn2

The gain is the fraction of Y'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 σ12 and σ22 combine best with weights proportional to 1σ12 and 1σ22. The combined variance satisfies 1σ2=1σ12+1σ22: 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
  1. Gain. The quantity has variance 4 and the noise variance 1: 44+1=0.8 so X^=0.8Y.
  2. Error variance. 4×15=0.8 a standard deviation of 0.89: better than the raw reading's 1.
  3. Why shrinking helps. Shrinking toward the mean trades a little bias in each estimate for less error on average.

Answer the best estimate is X^=0.8Y, 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
  1. Error variance. σ2(1−ρ2)=σ2(1−0.81)=0.19σ2
  2. Residual spread. Take the square root: 0.19=0.44 of the original.
  3. What it means. Correlation 0.9 sounds high, but it leaves 44% of the spread unexplained; it takes ρ=0.995 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
  1. Weights. Weight each reading by one over its variance: 1/11/1+1/4=0.8 for the 1 °C reading, and 0.2 for the 2 °C one.
  2. Combined variance. 11+0.25=0.8 a spread of 0.89 °C.
  3. 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

Y=X+N, with X of spread 2 and independent noise of spread 0.5. What gain g makes X^=gY 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

X has mean 20, Y has mean 18 and variance 9, and their covariance is 6. Y is observed to be 18+2.

(a)

What is the slope b of the best linear estimate?

(b)

What is the estimate of X?

Check

Y=X+N, with X of variance a and independent noise of variance b.

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°.

Check

Draw X with spread 2 and independent noise N with spread 1, 10⁵ samples each (np.random.default_rng(2)), and form Y=X+N. Set g_data to Cov(X,Y)Var(Y) from the samples, and err to the RMS of X−gdataY.

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?

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.