4
$\begingroup$

I'm encountering the following minimization problem in my research:

$$\hat b = \underset{b}{\arg\min} \sum_i^n \left( \log \frac{a_i}{b} \right)^2$$

I could iteratively optimize, but I think that there should be a closed-form solution. Intuitively I think the solution should be the geometric mean, i.e.

$$\hat b = \prod_i^n (a_i)^{\frac{1}{n}}$$

but I'm struggling to prove it to myself. Is there a good way to go about proving or disproving this? Thanks for your help.

$\endgroup$
1
  • 1
    $\begingroup$ You are minimizing the quadratic univariate function $\sum_i(\log(a_i) - \beta)^2$ where $\beta=\log(b)$. When it is written in the form $n(\beta-r)^2 + C$ for constants $r, C$, the unique minimum obviously is at $\beta=r$ because squared values are non-negative. You don't even need to do the algebra: just directly check your guess that $r = \log(\hat b)$. $\endgroup$
    – whuber
    Commented Feb 19, 2015 at 19:24

1 Answer 1

4
$\begingroup$

Just take the derivative with respect to b. This yields $$ \sum_i 2 \log(a_i/b)*(-1/b) = 0 $$

Ignoring the $b\to\infty$ solution (which, if you work it out, gives a max rather than a min), the remaining solution is $$ \sum_i \log(a_i/b) = \log\left(\frac{\prod_i a_i}{\prod_i b}\right)=\log\left(\frac{\prod_i a_i}{b^n}\right) = 0 $$

$$ \frac{\prod_i a_i}{b^n} = 1 $$

$$ b = \left(\prod_i a_i \right)^{1/n} $$

$\endgroup$
2
  • $\begingroup$ Ahhh of course. Thanks. (Will accept when the 5 mins are up) $\endgroup$ Commented Feb 19, 2015 at 18:30
  • $\begingroup$ whuber's comment shows the easy way to get there. $\endgroup$
    – Glen_b
    Commented Feb 20, 2015 at 2:22

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.