In my company every f=Friday we play a game, where someone asks a question that has a numerical answer (normally they are natural integers, but can be any real number) and coworkers have to guess. The closest to the answer is the one who wins.

We have a problem in our game though, that we use an absolute difference to tell the winner. Thus if the answer is $10.000.000$, someone who answers $1$ will win vs someone who answers $20.000.000$ (as they have an absolute difference of $9.999.999$ and $10.000.000$ respectively), making it really unfair.

I have proposed to use logarithms to make it fair, and I told my coworkers to use Ln, as a convention, but then I got asked "why in base $e$ and not in base $10$?". Somehow I know it doesn't matter... The thing is that I've empirically tested it for many values, and it seems like changing the base doesn't change the ranking order, but I'd like to mathematically prove it but I have no idea where to start.

I don't even know a nice formula for that, I've tried:

$$ Log_{n}(x)-Log_{n}(k) > Log_{n}(y)-Log_{n}(k) \rightarrow \\ \forall m (Log_{m}(x)-Log_{m}(k) > Log_{m}(y)-Log_{m}(k)) $$

Where $x$ and $y$ are numbers representing answers, $k$ is a constant representing the valid answer, and $n$ is a base for the logarithm.

This is basically "If one answer wins another in base $n$, it implies that it will win for all bases $m$". But this formula is too complex for me to play with it. Do you know how can I solve it? Or maybe even the approach I'm taking is wrong?

Note: Obviously I'm doing absolute values of that when doing the ranking, but I've taken that out to make it simpler.

Edit: I made further progress but got stuck again... I remember from highschool on logarithms that:

$$ Log_{n}(x)-Log_{n}(k) = Log_{n}(\frac{x}{k}) $$

If that's true, then the original formula gets rewritten as:

$$ Log_{n}(\frac{x}{k}) > Log_{n}(\frac{y}{k}) \rightarrow \\ \forall m (Log_{m}(\frac{x}{k}) > Log_{m}(\frac{y}{k})) $$

But I'm stuck here. How can I continue?

  • 1
    $\begingroup$ (Not an answer.) Instead of working with logarithms, you can use the ratio of the mystery number and the proposed number, or conversely, whichever is the largest. The winner is the closest to $1$. $\endgroup$
    – user65203
    Apr 7 '17 at 16:52
  • 1
    $\begingroup$ I think percentage error is more appropriate than logarithms. For small numbers, logarithms give you the same issue: If the correct answer is $b^k$, then $1$ and $b^{2k}$ are the same log-distance away, in log base $b$. In the case of base $10$, this means that $100$ is closer to $9999$ than it is to $1$, which might not be desirable. Instead, I would recommend you use percent error, as given by $|guess-actual|/|actual|$. Whoever gets a score closest to $0$ is the winner. See here for more information: en.wikipedia.org/wiki/Relative_change_and_difference $\endgroup$ Apr 7 '17 at 17:04
  • $\begingroup$ Those two other approaches look very interesting. I'll take a look on them, thanks! $\endgroup$ Apr 10 '17 at 8:10

$\log_{10} x = \frac {\ln x}{\ln 10}$

So, in comparing the log of the error in the two guesses, you would just be multiplying by a constant term. If the $log_{10}$ of the error of my guess is less than the $log_{10}$ of your guess. Multiplying by a (non-negative) constant isn't going to change that.

And if error's were equal (but on opposite sides of the true value). Multiply by a constant and they are still equal.


You may recall that you can change bases $b$ and $c$ of logs with the formula

$\log_b(x) = \log_c(x) \cdot \log_b(c)$

So there is just a fixed factor if you go from one base to the other. Hence a relation like [$>$] in one base will be the same in another base, assuming that $b$ and $c$ are larger than 1.


Use the change of base formula

$log_a(x)/log_a(b) = log_b(x)$

after that you're just left with proving that multiplying by a (POSITIVE) constant does not interfere with orders, which I believe is axiomatic


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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