3

The question is in the title:

$$ E[W|Z] = E[XY|Z] \stackrel{?}{=} E[X|Z]E[Y|Z] $$

$$\text{if}$$ $$ E[XY] = E[X]E[Y] $$ ???

$X$ and $Y$ are independent of each other, but neither is independent of $Z$. My basic stats are a bit rusty apparently...

The context is that I'm trying to implement a partially-linear model, and my parametric terms consist of interactions of a continuous variable $Y$ with a factor variable $X$. It would be very convenient to estimate the conditional expectations separately, especially since most entries of the matrix $W$ are zeros. But I am not sure whether this is kosher.

generic_user
  • 13,339
  • He's asking whether, if $X$ and $Y$ are independent of each other, but neither is independent of $Z$, are they conditionally independent given $Z$. – Patty Sep 27 '16 at 19:14
  • $X$ is a geographic area and $Y$ is a measure of time. They are correlated with $Z$, but not caused by $Z$. – generic_user Sep 27 '16 at 19:15

1 Answers1

1

Independence does not imply conditional independence.

For example,

Let $X$ and $Y$ be two independent $\text{Binomial}(n,p)$ random variables. Then by assumption $E[XY]=E[X]E[Y]$.

Now, define $Z$ as their sum: $Z=X+Y$

Clearly $X$ and $Y$ are not independent given $Z$ since, if $Z=q$, it immediately follows that $X=q-Y$.

Hence,

$\text{Cov}(X,Y|Z=q) = E[XY|Z=q]=E[Y(q-Y)]=qE[Y]-E[Y^2]$

$=qnp-np(1-p)-n^2p^2$

Patty
  • 1,759
  • Hmm. I can't tell whether your answer would break down given an appropriate additional assumption on the nature of $Z$. – generic_user Sep 27 '16 at 19:33
  • What is your $Z$ in this instance? I would guess that if $Z$ puts any restriction on a function $g(X,Y)$, then they're not conditionally independent. The dependence between the two variables might by insignificant though. – Patty Sep 27 '16 at 19:43