I am struggling with an integral pretty similar to one already resolved in MO (link: Integration of the product of pdf & cdf of normal distribution ). I will reproduce the calculus bellow for the sake of clarity, but I want to stress the fact that my computatons are essentially a reproduction of the discussion of the previous thread.

In essence, I need to solve: $$\int_{-\infty}^\infty\Phi\left(\frac{f-\mathbb{A}}{\mathbb{B}}\right)\phi(f)\,df,$$ where $\Phi$ is cdf of a standard normal, and $\phi$ its density. $\mathbb{B}$ is a negative constant.

As done in the aforementioned link, the idea here is to compute the derivative of the integral with respect to $\mathbb{A}$ (thanks to Dominated Convergence Theorem, integral and derivative can switch positions). With this, \begin{align*} \partial_A\left[\int_{-\infty}^\infty\Phi\left(\frac{f-A}{B}\right)\phi(f)\,df\right]&=\int_{-\infty}^\infty\partial_A\left[\Phi\left(\frac{f-A}{B}\right)\phi(f)\right]\,df=\int_{-\infty}^\infty-\frac{1}{B}\phi\left(\frac{f-A}{B}\right)\phi(f)\,df \end{align*} We note now that

$$\phi\left(\frac{f-A}{B}\right)\phi(f)=\frac{1}{2\pi}\exp\left(-\frac{1}{2}\left[\frac{(f-A)^2}{B^2}+f^2\right]\right)=\exp\left(-\frac{1}{2B^2}\left[f^2(1+B^2)+A^2-2Af\right]\right)$$ $$=\frac{1}{2\pi}\exp\left(-\frac{1}{2B^2}\left[\left(f\sqrt{1+B^2}-\frac{A}{\sqrt{1+B^2}}\right)^2+\frac{B^2}{1+B^2}A^2\right]\right)$$

Finally, then,

$$\partial_A\left[\int_{-\infty}^\infty\Phi\left(\frac{f-A}{B}\right)\phi(f)\,df\right]$$

$$\ \ \ \ \ =-\frac{1}{\sqrt{2\pi}B}\exp\left(-\frac{A^2}{2(1+B^2)}\right)\frac{1}{2\pi}\int_{-\infty}^\infty\exp\left(-\frac{1}{2B^2}\left[f\sqrt{1+B^2}-\frac{A}{\sqrt{1+B^2}}\right]^2\right)\,df$$

and with the change of variable \begin{align} \left[y\longmapsto f\frac{\sqrt{1+B^2}}{B}-\frac{A}{B\sqrt{1+B^2}}\Longrightarrow df=\frac{B}{\sqrt{1+B^2}}\,dy\right] \end{align} we get \begin{align} \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty\exp\left(-\frac{1}{2B^2}\left[f\sqrt{1+B^2}-\frac{A}{\sqrt{1+B^2}}\right]^2\right)\,df=\frac{B}{\sqrt{1+B^2}}\int_{-\infty}^{\infty}\phi(y)\,dy=\frac{B}{\sqrt{1+B^2}} \end{align} This means that \begin{align} \partial_A\left[\int_{-\infty}^\infty\Phi\left(\frac{f-A}{B}\right)\phi(f)\,df\right]&=-\frac{1}{\sqrt{2\pi}B}\exp\left(-\frac{A^2}{2(1+B^2)}\right)\frac{B}{\sqrt{1+B^2}}=-\frac{1}{\sqrt{1+B^2}}\phi\left(\frac{A}{\sqrt{1+B^2}}\right) \end{align} At this point, given that (as $\mathbb{B}$ is negative) $$\Phi\left(\frac{f-A}{\mathbb{B}}\right)\phi(f)=0$$ when $\mathbb{A}\rightarrow-\infty$, the integral we are looking for is equal to \begin{align} \int_{-\infty}^{\mathbb{A}}-\frac{1}{\sqrt{1+\mathbb{B}^2}}\phi\left(\frac{A}{\sqrt{1+\mathbb{B}^2}}\right)\,dA \end{align} Again with the obvious change of variables $$\left[y\longmapsto\frac{A}{\sqrt{1+\mathbb{B}^2}}\Longrightarrow\sqrt{1+\mathbb{B}^2}\,dy=dA\right]$$ one gets \begin{align} \int_{-\infty}^{\mathbb{A}}-\frac{1}{\sqrt{1+\mathbb{B}^2}}\phi\left(\frac{A}{\sqrt{1+\mathbb{B}^2}}\right)\,dA=-\frac{1}{\sqrt{1+\mathbb{B}^2}}\sqrt{1+\mathbb{B}^2}\int_{-\infty}^{\mathbb{A}/\sqrt{1+\mathbb{B}^2}}\phi(y)\,dy=-\Phi({\mathbb{A}/\sqrt{1+\mathbb{B}^2}}). \end{align} The problem here is that this number should obviously be positive, so at some point I am missing a signal. As the computations seem sound to me, I would like to see if anyone could help me to find my mistake.

Many thanks to you all.

7more comments