Identity for the single-variable Gaussian expectation

59 Views Asked by At

I was reading The deep learning theory book and encountered this transformation: $$\begin{align} \frac{d}{dK}\left[\frac{1}{{\sqrt{2\pi K}}}\int_{-\infty}^{\infty}dz\space e^{\frac{-z^{2}}{2K}}{F(z)}\right] &= \frac{1}{2K^{2}}\left[\frac{1}{{\sqrt{2\pi K}}}\int_{-\infty}^{\infty}dz\space e^{\frac{-z^{2}}{2K}}F(z){(z^{2}-K)}\right] \\ &= \frac{1}{2K}\left[\frac{1}{{\sqrt{2\pi K}}}\int_{-\infty}^{\infty}dz\space e^{\frac{-z^{2}}{2K}}{z\space \frac{d}{dz}F(z)}\right] \end{align} $$ They said to go from the second equality to the third equality, they integrated by parts but I couldn't figure out how to do it. Can anyone provide me a detail explanation of this transform. I'm really appreciated!

1

There are 1 best solutions below

1
On BEST ANSWER

They said to go from the second equality to the third equality, they integrated by parts but I couldn't figure out how to do it.

Your integral is the following

$$\int_{-\infty}^{\infty} \underbrace{e^{-z^2/(2K)}(z^2-K)}_{g'}\times \underbrace{F(z)}_{h} dz$$

Where $g=-K z e^{-z^2/(2K)}$

soving it by parts you get

$$\int h\times g'=h\times g-\int h'\cdot g=0+k\int_{-\infty}^{\infty}ze^{-z^2/(2K)}\cdot f_Z(z)dz$$

as requested.

$K$ simplifies with $\frac{1}{2K^2}$ out of the integral in your original formula and I wrote $\frac{d}{dz}F(z)=f_Z(z)$ as F is the CDF and $f$ is the pdf