# Variance-weighted interpolation

I am trying to fit a function $f$ to the data pictured below:

For $\hat{f}(0)$ I can take the sample mean of the 6 observations at $0$, for $\hat{f}(2)$, I average the 2 at 2.

For $\hat{f}(1)$, I don't have any observations. OLS will give me

$$\hat{f}(1) = \frac{\hat{f}(0) + \hat{f}(2)}{2}$$

Instead, I'd like a weighted average, where $\hat{f}(0)$ is given more weight, because I trust it more.

How can this idea be formulated in terms of a probabilistic model/loss function? I'm sure this problem has been studied extensively.

• -> are you asking for the probabilistic model/loss function that has this estimator as the optimal estimator, or are you asking for a common loss function used by statisticians in this-or similar-context? – Lucas Roberts Jul 27 '17 at 14:05
• Work out the full OLS solution--you might begin with the $8\times 2$ design matrix--to obtain the answer you seek. It shows that the interpolator you have written is correct, but it will also reveal how the different weights on $0$ and $2$ influence the variance of your estimate. For another solution method see stats.stackexchange.com/a/12255/919. – whuber Jul 27 '17 at 14:29
• @LucasRoberts: both, I guess, but mainly the former – user357269 Jul 27 '17 at 14:56
• @whuber: I've already worked out the full OLS solution, sorry if that wasn't clear from the post. The link you provide is very helpful, but I would like to recast this question in terms of a probabilistic model – user357269 Jul 27 '17 at 14:59
• But that's exactly what OLS does! – whuber Jul 27 '17 at 15:03