1
$\begingroup$

I am trying to calculate the following integral: $$\int_a^\infty x \Phi(cx+d) \phi\left(\frac{x-\mu}{\sigma}\right) dx,$$ where $\Phi$, $\phi$ denote the CDF and PDF of the standard Normal $N(0,1)$.

I found this table of integrals but it includes only the indefinite integral: https://www.tandfonline.com/doi/pdf/10.1080/03610918008812164?casa_token=0E6SYYGFkkUAAAAA:cd6Lp-PTXsVRR20JaMQcNV8twies8FQAV0sO0DgOcAMD-L8aKBjxwpbqjClYlcFdIIxNUTCrnySg

Can you please help me? Thanks!

$\endgroup$
6
  • 1
    $\begingroup$ You can try just doing an integration by parts to remove the x. The indefinite integral is more manageable because when you do integration by parts, the boundary term disappears. Are you looking for any particular bound? $\endgroup$ Commented Jun 3, 2023 at 3:01
  • $\begingroup$ Thanks! How do we find integrals of the form $\int_a^\infty x \phi(cx+d) \phi(\frac{x-\mu}{\sigma}) dx$ though? Is there a closed form solution? $\endgroup$
    – Margot.
    Commented Jun 3, 2023 at 16:14
  • $\begingroup$ @Margot. --- the integral in your comment, product of two $\phi$'s, has a closed form in terms of error functions ("complete the square"); but the integral in your question has the product of $\phi$ and $\Phi$, so that does not help. $\endgroup$ Commented Jun 4, 2023 at 10:17
  • $\begingroup$ After integrating by parts, I think this is what we find, right? Do you have a link for the internal in my comment? Thanks! $\endgroup$
    – Margot.
    Commented Jun 5, 2023 at 17:39
  • $\begingroup$ This is close but I don't know whether this can help <stats.stackexchange.com/questions/498851/…> $\endgroup$ Commented Jul 23, 2023 at 23:35

2 Answers 2

0
$\begingroup$

The indefinite integral $\int x \Phi(\alpha x + \beta) \phi\left(x\right) \mathrm{d}x$ is given in Wikipedia. Let's denote it by $I(\alpha,\beta,x)$.

The change of variables $y=\frac{x-\mu}{\sigma}$ in $\int_a^\infty x \Phi(cx+d) \phi\left(\frac{x-\mu}{\sigma}\right) \mathrm{d}x$ gives $$\sigma\int_{\frac{a-\mu}{\sigma}}^\infty (\mu + \sigma y) \Phi(c\sigma y +c\mu + d) \phi(y) \mathrm{d}y \\ = \sigma\mu\int_{\frac{a-\mu}{\sigma}}^\infty\Phi(c\sigma y +c\mu + d)\phi(y)\mathrm{d}y + \sigma^2\int_{\frac{a-\mu}{\sigma}}^\infty y\Phi(c\sigma y +c\mu + d)\phi(y)\mathrm{d}y.$$

The second integral is ${\bigl[I(c\sigma,c\mu+d,x)\bigr]}_{\frac{a-\mu}{\sigma}}^\infty$. The first integral can be found here.


Edit

I checked with R and it is correct.

I <- function(a, b, x) {
  t <- sqrt(1+b^2)
  b/t * dnorm(a/t) * pnorm(x*t + a*b/t) - dnorm(x) * pnorm(a + b*x)
}
J <- function(a, b, w) {
  t <- sqrt(1+b^2)
  rho <- -b/t
  library(mvtnorm)
  pmvnorm(upper = c(a/t, w), sigma = cbind(c(1, rho), c(rho, 1)))
}
K <- function(a, b, w) {
  J(a, b, Inf) - J(a, b, w)
}

a <- 1
mu <- 1; sigma <- 1; c <- 2; d <- -1

mu*sigma * K(c*mu+d, c*sigma, (a-mu)/sigma) + 
  sigma^2*(I(c*mu+d, c*sigma, Inf) - I(c*mu+d, c*sigma, (a-mu)/sigma))
# 0.8796307

f <- function(x) { 
 x * pnorm(c*x+d) * dnorm((x-mu)/sigma)  
}
integrate(f, lower = a, upper = Inf)
# 0.8796307 with absolute error < 1.7e-08

Edit

So if I didn't do a mistake, the final result is $$ \sigma \left(\mu\Phi\bigl(\frac{\alpha}{t}\bigr) - B_{\frac{-\beta}{t}}\Bigl(\frac{\alpha}{t}, v\Bigr) + \sigma \Bigl(\frac{\beta}{t} \phi\bigl(\frac{\alpha}{t} \bigr) \Bigl(1 - \Phi\bigl(tv+\frac{\alpha\beta}{t}\bigr)\Bigr) - \phi(v)\Phi(\alpha + \beta v)\Bigr)\right) $$ where $t = \sqrt{1+c^2\sigma^2}$, $\alpha = c\mu+d$, $\beta = c\sigma$, $v = \frac{a-\mu}{\sigma}$, and $B_\rho$ is the bivariate normal function.

To be checked...

$\endgroup$
2
$\begingroup$

the definite integral has a closed-form expression for $\mu=0$,

\begin{align} & \int_a^\infty x \Phi(cx+d) \phi\left(\frac{x}{\sigma}\right) dx \\[8pt] = {} & \frac{c \sigma^3 e^{-\frac{d^2}{2 c^2 \sigma^2+2}}}{2 \sqrt{2 \pi } \sqrt{c^2 \sigma^2+1}}\left[1-\operatorname{erf}\left(\frac{c \sigma^2 (c a+d)+a}{\sigma \sqrt{2 c^2 \sigma^2+2}}\right)\right] \\[8pt] & -\sigma^2(2 \sqrt{2 \pi })^{-1}e^{-\frac{a^2}{2 \sigma^2}} \left[\operatorname{erfc}\left(\frac{c a+d}{\sqrt{2}}\right)-2\right] \end{align}

$\endgroup$
8
  • $\begingroup$ Thanks ! I know the expression from the table I shared. I am interested in the definite integral version, though. $\endgroup$
    – Margot.
    Commented Jun 3, 2023 at 12:14
  • $\begingroup$ Thanks! Can you show the steps? $\endgroup$
    – Margot.
    Commented Jun 3, 2023 at 12:39
  • $\begingroup$ as indicated in the comment above, integrate by parts to remove the $x$, then follow the steps of mathoverflow.net/a/101753/11260 $\endgroup$ Commented Jun 3, 2023 at 12:42
  • $\begingroup$ Why does $\mu \neq 0$ cause issues? $\endgroup$
    – Margot.
    Commented Jun 3, 2023 at 13:10
  • $\begingroup$ the integral $\int \phi(x-\mu)\Phi(x)\,dx$ does not have a closed-form expression when $\mu\neq 0$ $\endgroup$ Commented Jun 3, 2023 at 14:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .