1
$\begingroup$

I have two sets of data with one (shown in red below) being considered correct. I'm trying to quantify the magnitude of the difference between the correct data (in red) and the comparison data (in green). The motivation for the comparison is to quantify the effect of making certain additional assumptions, which cause the difference seen below. My issue is if I'm just using the normal percent error formula, the calculated value goes to infinity (or negative infinity, as the case may be) as the actual data approaches zero.

$$ \%ERROR=\frac{Approximate-actual}{actual} \cdot 100 $$

Data Comparison

I should note that the fact that actual value crosses zero is mostly an artifact of the situation being analysed. In some cases, the actual result would be more like the green line and be entirely negative.

Additionally, I should also note that I also found this post here (link), which is insightful, but I don't think it's applicable in my case since I consider the green results to be significantly less reliable than the red results.

EDIT:

Ultimately, the goal of the percent error is to obtain a comparison of the distance between the actual value and the approximate value relative to the actual value. This assumes that that distance increases as the magnitude of the actual value increases. However, in my case, that isn't necessarily true. In fact, I'd guess that in most cases where both positive and negative data is present, the results are not going to be dependent on the magnitude of the actual value. However, it still necessary to have some kind of a relative comparison because it's hard to define limits to the error in absolute terms. People are much more accustomed to understanding that the error should be less than %5 or 10%.

EDIT 2:

The data being shown in the graph above is the deformation of the centerline (oriented vertically) a plate. The graph is therefore oriented the way it is because next to it, I'm showing an image of the deformed plate from the simulation.

$\endgroup$
8
  • 2
    $\begingroup$ I would start with the difference here. It has none of the disadvantages of your measure and further advantages: it is simpler and easier to think about. You've suppressed all information about what the variables are, but absent a strong rationale for doing otherwise I would plot with axes the other way round. Also, I have to point out that difficulty distinguishing red and green is a common characteristic. (Let me guess: matplotlib?) I don't think that information outside the graph on what is reliable changes the advice: the difference between the curves is hints rather at bias somewhere. $\endgroup$
    – Nick Cox
    Commented Dec 11, 2019 at 20:22
  • $\begingroup$ Yes, but it does not capture the relative nature that the percent error captures. Specifically, the significance of the error is dependent to some extent on the magnitude. I will add some additional info about the data being shown. Thanks for pointing out the color issue. I was feeling festive and chose those colors because of that, but we do have a guy on our team who is color blind, so he may have difficulty with this. (Excel, BTW) $\endgroup$
    – tlewis3348
    Commented Dec 12, 2019 at 13:09
  • 1
    $\begingroup$ We're going round in a circle. Relative difference is somewhere between ill-defined and nonsensical if the denominator can ever be zero, and it can be here. So, that won't work unless you choose some fudge such as $|x - y| / (1 + |y|)$. To my eye the difference between curves is constant to a good approximation and to the extent that is not true plotting difference versus reference may give most of the possible insights. This is a genuine but easy to explain problem; why make it more difficult by trying to capture variability in an indirect manner? $\endgroup$
    – Nick Cox
    Commented Dec 12, 2019 at 13:22
  • $\begingroup$ Maybe true. Thanks for the input. $\endgroup$
    – tlewis3348
    Commented Dec 12, 2019 at 13:39
  • $\begingroup$ An intersecting issue is how far the origin is natural or conventional. $\endgroup$
    – Nick Cox
    Commented Dec 12, 2019 at 13:41

1 Answer 1

0
$\begingroup$

One approach that is supported for the expected value being zero and gives you an absolute difference would be:

$$ \%\text{err} = \log \frac {e^x}{e^{E[x]}} = \log(e^{x-E[x]}) $$

$\endgroup$
2
  • $\begingroup$ Could you provide definitions for what $x$ and $E[x]$ are? $\endgroup$
    – tlewis3348
    Commented Dec 13, 2019 at 14:05
  • 1
    $\begingroup$ $x$ is the approximated, observed value, $E[x]$ is the expected 'true' value. $\endgroup$
    – jkm
    Commented Dec 13, 2019 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.