# delta dirac integration

Considering random variable $w$ with the following distribution

$$w\sim\pi\mathcal{N}(0,\alpha^{-1})+(1-\pi)\delta_0$$

where $\pi$ is a random variable with the following distribution

$$\pi\sim\mathcal{B}eta(a_0, b_0)$$

and $\delta_0$ is a point mass at zero, if we would like to integrate the distribution over $w$ such that

$$I=\int_{-\infty}^{\infty} \Big[\pi \big(\frac{1}{2\pi\alpha^{-1}}\big)^{k/2}\exp\big(-\frac{\|w\|^2}{2\alpha^{-1}}\big) +(1-\pi)\delta_0 \Big]dw$$

The second part of the integral would have the form

$$II=\int_{-\infty}^{\infty} \Big[(1-\pi)\delta_0\Big] dw = (1-\pi) \int_{-\infty}^{\infty} \Big[\delta_0\Big] dw = (1-\pi)$$

Now my problem starts if we do the integration w.r.t. $\pi$ rather than $w$, so that the second part become

$$II=\int_{-\infty}^{\infty} \Big[(1-\pi)\delta_0\Big] d\pi,$$

although $\delta_0$ is a function of $w$, the probability distribution of $w$ is a function of $\pi$, so it can’t be taken out of integral and the delta is a function of $w$ rather than $\pi$, so I can't solve it like the previous part.

• Holy moly, there are many, many things wrong with this post. Let's try to fix two big things for the moment. Assuming $\pi$ means some number between $0$ and $1$, you can't integrate with respect to $\pi$. And your first integral is wrong too; $\delta_0$ is not a function from $\mathbb{R}\to\mathbb{R}$ but a measure. Maybe you want $I=\int_{-\infty}^{\infty}\pi(2\pi\alpha^{-1})^{-1/2}\exp(-w^2\alpha/2\big)dw+\int_{-\infty}^{\infty}d\delta_0$. Note $\delta_0$ is not absolutely continuous with respect to Lebesgue measure, so you cannot integrate it against Lebesgue measure. – xFioraMstr18 Jun 12 '18 at 1:05
• To put simple, you can simply compute as $\mathbb{E}_{\pi}[(1-\pi)\delta_0(dw)]=\mathbb{E}_{\pi}[(1-\pi)]\delta_0(dw)$. – Sangchul Lee Jun 12 '18 at 19:24