# Conditional expectation for doubly truncated bivariate normal distribution

The evaluation of the moments of doubly truncated bivariate normal distribution leads to the formulas with a great complexity. It has not been possible to derive explicit formulae for the moments except some particular cases.

• This is much simpler than it might appear because you can easily reduce it to the case where $\sigma_1=\sigma_2=1$ and you only need to find a formula for $E[X_1X_2].$ For one technique, see stats.stackexchange.com/questions/181057.
– whuber
Commented Feb 9 at 0:05
• Please add the self-study tag or the question will likely be closed.
– Carl
Commented Feb 9 at 17:31

To be explicit, write $$f(x_1,x_2,\rho,\sigma_1,\sigma_2)$$ for the bivariate normal density.

From the analysis at https://stats.stackexchange.com/a/71303/919 it is clear that the normalizing integral is the angle (as a fraction of the full circle) subtended by the quadrant in question when the ellipse is transformed back to the unit circle; in particular,

$$F(\rho,\sigma_1,\sigma_2) = \iint_{x_1\gt 0,\, x_2\gt 0} f(x_1,x_2,\rho,\sigma_1,\sigma_2)\,\mathrm dx_1\mathrm dx_2 = \frac{1}{\pi} \arctan\left(\sqrt{\frac{1+\rho}{1-\rho}}\right).$$

(Notice this does not depend on the $$\sigma_i.$$)

Our immediate goal is to exploit this result to compute

$$G(\rho,\sigma_1,\sigma_2) = \iint_{x_1\gt 0,\, x_2\gt 0} x_1x_2 f(x_1,x_2,\rho,\sigma_1,\sigma_2)\,\mathrm dx_1\mathrm dx_2$$

for $$-1 \lt \rho \lt 1$$ and $$\sigma_i\gt 0.$$ We will eventually make use of the fact that the $$\sigma_i$$ are scale parameters, which implies

$$G(\rho,\sigma_1,\sigma_2) = \sigma_1\sigma_2 G(\rho, 1, 1)$$

for all positive $$\sigma_i.$$

Write

$$\rho^\prime = (1-\rho^2)^{-1/2}.$$

Setting $$\sigma_i = \rho^\prime$$ makes $$F$$ particularly simple:

$$F(\rho,\rho^\prime,\rho^\prime) = \frac{1}{2\pi\rho^\prime} \iint_{x_1\gt 0,\, x_2\gt 0}\exp\left[-\frac{1}{2}\left(x_1^2 - 2\rho x_1 x_2 + x_2^2\right)\right]\,\mathrm dx_1\mathrm dx_2.$$

Because the integrand is rapidly decaying and smooth, we may differentiate the integral with respect to $$\rho$$ by differentiating its integrand:

\begin{aligned} \frac{\mathrm d}{\mathrm d \rho}(\rho^\prime F(\rho,\rho^\prime,\rho^\prime)) &= \iint_{x_1\gt 0,\, x_2\gt 0}\frac{\mathrm d}{\mathrm d \rho}\exp\left[-\frac{1}{2}\left(x_1^2 - 2\rho x_1 x_2 + x_2^2\right)\right]\,\mathrm dx_1\mathrm dx_2 \\ &= -G(\rho,\rho^\prime,\rho^\prime). \end{aligned}

Computing the derivative (bearing in mind that $$\rho^\prime$$ is a function of $$\rho$$) yields

\begin{aligned} G(\rho,\sigma_1,\sigma_2) &= \frac{\sigma_1\sigma_2}{(\rho^\prime)^2} G(\rho,\rho^\prime,\rho^\prime)\\ &=\frac{\sigma_1\sigma_2}{2\pi}\left(1 + \frac{2\rho}{\sqrt{1-\rho^2}} \arctan\left(\sqrt{\frac{1+\rho}{1-\rho}}\right)\right). \end{aligned}

The value of your second expectation therefore is

$$E[X_1X_2\mid X_1\gt 0,\ X_2\gt 0] = \frac{G(\rho,\sigma_1,\sigma_2)}{F(\rho,\sigma_1,\sigma_2)}.$$

Because $$(-X_1,X_2)$$ has a bivariate normal distribution (with the same $$\sigma_i$$) and correlation $$-\rho,$$ change $$\rho$$ to $$-\rho$$ everywhere in this formula to obtain your first expectation.

As a quick check, for independent standard normal variables where $$\sigma_1=\sigma_2=1$$ and $$\rho=0,$$ we easily compute $$G(0,1,1)=1/(2\pi)$$ and $$F(0,1,1)=1/4,$$ giving $$2/\pi$$ for the conditional expectation when both variables are positive. Its square root equals the unconditional expectation of $$|X_i|,$$ as it should.

• A very interesting mode to calculate the second integral. Thank you very much whuber. I think in the expression of F(ρ,ρ′,ρ′) is missing ρ′2 at the denominator of the exponential function and σ1=σ2=1. I would ask you to resume the mathematical proof with all the stages of calculation. I'm an engineer, not a mathematician. Commented Feb 11 at 20:23