Help understanding $D_{KL} (g;f)=0\iff f=g$ a.e.

523 Views Asked by At

It's seems to be a well know property of the Kullback-Leibler divergence (according to Wikipedia) that $$D_{KL} (g;f)=0\iff f=g\,\,\, a.e.$$

I am working with the continuous case. The second implication is straightforward and I am more interested in the $``\implies"$ direction.

$$D_{KL}(g;f)=\int_{\mathbb R} \log\left(\frac{g(x)}{f(x)}\right)g(x)dx=0$$ I don't quite graps how this implies $f=g$ a.e. The logarithm is not non-negative, and hence I don't know how to proceed.

I've read this follows from Gibb's inequality but I haven't been able to see how.

Thanks in advance for any help.

1

There are 1 best solutions below

2
On

This comes from the Jensen Inequality. Indeed by Jensen, we have $$-D_{KL}(g;f)=\int_{\mathbb R} \log_2\left(\frac{f(x)}{g(x)}\right)g(x)dx \leq \log_2\left(\int_{\mathbb R} \frac{f(x)}{g(x)}g(x)dx\right)=\log_2(1)=0.$$ The equality holds iff a.e. $f(x)=g(x)$.