0
$\begingroup$

I'd like to calculate $E(X-EX)\cdot (Y- EY)$, where $X$ is continuous with some continuous density $f$ on $[0,1]$ interval and $Y$ is a Bernoulli random variable with $P(Y=1) = 0.95$ and $P(Y=0) = 0.05$. The condition is that, they are not independent.
I feel I'm having a complete 'mind eclipse'. I go like this:

$$E(X-EX)\cdot (Y-EY)=E[(X-EX)\cdot (-0.95)\cdot 1_{0

and the question is it really all what can be done?

  • 0
    If $X$ and $Y$ are independent this is obviously $0$2017-02-21
  • 0
    @Henry, I forgot to add the information that they're not independent... I updated the question.2017-02-21

2 Answers 2

1

You have found $E[Y]=0.95$.

You will have $E[E[X](Y-E[Y])]=E[X]E[(Y-E[Y])]=0$

Then the covariance is $$E[(X-EX)\cdot (Y- EY)] = E[X (Y- EY)]$$ $$= (1-0.95)\, P(Y=1)\, E[X\mid Y=1] +(0-0.95)\,P(Y=0) \,E[X\mid Y=0]$$ $$= 0.05 \times 0.95 \, E[X\mid Y=1] - 0.95 \times 0.05 \,E[X\mid Y=0]$$ $$= 0.0475 \Big(E[X\mid Y=1] - E[X\mid Y=0]\Big)$$

  • 0
    But I didn't assume that $EX=0$...2017-02-21
  • 0
    No you did not; $E[X]$ is a constant between $0$ and $1$ and so is independent of $Y$. But you can use $E[Y-E[Y]]=E[Y]-E[E[Y]]= 0.95-0.95=0$2017-02-21
  • 0
    Ok, I don't understand this passage after second equality sign. What leads to this formula with conditioning?2017-02-21
  • 1
    @Lili: I have added an extra step2017-02-21
0

Because we know $Y\sim\mathcal{Ber}(0.95)$ then the covariance of $X,Y$ will be:

$$\newcommand{\E}{\operatorname{\sf E}}\newcommand{\P}{\operatorname{\sf P}}\begin{align} \E\Bigl(\bigl(X-\E(X)\bigr)\bigl(Y-\E(Y)\bigr)\Bigr) ~&=~ \E(XY)-\E(X)\E(Y) \\[1ex] &=~ 0.95\E(1X\mid Y{=}1)+0.05\E(0X\mid Y{=}0)-0.95\E(X) \\[1ex] &=~ 0.95\bigl(\E(X\mid Y{=}1)-\E(X)\bigr) \\[1ex] &=~ 0.95\bigl(\E(X\mid Y{=}1)-0.95\E(X\mid Y{=}1)-0.05\E(X\mid Y{=}0)\bigr) \\[1ex] &=~ 0.95\cdot 0.05 \bigl(\E(X\mid Y{=}1)-\E(X\mid Y{=}0)\bigr) \end{align}$$

Nothing more can be found without a means to obtain these two conditional expectations.

  • 0
    Here, you used this property: EXY=Y*E(X|Y) as I can recognize. But these two solutions differ very much with EX. Is it just 'visual' difference or one of them is wrong?2017-02-22