Function that best predicts the value of a variable given two other random variables from normal distribution I'm struggling with a problem that says I need to find a function $f$ that best predicts the value of a variable $Z$ given two other random variables $A$ and $B$ from normal distributions with standard deviations $x$ and $y$ each centered at $Z$.
The question doesn't define what "best" means, but I've defined it as the function whose distribution gives the lowest mean difference from the actual temperature.
Some observations I've come up with is that if $x$ or $y$ are $0$, then we should give infinite weight to their corresponding variable. Also, if the problem was broken down to one variable, the answer would clearly just be $A$. Another observation is that if $x = y$, then the function would be $(A + B)/2$.
A guess that I've come up with that fits these observations is $f = \frac{\frac{A}{x} + \frac{B}{y}}{x+y}$. The function gives less weight to the variable with a higher standard deviation. How can I systematically come up with and test these guesses and how to come up with the best one. Thanks.
 A: Use maximum likelihood:
$$p(\mu | x_1, x_2) = \frac{p(x_1, x_2|\mu) p(\mu)}{p(x_1, x_2)} = \frac{p(x_1|\mu) p(x_2| \mu) p(\mu)}{p(x_1, x_2)}$$
where
$$p(x_i|\mu) = \frac{e^{-(x_i - \mu)^2/(2 \sigma_i^2)}}{\sqrt{2 \pi }\sigma_i}$$
for $i = 1,2$.  Assume that $p(\mu)$--the prior probability that the mean is a given value--is uniformly distributed (i.e., set it to some constant independent of $\mu$).  Of course, $p(x_1, x_2)$ is the probability of finding both $x_1$ and $x_2$ in a random sample.
Take the derivative with respect to $\mu$, set it to zero, and solve for the symmetric function of $x_1$ and $x_2$. 
A: Any weighted average of $A$ and $B$ (for example $0.8A + 0.2B)$ has expected value $Z.$ Often one seeks the weighted average with the smallest standard deviation, or equivalently, with the smallest variance. Let the weights be $w$ and $1-w.$ Assuming $A,B$ are independent (which you didn't state), the variance is
\begin{align}
& \operatorname{var}(wA + (1-w)B) \\[8pt]
= {} & w^2\operatorname{var} (A) + (1-w)^2\operatorname{var}(B) \\[8pt]
= {} & w^2x^2 + (1-w)^2 y^2.
\end{align}
The values of $w$ and $1-w$ that minimize this are
\begin{align}
w & = \frac{1/x^2}{(1/x^2) + (1/y^2)} \\[8pt]
& = \frac{y^2}{y^2 + x^2}, \\[8pt]
1-w & = \frac{x^2}{y^2+x^2}.
\end{align}
The weights are proportional to the reciprocals of the variances.
