Example of two dependent random variables that satisfy $E[f(X)f(Y)]=Ef(X)Ef(Y)$ for every $f$ 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...
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} &amp; 0 &amp; \frac{1}{5}  \\ 
\frac{1}{5} &amp; \frac{1}{10} &amp; 0  \\ 
 \frac{1}{30} &amp; \frac{7}{30} &amp; \frac{2}{15}  
\end{matrix}
\right)=
\left(
\begin{matrix}
\frac{3}{30} &amp; 0 &amp; \frac{6}{30}  \\ 
\frac{6}{30} &amp; \frac{3}{30} &amp; 0  \\ 
 \frac{1}{30} &amp; \frac{7}{30} &amp; \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}) &gt;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)) &amp;=&amp; \frac{3(x+y)+4z}{10} \\
{\mathbf E}(f(Y)) &amp;=&amp; \frac{x+y+z}{3} \\
{\mathbf E}(f(X)){\mathbf E}(f(Y)) &amp;=&amp; \frac{3(x+y)^2+7(x+y)z+4z^2}{30} \\
{\mathbf E}(f(X)f(Y)) &amp;=&amp;  \frac{3x^2+6xy+3y^2+7xz+7yz+4z^2}{30} \\
\end{array}
$$

The last two are equal, qed.
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.