Geometric Mean Application: Minimising the Relative Error in Rounding a Number

35 Views Asked by At

I have it written down that if you have $a \lt c \lt b$ and $a\leq x \leq b$ and are going to round $x$ to the nearest of $a$, $b$ or $c$, if you want to minimise the maximum relative error of the rounding, you should set $c = \sqrt{ab}$. And apparently this also generalises. Is anyone able to prove this please? Thank you.

1

There are 1 best solutions below

0
On

I think I cracked this one. The maximum relative error is going to occur when $x=\frac{a+c}{2}$ or $x=\frac{b+c}{2}$.

The relative error here will be $\frac{\frac{a+c}{2}-a}{\frac{a+c}{2}}=\frac{c-a}{a+c}$ and $\frac{b-\frac{b+c}{2}}{\frac{b+c}{2}}=\frac{b-c}{b+c}$

$\max(\frac{c-a}{a+c},\frac{b-c}{b+c})$ is minimised when $\frac{c-a}{a+c}=\frac{b-c}{b+c}$ which solves to $c=\sqrt{ab}$