I have been trying to understand and implement KL-divergence for two normal distributions. However, one thing that I seem to be missing is how can KL-divergence always be a non-negative value, if the log likelihood ratio can be negative?
Let's say we have two pdf's p(x) and q(x) similarly as in https://medium.com/@cotra.marko/making-sense-of-the-kullback-leibler-kl-divergence-b0d57ee10e0a
The formula for KLD is: $D_{KL}(p(x) || q(x)) = \int_x p(x) log (\frac{p(x)}{q(x)})dx$
so if $p(x) < q(x)$, the ratio value will be: $\frac{p(x)}{q(x)}<1$, and thus: $log (\frac{p(x)}{q(x)}) < 0$. If this holds for most of the support then $D_{KL}$ will end up also being < 1.
Is there some fundamental part I am missing?