0
$\begingroup$

Suppose I have two non-independent gaussian random variables

$(X,Y)\sim \text{BiNormal}[(\mu_X,\mu_Y),(\sigma_X,\sigma_Y),\rho]$

It's a well known result for the bivariate normal distribution with zero means and unit variances that

$\operatorname {E}(X\mid Y<y)=-\rho {\phi (y) \over \Phi (y)}$

Similar expressions are also available for the non-zero non-unit variance conditional expectation.

Is there a similarly convenient parameterisation for $\operatorname {Var}(X\mid Y<y)$ ? I'm interested in the general case (non-zero means & non-unit variances).

NB. I am aware that, for Gaussian families, conditioning acts as a linear projection. As explained here, that means that $\operatorname {Var}(X\mid X)=\sigma_Y^2(1-\rho^2)$. This is what makes me believe there might be a parameterisation for the variance in the truncated case.

$\endgroup$
  • 1
    $\begingroup$ The conditional expectation formula is correct but only when $\mu_X=\mu_Y=0$ and $\sigma_X=\sigma_Y=1$. $\endgroup$ – JimB Oct 22 at 5:37
  • $\begingroup$ When $\mu_X=\mu_Y=0$ and $\sigma_X=\sigma_Y=1$ the conditional variance is $1-\frac{\rho ^2 \phi (y) y \Phi (y)+\phi (y))}{\Phi (y)^2}$. Do you just need the answer for non-zero means and non-unity variances or do you need all of the steps? $\endgroup$ – JimB Oct 22 at 13:10
  • $\begingroup$ Yes, you are correct of course – the expectation I included from Wikipedia is a special case (centered case with unit variances). I've edited the OP to make this clear. I just need the answer for the general case (non-zero means & non-unity variances). I don't need the proof/steps. Thanks! $\endgroup$ – EOO Oct 22 at 13:42
1
$\begingroup$

Here is what I found using Mathematica. First, the constant of integration is found for the truncated bivariate distribution, then the first two moments are found followed by the variance. Then the variance is simplified such that we end up with the usual notation.

Here are the results:

$$E(X|Y<y)=\mu_X-\frac{\rho \sigma_X \phi \left(\frac{y-\mu_Y}{\sigma_Y}\right)}{\Phi \left(\frac{y-\mu_Y}{\sigma_Y}\right)}$$

$$V(X|Y<y)=\sigma_X^2 \left(\frac{\rho ^2 \phi \left(\frac{y-\mu_Y}{\sigma_Y}\right) \left((\mu_Y-y) \Phi \left(\frac{y-\mu_Y}{\sigma_Y}\right)-\sigma_Y \phi \left(\frac{y-\mu_Y}{\sigma_Y}\right)\right)}{\sigma_Y \Phi \left(\frac{y-\mu_Y}{\sigma_Y}\right)^2}+1\right)$$

If $\mu_X=\mu_Y=1$ and $\sigma_X=\sigma_Y=1$, then

$$E(X|Y<y)=-\frac{\rho \phi (y)}{\Phi (y)}$$

$$V(X|Y<y)=1-\frac{\rho ^2 \phi (y) (y \Phi (y)+\phi (y))}{\Phi (y)^2}$$

Here is the code:

(* Define bivariate normal distribution *)
d = BinormalDistribution[{μX, μY}, {σX, σY}, ρ];

(* Get constant of integration for truncated distribution *)
c = 1/Integrate[PDF[d, {x, y}], {y, -∞, y0}, {x, -∞, ∞},
Assumptions -> y0 ∈ Reals && σX > 0 && σY > 0 && μX ∈ Reals && μY ∈ Reals && -1 < ρ < 1];

(* Mean *)
ex = c Integrate[x PDF[d, {x, y}], {y, -∞, y0}, {x, -∞, ∞},
  Assumptions -> y0 ∈ Reals && σX > 0 && σY > 0 && μX ∈ Reals && μY ∈ Reals && -1 < ρ < 1];

(* Expectation of X^2 *)
ex2 = c Integrate[x^2 PDF[d, {x, y}], {y, -∞, y0}, {x, -∞, ∞},
  Assumptions -> y0 ∈ Reals && σX > 0 && σY > 0 && μX ∈ Reals && μY ∈ Reals && -1 < ρ < 1];

(* V(X|Y<y *)
var = ex2 - ex^2

(* Now attempt to simplify and write in terms of usual notation *)
var = var // FullSimplify
var = var /. Erfc[z_] -> 1 - Erf[z] //. Erf[Abs[z_]/(Sqrt[2] σY)] Sign[z_]^3 -> 
   Erf[z/(Sqrt[2] σY)]
var = var /. E^(-((y0 - μY)^2/(2 σY^2))) -> Sqrt[2 π] ϕ[(y0 - μY)/σY] /. 
  Erf[z_] -> -1 + 2 Φ[Sqrt[2] z] /. y0 -> y // FullSimplify

(* E(X|Y<y) *)
expectation = ex /. E^(-((y0 - μY)^2/(2 σY^2))) -> Sqrt[2 π] ϕ[(y0 - μY)/σY] /.
  Erf[z_] -> -1 + 2 Φ[Sqrt[2] z] /. y0 -> y // FullSimplify
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.