I have 3 numbers that physically must add up to zero. Unfortunately, each is obtained from a noisy measurement and they don't add up exactly. Assuming the noise is Gaussian and given 3 corresponding standard deviations (one for each number), what is the correct way to change the numbers so that they add up correctly? It seems like the number with the smallest stdev should be moved least, etc...
It feels like a least squares problem, and I think I can do this with an optimizer like Nelder Mead or something, but a closed form solution would be very welcome.