How is the accuracy with which one function fits another numerically measured?

21 Views Asked by At

The accuracy with which a line fits discrete data points can be reflected with the Pearson correlation coefficient.

But it is not always discrete data to which we try to fit a model function—for example, we frequently use truncated polynomial expansions to model complicated functions. How would the accuracy with which a function fits or aligns with another non-discrete function be measured?

I had the following idea. If I am working with a function $F(x)$ on an interval $D$ and I would like to see how well a function $g(x)$ fits it, I can look at the value of $\int_D\lvert F(x)\rvert \,\mathrm dx - \int_D\lvert g(x)\rvert\,\mathrm dx$.

1

There are 1 best solutions below

0
On

I think what you mean is $\int_D \left|F\left(x\right)-g\left(x\right)\right|dx$, because the error should be 1) always positive and 2) equal to zero if and only if $F = g$. In general, one would commonly use $\|F-g\|$ with some choice of norm. The optimal choice of $g$ will depend on the norm, however -- different error measures will cause different approximating functions to perform "better."