Argmax of sum of log functions

29 Views Asked by At

I am trying to find the below with the context that each $\pi_s$ is a probability. (Trying to assign probabilities so I get maximum likelihood)

$$\underset{\bf{\pi}}{\operatorname{argmax}} \ \sum_{s} c_s * ln(\pi_s)$$ with constraint of $$\sum_{s} \pi_s=1$$

$c_s$ is integer constants.
We can assume non-zero pi values if needed.

I tried AM-GM inequality as below: $$\underset{\bf{\pi}}{\operatorname{argmax}} \ \sum_{s} c_s * ln(\pi_s)$$ $$=\underset{\bf{\pi}}{\operatorname{argmax}} \ \sum_{s} ln(\pi_s^{c_s})$$ $$=\underset{\bf{\pi}}{\operatorname{argmax}} \ ln(\prod_{s}\pi_s^{c_s})$$ $$=\underset{\bf{\pi}}{\operatorname{argmax}} \ \prod_{s}\pi_s^{c_s}$$ $$\le\underset{\bf{\pi}}{\operatorname{argmax}} \ (\frac{1}{|s|}\sum_s\pi_s^{c_s})^{|s|}\ \text{by AM_GM inequality}$$

So, now I know it is maximum when it is equal, but I got stuck here... Not sure if it's the right approach or not. Please help and thanks a lot!

1

There are 1 best solutions below

3
On BEST ANSWER

Write down the Lagrangian

$$\mathcal{L}(\pi, \lambda) = \sum_{s} c_{s}\ln(\pi_{s}) + \lambda (\sum_{s}c_{s} - 1)$$

Setting the gradient of $\mathcal{L}$ wrt $\lambda$ and $\pi$ to zero while enforcing the problem constraints yields

$$\pi_{s} = \frac{c_{s}}{\sum_{t}c_{t}}$$

Hope it helps.