22
$\begingroup$

Does anyone have an example of two dependent random variables, that satisfy this relation?

$E[f(X)f(Y)]=E[f(X)]E[f(Y)]$ for every function $f(t)$.

Thanks.

*edit: I still couldn't find an example. I think one should be of two identically distributed variables, since all the "moments" need to be independent: $Ex^iy^i=Ex^iEy^i$. That's plum hard...

  • 4
    No, and in fact no such examples can exist by considering the indicator functions of measurable sets.2012-11-26
  • 3
    Thanks. But I know that the condition for independence is that this holds for every f(X) and g(Y), here this is a weaker condition, so I would expect that they would not be independent...2012-11-26
  • 1
    Ah I see. I read what you wrote wrong. There may be a way to show this with $\pi-\lambda$ but I think you may be right.2012-11-26
  • 0
    Unfortunately I don't know about $\pi-\lambda$. Is there a simpler example?2012-11-26
  • 2
    Just as a random thought about how to approach this: the condition you have there is (I am pretty sure) equivalent to conditional independence of $X$ and $Y$ given the $\sigma-$ algebra generated by measurable rectangles of the form $A \times A$ where $A \in \mathcal{B}$. The first step here would be to show that that sigma algebra is not the entire Borel $\sigma-$algebra. Showing that should give a bit of insight as to what kind of random variables to look at, since you need to find a set not in that algebra to have any hope of this working. I'm a bit busy today, but tomorrow I may try it.2012-11-26
  • 0
    I should think this represents a sort of "augmented uncorrelation", I did think of some rectangle but I couldn't really build a counter example, since this has to hold for all the functions f, and in that - all the moments of the function.2012-11-26
  • 0
    I have not thought about this carefully, but here is another possible line of attack. Taking $f = g - h$ for arbitrary bounded, measurable $g,h$, using your hypothesis it is easy to show that $$\newcommand{\e}{\mathbb E}\e g(X) h(Y) + \e h(X) g(Y) = \e g(X) \e h(Y) + \e h(X) \e g(Y) \>. $$ Letting $g(t) = \mathbf 1_{(t \leq x)}$ and $h(t) = \mathbf 1_{(t \leq y)}$, we must have that for all $x$ and $y$, $$\mathbb P(X \leq x, Y \leq y) + \mathbb P(X \leq y, Y \leq x) = \mathbb P(X \leq x) \mathbb P(Y \leq y) + \mathbb P(X \leq y) \mathbb P(Y \leq x) \> .$$2012-11-29
  • 0
    So now I need to prove that there exist two variables $X,Y$ that satisfy the orig. equation but don't satisfy $P(X. I can't really find any example...2012-11-29

5 Answers 5

17

Here is a counterexample. Let $V$ be the set $\lbrace 1,2,3 \rbrace$. Consider random variables $X$ and $Y$ with values in $V$, whose joint distribution is defined by the following matrix :

$$ P=\left( \begin{matrix} \frac{1}{10} & 0 & \frac{1}{5} \\ \frac{1}{5} & \frac{1}{10} & 0 \\ \frac{1}{30} & \frac{7}{30} & \frac{2}{15} \end{matrix} \right)= \left( \begin{matrix} \frac{3}{30} & 0 & \frac{6}{30} \\ \frac{6}{30} & \frac{3}{30} & 0 \\ \frac{1}{30} & \frac{7}{30} & \frac{4}{30} \end{matrix}\right) $$

Thus, for example, $P(X=1,Y=2)=0$ while $P(X=1)P(Y=2)=(\frac{1}{10} + \frac{1}{5})(\frac{1}{10} + \frac{7}{30}) >0$. So $X$ and $Y$ are not independent.

Let $f$ be an ARBITRARY (I emphasize this point because of a comment below) function defined on $X$ ; put $x=f(1),y=f(2),z=f(3)$. Then

$$ \begin{array}{rcl} {\mathbf E}(f(X)) &=& \frac{3(x+y)+4z}{10} \\ {\mathbf E}(f(Y)) &=& \frac{x+y+z}{3} \\ {\mathbf E}(f(X)){\mathbf E}(f(Y)) &=& \frac{3(x+y)^2+7(x+y)z+4z^2}{30} \\ {\mathbf E}(f(X)f(Y)) &=& \frac{3x^2+6xy+3y^2+7xz+7yz+4z^2}{30} \\ \end{array} $$

The last two are equal, qed.

  • 0
    We have here two dependent variables, and a specific function $f(t)$ for which the original equation holds. This is not the question - I can find many dependent variables with a specific $f$ that satisfies this. The question is rather do two variables $X,Y$ exist such that the original equation holds (for all $f$'s) but are dependent.2012-11-29
  • 2
    @ido : what do you mean “specific” ? My $f$ is not specific at all, it is completely free and arbitrary, as are $x$, $y$ and $z$.2012-11-29
  • 0
    Can you pls explain how you got E(f(X))?2012-11-29
  • 1
    Can you say a few words about how you came up with these numbers? It would be interesting to have a more "natural" example.2012-11-29
  • 2
    @PeterR: $E(f(X)) = f(1) P(X=1) + f(2) P(X=2) + f(3) P(X=3)$. It's the most basic definition of expectation.2012-11-29
  • 3
    @NateEldredge : Basically, what happens is this : the distribution space has dimension $3 \times 3-1=8$ (the $-1$ is because probabilities sum to $1$). Complete independence is equivalent to four independent linear relations, while “weak independence” (in the sense of the OP) yields only three relations. Of course, you must also take into account the positivity constraints for the probabilities, but luckily for us they do not interfere here.2012-11-29
  • 0
    @NateEldredge : yes, a “natural” solution would be much better and illuminating, but perhaps much harder and time-consuming to reach also. So it’s up to you, heheh ...2012-11-29
  • 0
    @NateEldredge: that is what I figured. So if you do the arithmetic, it does not work out. f(1)P(X=1)+f(2)P(X=2)+f(3)P(X=3)=(5x+9y+12z)/30, not (3x+3y+4z)/10....unless I'm seriously caffeine deficient right now.2012-11-29
  • 0
    @PeterR: Oh, I see the problem. The first matrix given isn't the same as the second, and its entries don't sum to 1: to match the second matrix (which I think is correct), the upper right entry in the first matrix should be $3/15$ not $1/15$. Ewan, can you confirm and edit accordingly?2012-11-29
  • 0
    @NateEldredge : sorry everybody for the typo. Fixed now.2012-11-29
  • 0
    @EwanDelanoy, thanks for the answer! I didn't think about doing something in discrete space... I wonder if there's a simple example for continuous as well, but that's for another time.2012-11-30
  • 0
    +1 but, although I haven't checked the history of this question, as I understand it the intro "Here is a counterexample." is now exactly wrong.2012-12-04
  • 0
    @MarkHurd :why so? You mean I shouldn’t pull rabbit out of hats and explain how I discovered it first ?2012-12-04
  • 0
    @EwanDelanoy: No, simply that this _is_ an example of what the question is looking for. Perhaps you're answering the "edit:" which suggests "two identically distributed variables" are required.2012-12-04
6

Here is a continuous counterexample. It has discrete analogues, some of which are given at the end. We start with a general remark, which may help understand where the counterexamples come from. (For a short version of the answer, go to the picture and ponder it, really it says everything.)

Assume that $(X,Y)$ has PDF $p$ and that there exists some measurable function $q$ such that, for every $(x,y)$, $$ p(x,y)+p(y,x)=2q(x)q(y). $$ One can assume without loss of generality that $q$ is a PDF. Then, for every function $f$, $$ E[f(X)f(Y)]=\iint f(x)f(y)p(x,y)\mathrm dx\mathrm dy=\iint f(x)f(y)p(y,x)\mathrm dx\mathrm dy, $$ hence $$ E[f(X)f(Y)]=\iint f(x)f(y)q(x)q(y)\mathrm dx\mathrm dy=\left(\int f(x)q(x)\mathrm dx\right)^2. $$ Thus, if, furthermore, $$ q(x)=\int p(x,y)\mathrm dy=\int p(y,x)\mathrm dy, $$ then indeed, $$ E[f(X)f(Y)]=E[f(X)]E[f(Y)]. $$ Now, a specific counterexample: assume that $(X,Y)$ is uniformly distributed on the set $$ D=\{(x,y)\in[0,1]^2\,;\,\{y-x\}\leqslant\tfrac12\}, $$ where $\{\ \}$ is the function fractional part. In words, $D$ (the black part in the image of the square $[0,1]^2$ below) is the union of the parts of the square $[0,1]^2$ between the lines $y=x+\frac12$ and $y=x$, and below the line $y=x-\frac12$.

$\hskip2in$

Then $(Y,X)$ is uniformly distributed on the image of $D$ by the symmetry $(x,y)\to(y,x)$ (the white part in the image of the square $[0,1]^2$ above), which happens to be the complement of $D$ in the square $[0,1]^2$ (actually, modulo some lines, which have zero Lebesgue measure). Thus, our first identity holds with $q=\mathbf 1_{[0,1]}$, that is:

If $(X,Y)$ is uniformly distributed on $D$, then $X$ and $Y$ are both uniformly distributed on $[0,1]$, $(X,Y)$ is not independent, and, for every function $f$, $E[f(X)f(Y)]=E[f(X)]E[f(Y)]$.

Note that $(X,Y)$ can be constructed as follows. Let $U$ and $V$ be i.i.d. uniform on $[0,1]$, then $(X,Y)=(U,V)$ if $(U,V)$ is in $D$, else $(X,Y)=(V,U)$.

An analogue of this in the discrete setting is to consider $(X,Y)$ with joint distribution on the set $\{a,b,c\}^2$ described by the matrix $$ \frac19\begin{pmatrix}1&2&0\\0&1&2\\2&0&1\end{pmatrix}. $$ Then the random set $\{X,Y\}$ is distributed like $\{U,V\}$ where $U$ and $V$ are i.i.d. uniform on $\{a,b,c\}$. For example, considering $S=\{(a,b),(b,a)\}$, one sees that $$ P[(X,Y)\in S]=\tfrac29=P[(U,V)\in S], $$ since $[(X,Y)\in S]=[(X,Y)=(a,b)]$, while $$ P[(U,V)\in S]=P[(U,V)=(a,b)]+P[(U,V)=(b,a)]=\tfrac19+\tfrac19. $$ Thus, $$ E[f(X)f(Y)]=E[f(U)f(V)]=E[f(U)]E[f(V)]=E[f(X)]E[f(Y)]. $$ This example can be extended to any sample space of odd size. A more general distribution on $\{a,b,c\}^3$ is, for every $|t|\leqslant1$, $$ \frac19\begin{pmatrix}1&1+t&1-t\\1-t&1&1+t\\1+t&1-t&1\end{pmatrix}. $$

-1

The relation $E[XY]=E[X]E[Y]$ holds if and only if the covariance of $X$ and $Y$ is zero, that is, $X$ and $Y$ are uncorrelated.

So, you are actually asking is there dependent but uncorrelated random variables $X$ and $Y$ such that every function $f$ would preserve the uncorrelatedness.

Consider a function $f(x) = a$, where $a$ is some constant. Now, $f(X) = a$ and $f(Y) = a$, and therefore $f(X)$ and $f(Y)$ are correlated. Thus, the answer to your question is that there are no such variables.

  • 0
    But $a^2=E[a^2]=E[f(X)f(Y)]$ and $a^2=aa=E[f(X)]E[f(Y)]$ so it still holds2012-11-30
  • 1
    *therefore f(X) and f(Y) are correlated*... The opposite holds: these are **UN-** correlated. (Upvoters: why the upvote?)2013-07-17
-2

If you take dependent random variables $X$ and $Y$, and set $X^{'} = X - E[X]$ and $Y^{'} = Y - E[Y]$, then $E[f(X^{'})f(Y^{'})]=E[f(X^{'})]E[f(Y^{'})]=0$ as long as $f$ preserves the zero expected value. I guess you cannot show this for all $f$.

-5

If $X$ and $Y$ are dependent then this equality can not hold for every function $f$.You may find some $f$ such that this is true but not for all $f$. This is by definition of independent random variables.

  • 3
    How is this by definition? There's a definition which specifies that if for every f,g this holds (replacing one f with g in the original message) then they're independent. Here it's a weaker condition.2012-11-26