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.