# On polynomial functions of random variables and independence

Suppose $Y_1, Y_2$ are independent real-valued random variables and whose distributions have a density with respect to the Lebesgue measure. Assume that all moments $\mathbb{E}Y_1^a, \mathbb{E}Y_2^b$ exist and are finite. Let $p(y_1,y_2)$ be any polynomial whose degree with respect to $y_1$ is positive.

Is it true that the random variables $p(Y_1,Y_2)$ and $Y_1$ cannot be independent?

For instance, if $p(y_1,y_2) = y_1y_2,$ and if $Z:=p(Y_1,Y_2) = Y_1Y_2,$ then independence of $Z$ and $Y_1$ would imply that $\mathbb{E}Z^2Y_1^2 = \mathbb{E}Z^2\mathbb{E}Y_1^2$ and independence of $Y_1$ and $Y_2$ gives $\mathbb{E}Y_1^4.\mathbb{E}Y_2^2 = (\mathbb{E}Y_1^2)^2\mathbb{E}Y_2^2.$ Since $Y_2$ has a density, we have $\mathbb{E}Y_2^2>0$ and so, we get $\mathsf{Var}(Y_1^2) = 0.$ This implies $|Y_1|$ is a constant which is impossible for a continuous-valued random variable $Y_1$ possessing a density. This produces a contradiction and hence, $Z$ and $Y_1$ cannot be independent.

-

Let $q(y_1,y_2)=(p(y_1,y_2))^2$. Then the leading coefficient in $q$, as a polynomial in $y_1$ is a polynomial $r(y_2)$ which is a square. Since $Y_2$ is not supported on $r^{-1}(0)$ (which is finite), we have $\mathbb{E}_{Y_2}[r(Y_2)]>0$.
In particular, this means that the expectation $$f(y)=\mathbb{E}_{Y_2}[q(y,Y_2)]$$ is a nonconstant polynomial in $y$. Hence, $f(Y_1)$ can be a constant random variable only if $Y_1$ is supported on a finite set, namely $f^{-1}(c)$ for some $c$.