# Functions of independent random variables are independent

Since functions of independent random variables are independent, can I say that:

1. if $X$ and $Y$ independent then $X$ and $1/Y$ are independent.
2. If $X$ is normal, then $X$ is independent of its square (a chi square variate)

I am confused whether the functions should be one-one.

• (1) Yes (2) No. $X$ and its square $X^2$ are not independent.Having a different distribution is not the same as being independent. – StijnDeVuyst Dec 15 '16 at 7:59
• If X and Y are independent then f(X) is independent of g(Y). f and g could be the same function. But X and X are clearly perfectly dependent. So what does that say about X and 1/X? Say X=2 then 1/X=1/2. – Michael Chernick Dec 15 '16 at 8:00
• (1) is immediate, because $X$ is a function of $X$ and $1/Y$ is a function of $Y$. – whuber Dec 15 '16 at 16:03

## 2 Answers

Yes to (1) and no to (2). Let me explain.

1. The reasoning is from the transformation theorem. This is it generally. Assume you have two original random variables $X_1$ and $X_2$, along with their joint density $f_{X_1,X_2}(x_1,x_2)$. The transformation theorem gives you the joint density of two new random variables $Y_1 = g_1(X_1,X_2)$ and $Y_2 = g_2(X_1,X_2)$. Assume that these $g_i$s are smooth enough to possess the derivatives I write down:

$$g_{Y_1,Y_2}(y_1,y_2) = f_{X_1,X_2}(x_1[y_1,y_2],x_2[y_1,y_2])|\det(J)|$$ where $J = \left( \begin{array}{cc} \frac{\partial x_1}{\partial y_1} & \frac{\partial x_1}{\partial y_2} \\ \frac{\partial x_2}{\partial y_1} & \frac{\partial x_2}{\partial y_2} \end{array} \right).$

1. Now assume that $X_1$ and $X_2$ start off to be independent. This is your case you're dealing with. That means $f_{X_1,X_2}(x_1,x_2) = f_{X_1}(x_1)f_{X_2}(x_2)$. Also, if you only make $Y_1$ a function of $X_1$ and only make $Y_2$ a function of $X_2$, then $J$ is diagonal, right? Now plug that stuff into the general new density and you'll see why $Y_1$ and $Y_2$ are still independent:

\begin{align*} g_{Y_1,Y_2}(y_1,y_2) &= f_{X_1,X_2}(x_1[y_1,y_2],x_2[y_1,y_2])|\det(J)| \\ &= f_{X_1}(x_1[y_1,y_2])f_{X_2}(x_2[y_1,y_2]) |\frac{\partial x_1}{\partial y_1}\frac{\partial x_2}{\partial y_2}| \\ &= f_{X_1}(x_1[y_1,y_2])|\frac{\partial x_1}{\partial y_1}| f_{X_2}(x_2[y_1,y_2]) |\frac{\partial x_2}{\partial y_2}| \end{align*}

Still factors. Hence $Y_1$ is independent of $Y_2$.

1. The functions $g_i$ don't need to be one-to-one, but you'd have to use the more beefed up version of the transformation to justify it. Same idea would apply, though.

Edit: @Whuber linked to a good thread that shows one of his answers demonstrating the same result using sigma fields, which is much more elegant and more generally applicable. His version always works, as long as the transformations are measurable, while mine only works for continuous random variables and certain types of transformations.

Regarding your second example where you ask about a random variable $X$ and it's square $X^2$: "[s]ince[sic] functions of independent random variables are independent"...neither of these answers will apply. Also you need to qualify what type of functions you're talking about.

With the way I understood your question, your second point seemed to be trying to come up with a sort of counterexample to help you better understand your situation. This is why I didn't really address it. But the reason it's false is because $p(X^2|X=x)$ is discrete with all of its mass on $x^2$, while the marginal $p(X^2)$ is continuous (chi-square). So they're obviously very different.

• This is nice but doesn't explain why X and 1/X are dependent does it? – Michael Chernick Dec 15 '16 at 8:45
• You mean $X$and $1/Y$. And it does, but I kindness of changed the notation a bit ad added subscripts for random variables. – Taylor Dec 15 '16 at 14:05
• No it was X and 1/X being dependent. – Michael Chernick Dec 15 '16 at 14:57
• Using this machinery seems like overkill as well as being unnecessarily limited, given that these properties of independence do not require the variables to have distributions at all. They have been addressed generally at stats.stackexchange.com/questions/94872, so the only new question here is #2--which you don't seem to have answered. – whuber Dec 15 '16 at 16:04

(1) If $X$ and $Y$ are independent then $g(X)$ and $f(Y)$ are independent for any function $g, f$.

(2) if $E(X) = 0$ then $X$ and $X^2$ are uncorrelated but of course they're not independent under any circumstances.

• I wonder if (2) would better begin "Only if...". – gung Dec 26 '16 at 1:20