Minimize squared relative error
Suppose you have a list of positive data points y1, y2, ..., yn and you wanted to find a value that minimizes the squared distances to each of the ys.
Then the solution is to take to be the mean of the ys:
This result is well known [1]. The following variation is not well known.
Suppose now that you want to choose to minimize the squared relative distances to each of the ys. That is, you want to minimize the following.
The value of alpha this expression is the contraharmonic mean of the ys [2].
[1] Aristotle says in the Nichomachean Ethics The mean is in a sense an extreme." This is literally true: the mean minimizes the sum of the squared errors.
[2] E. F. Beckenbach. A Class of Mean Value Functions. The American Mathematical Monthly. Vol. 57, No. 1 (Jan., 1950), pp. 1-6
The post Minimize squared relative error first appeared on John D. Cook.