<s>[INST] Normal Distribution Puzzle/Riddle Some time in the future, a lottery takes place, with winning number N. 3 of your friends from the future, John, Joe, and James, provide you with guesses on the number N.
John's guess a is randomly selected from a gaussian distribution centered at N with stdev x;
Joe's guess b is randomly selected from a gaussian distribution centered at N with stdev y;
James' guess c is randomly selected from a gaussian distribution centered at N with stdev z;
Given the values of a, x, b, y, c, z, what would be the best guess of N? Also define what "best" is.
 [/INST] You can calculate and maximize the likelihood of N given a,b,c, with x,y,z being fixed. 
The Likelihood of a value of N (the probability of sampling a,b,c given that the mean is N) is: 
$LL_{a,b,c}(N) = Pr(a | x,N) \cdot Pr(b | y,N) \cdot Pr(c | z,N)$ 
With the distributions being independent and Gaussian, this is 
$LL_{a,b,x}(N) = \frac{1}{x\sqrt{2\pi}} e^{-\frac{(a-N)^2}{2x^2}} \cdot \frac{1}{y\sqrt{2\pi}} e^{-\frac{(b-N)^2}{2y^2}} \cdot 
\frac{1}{z\sqrt{2\pi}} e^{-\frac{(c-N)^2}{2z^2}} = $
$\frac{1}{xyz(\sqrt{2\pi})^3} e^{-\frac{1}{2}(\frac{(a-N)^2}{x^2}  +\frac{(b-N)^2}{y^2}+\frac{(c-N)^2}{z^2})}$ 
And we want to find the N that maximizes this likelihood. To find the maximum, we will search for a point where the derivative of the likelihood equals zero. 
$\frac{d}{dN}LL_{a,b,c}(N) = \frac{1}{xyz(\sqrt{2\pi})^3}\cdot -\frac{1}{2}(\frac{2(a-N)}{x^2} + \frac{2(b-N) }{y^2}+ \frac{2(c-N)}{z^2}) e^{-\frac{1}{2}(\frac{(a-N)^2}{x^2}  +\frac{(b-N)^2}{y^2}+\frac{(c-N)^2}{z^2})}$
This equals zero if and only if 
$\frac{2(a-N)}{x^2} + \frac{2(b-N) }{y^2}+ \frac{2(c-N)}{z^2} = 0$ 
So we get that 
$y^2z^2a - y^2z^2N + x^2 z^2 b- x^2 z^2 N +  x^2 y^2 c-x^2 y^2 N = 0$ 
$N = \frac{y^2z^2a+ x^2z^2b + x^2y^2c}{y^2z^2 + x^2z^2 + x^2y^2}$ 
Is the maximum likelihood estimate. 
</s>