# College Math Teaching

## November 1, 2016

### A test for the independence of random variables

Filed under: algebra, probability, statistics — Tags: , — collegemathteaching @ 10:36 pm

We are using Mathematical Statistics with Applications (7’th Ed.) by Wackerly, Mendenhall and Scheaffer for our calculus based probability and statistics course.

They present the following Theorem (5.5 in this edition)

Let $Y_1$ and $Y_2$ have a joint density $f(y_1, y_2)$ that is positive if and only if $a \leq y_1 \leq b$ and $c \leq y_2 \leq d$ for constants $a, b, c, d$ and $f(y_1, y_2)=0$ otherwise. Then $Y_1, Y_2$ are independent random variables if and only if $f(y_1, y_2) = g(y_1)h(y_2)$ where $g(y_1), h(y_2)$ are non-negative functions of $y_1, y_2$ alone (respectively).

Ok, that is fine as it goes, but then they apply the above theorem to the joint density function: $f(y_1, y_2) = 2y_1$ for $(y_1,y_2) \in [0,1] \times [0,1]$ and 0 otherwise. Do you see the problem? Technically speaking, the theorem doesn’t apply as $f(y_1, y_2)$ is NOT positive if and only if $(y_1, y_2)$ is in some closed rectangle.

It isn’t that hard to fix, I don’t think.

Now there is the density function $f(y_1, y_2) = y_1 + y_2$ on $[0,1] \times [0,1]$ and zero elsewhere. Here, $Y_1, Y_2$ are not independent.

But how does one KNOW that $y_1 + y_2 \neq g(y_1)h(y_2)$?

I played around a bit and came up with the following:

Statement: $\sum^{n}_{i=1} a_i(x_i)^{r_i} \neq f_1(x_1)f_2(x_2).....f_n(x_n)$ (note: assume $r_i \in \{1,2,3,....\}, a_i \neq 0$

Proof of the statement: substitute $x_2 =x_3 = x_4....=x_n = 0$ into both sides to obtain $a_1 x_1^{r_1} = f_1(x_1)(f_2(0)f_3(0)...f_n(0))$ Now none of the $f_k(0) = 0$ else function equality would be impossible. The same argument shows that $a_2 x_2^{r_2} = f_2(x_2)f_1(0)f_3(0)f_4(0)...f_n(0)$ with none of the $f_k(0) = 0$.

Now substitute $x_1=x_2 =x_3 = x_4....=x_n = 0$ into both sides and get $0 = f_1(0)f_2(0)f_3(0)f_4(0)...f_n(0)$ but no factor on the right hand side can be zero.

This is hardly profound but I admit that I’ve been negligent in pointing this out to classes.