$X\sim N(0,1)$ and $U=1 \ \text{if} \ X \ge 0 \ \text{and} \ U=0 \ \text{if} \ X<0$

56 Views Asked by At

$X\sim N(0,1)$ and $U=1 \ \text{if} \ X \ge 0 \ \text{and} \ U=0 \ \text{if} \ X<0$

Find $\text{cov}(\text{abs} (X),U)$

where $\text{abs()}$ is the absolute value function.

I did:

$\text{cov}(\text{abs}(X),U)=E(\text{abs}(X)U)-E(\text{abs}(X))E(U)=E(\text{abs}(X)U |X \ge 0)P(X \ge 0)+ E(\text{abs}(X)U | X<0)P(X<0)-E(\text{abs}(X))E(U)$

$=E(X)P(X \ge 0)-E(|X|)E(U)=-\frac{1}{2}(\sqrt{\frac{2}{\pi}})$

But the answer given is that the covariance is $0$. Where am I going wrong? Please help

3

There are 3 best solutions below

1
On BEST ANSWER

$\text{cov}(|X|,U)\\=E(|X|U)-E(|X|)E(U)\\=E(|X|U |X \ge 0)P(X \ge 0)+ E(|X|U | X<0)P(X<0)-E(|X|)E(U)$

$=E(X|X \ge 0)P(X \ge 0)-E(|X|)E(U)\\= E(X|X \ge 0)P(X \ge 0)-E(|X|)Pr(X>0)\\ =\frac12 (E(X|X\ge0) -\frac12E(|X||X\ge 0)-\frac12E(|X||X< 0)) \\=\frac12(E(X|X\ge0)-E(X|X\ge0)) \\ =0$

by symmetry.

Your mistake is you dropped the condition.

1
On

In the first term $E(|X|U\, |\{X\geq 0\})+E(|X|U\, |\{X< 0\})=E(X|\{X\geq 0\})-E(X|\{X< 0\})=2E(X|\{X\geq 0\})$ in view of symmetry of $X$. Hence the first term is not zero. From the normal density function you can see that the first term is actually $\frac 1 2 \sqrt{\frac 2 {\pi}}$ so it cancels with the second term.

1
On

More directly and setting $U=\mathbf{1}_{\left[0,\infty\right)}\left(X\right)$:

$$\mathbb{E}\left|X\right|U=\int\left|x\right|\mathbf{1}_{\left[0,\infty\right)}\left(x\right)\phi\left(x\right)dx=\int_{0}^{\infty}x\phi\left(x\right)dx$$and:

$$\mathbb{E}\left|X\right|\times\mathbb{E}U=\int|x|\phi\left(x\right)dx\times\int_{0}^{\infty}\phi\left(x\right)dx=\left(2\int_{0}^{\infty}x\phi\left(x\right)dx\right)\times\frac{1}{2}=\int_{0}^{\infty}x\phi\left(x\right)dx$$

So that: $$\mathsf{Covar}\left(\left|X\right|,U\right)=\mathbb{E}\left|X\right|U-\mathbb{E}\left|X\right|\times\mathbb{E}U=0$$

Here $\phi(x)$ denotes the PDF of $X$.