I have two functions, say $f(x)$ and $g(x)$, being the first the 'observed' and the second the 'theoretical', which can be variable. What I aim to find is the $g(x)$ that best approximates to $f(x)$. Both functions are discrete, and I have 14 points in abscissa for which I can compare the value of both of them.
What I do (in Python) is calculate a simple difference of $f(x)$ and $g(x)$ for each one of this points, then I calculate the average of those (14) differences, and change my $g(x)$ model (which changes the shape of the function subtly) to see if this original $g(x)$ indeed minimizes the difference with $f(x)$.
Is there some more robust statistic to apply here? For example, $\chi^2$?
See functions whose difference is to be minimized here. Blue is $g(x)$ in this context and can be treated as a discrete function.