4

I frequently use this formula to compare two positive numbers $x$ and $y$ to see if they are "more different" than some threshold:

$$ x-y \over \max(x,y) $$

It is nice because it is symmetric and bounded to $[-1,1]$ (unlike relative percent difference). I call it a "symmetric percent difference." I see a similar formula on this Wikipedia page, apparently generalized to negative or positive numbers, but it's not named:

$$ |x-y| \over \max(|x|,|y|) $$

Does anyone know the official name for this function?

Note: Another similar function, bounded to $[0,1]$, is used to calculate sMAPE:

$$ |x-y| \over x+y $$

J. Miller
  • 205
  • What would make a name 'official'? – Glen_b Nov 06 '13 at 01:06
  • I'd be happy with a citation of any named usage, bonus if it's a scholarly article or textbook. But possibly the formula is not used frequently enough to be named. – J. Miller Nov 06 '13 at 01:14
  • 1
    Any? Okay, well here it's called a 'symmetric percent difference'. But that term seems to mean different things in other places. To be honest, I don't think there's going to be a widely used name for it. – Glen_b Nov 06 '13 at 02:15
  • 1
    @Glen_b, I guess then I'm an official source now :). Yes, I saw a few other things referred to by this name when I was googling around. I think the name best describes my formula though! – J. Miller Nov 08 '13 at 20:01

1 Answers1

2

The last function you mention is the coefficient of variation (standard deviation over mean) of a sample of just two values:

$$c_v = \frac {\sigma}{\mu}$$ and when we have only two values, $\sigma = |x-y|/2$ while $\mu = (x+y)/2$.

As for your function, although by not using absolute value in the numerator you hint that direction may be important to you, I expect usually subtracting the smallest from the largest value. Then, since our sample is only these two numbers essentially we have

$$\frac {\text {range}}{\max} = \frac {\max - \min}{\max} = 1- \frac {\min}{\max}$$

Now the $\frac {max}{min}$ ratio is encountered in various situations, check for example, "dynamic range" or "contrast ratio".

On a more mundane level, if $x$ is "final price"$=p_f$ and $y$ is "list price"$=p_l$, then

$$\frac {x-y} {\max(x,y)} = \frac {p_f -p_l}{p_l} $$

equals the "percentage discount" -with the negative sign to indicate the direction of revenues!

  • Yes, direction is often important. Answer accepted for drawing attention to the similarities with CV and "dynamic range". On the price-discount formula ... not apropos since it's naturally asymmetric (list price is the reference point). – J. Miller Nov 08 '13 at 20:09