How can I prove that KL-divergence is not symmetric?
https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence
Thanks a lot!
How can I prove that KL-divergence is not symmetric?
https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence
Thanks a lot!
It would suffice to show that with a single example. One possibility is as follows:
Define $$ P(x) = \begin{cases} 1, \text{with probability } 0.5 \\ -1, \text{with probability } 0.5 \end{cases} $$ and $$ Q(x) = \begin{cases} 1, \text{with probability } 0.1 \\ -1, \text{with probability } 0.9 \end{cases} $$
You can easily verify that $D_{KL}(P||Q) = 0.5*\ln(0.5/0.1) + 0.5*\ln(0.5/0.9)$ and $D_{KL}(Q||P) = 0.1*\ln(0.1/0.5) + 0.9*\ln(0.9/0.5)$ and they are not equal.