is there a way to calculate KL diverrgence if you have mean and std of two distributions?

90 Views Asked by At

I have only two information. For an example: N(0,1) and N(0.1,0.2). Is it possible to calculate KL divergence between these two distributions? I would appreciate your help.

1

There are 1 best solutions below

0
On BEST ANSWER

Yes. It is possible.

The density function of $N(0,1)$ will be $p(x)=\dfrac{1}{\sqrt{2\pi}}e^{{-\dfrac{x^2}{2}}}$ and the density function of $N(0.1,0.2)$ will be $q(x)=\dfrac{1}{\sqrt{2\pi(0.2)}}e^{{-\dfrac{(x-0.1)^2}{2(0.2)}}}$.

The KL distance of $p(x)$ and $q(x)$ is given by

$$D(p||q)=\int_{-\infty}^{\infty} p(x)log\dfrac{p(x)}{q(x)} dx$$

On solving the integral you get the value around 1.22028