Error propagation without analytical expression I have an algorithm $f$ that takes two inputs $x,y$ and gives one output. I say algorithm because I don't have the analytical expression for $f(x,y)$ (it's a black box in a computer, surely a complicated non linear function of the inputs). From measurements, I have the inputs $x_o,y_o$ with their errors $\Delta x, \Delta y$. 
What is the best way to obtain the error of $f(x_o,y_o)=f_o$, to write "the result is $f_o\pm \Delta f_o$", not having the analytical expression of $f$ ?
 A: There is one way that I can think of to calculate this in a reasonably straight forward manner.  Assuming $x$ and $y$ are independent, the formula for $\sigma_f$ is given by:
$$\sigma_f = \sqrt{\left(\frac{df}{dx}\right)^2\sigma_x^2+\left(\frac{df}{dy}\right)^2\sigma_y^2}$$
You know $\sigma_x$ and $\sigma_y$, so what you are left with is to estimate $\frac{df}{dx}|_{x,y}$ and $\frac{df}{dy}|_{x,y}$.  To do this, you can input a few values like $x_0+dx,y_0$ in order to see how $f$ changes around the measured points to find $\frac{df}{dx}$.  You can do the same thing except with $x_0,y_0+dy$ to find $\frac{df}{dy}$.  Use these values in the above expression, and that will give you some estimate of the error in $f$.
A: Monte Carlo. 
I presume you have an estimated probability distribution for your uncertainties in $x$ and $y$? Or perhaps you ca assume a normal distribution with independent uncertainties given by the standard deviation $\sigma_x=\Delta x$ and $\sigma_y = \Delta y$?
If so, you can generate a long list of randomly drawn pairs $x,y$ which have mean values given by your measured $x, y$, but which  have an additive random deviate drawn from your uncertainty distributions. Then you throw these pairs into your black box and analyse the $f(x,y)$ produced. The standard deviation of the distribution of $f$ would then give you an estimate of the "error bar".
