# the covariance of an odd/even function

m and z have the following PDF:

$f(m,z) = (2\pi^3)^{-1/2}*(m^2+z^2)^{-1/2}*e^{-(m^2+z^2)/2}$

I want to find whether m and z are independent which I'll show through the covariance, which is E[mz]-E[m]E[z]. I know that $E[mz] = 0$ because f(m,z) is an odd function.

The E[z] is = $\int_{-\infty}^{\infty} {1 \over \,\sqrt{\,2\pi^{3}\,}\,} e^{-m^2/2}$ [ $\int_{-\infty}^{\infty} z*(m^2+z^2)^{-1/2} e^{-m^2/2}dz$]dm

which also equals 0. Meaning that m and z have 0 covariance and independent.

Can I extrapolate from this and assume that any odd function (or even function) is always independent with 0 covariance?

## 1 Answer

Hang on, your joint density isn't odd, it's even in its two arguments. This is enough to imply that the covariance is zero. Actually, being even in one argument for every choice of the other argument is enough to deduce zero covariance: if $f(m,z)=f(-m,z)$ for every $m$ and $z$, then

$$E(M)=\int mf(m) dm = \int m\left( \int f(m,z)dz\right)dm = \int \left(\int mf(m,z)dm\right)dz = 0$$ and $$E(MZ)=\iint mz f(m,z)dm\,dz = \int z\left(\int mf(m,z)dm\right)dz = 0.$$

But recall that zero covariance by itself doesn't imply independence. It looks like your joint density doesn't factor into the product of its marginal densities, so your variables are not independent.

• Could you explain that last bit a bit more? – nodel Oct 27 '16 at 21:53
• Calculate $f_M(m):=\int f(m,z)dz$ and $f_Z(z):=\int f(m,z)dm$. Then the variables $M, Z$ are independent if and only if $f(m,z)=f_M(m)f_Z(z)$. It doesn't look like this is the case for your $f$, so I conclude you don't have independence. – grand_chat Oct 27 '16 at 21:55
• As for zero covariance not implying independence, see for example stats.stackexchange.com/questions/12842/… – grand_chat Oct 27 '16 at 21:57
• I was wondering, is my equation for the E[z] correct? – nodel Oct 28 '16 at 3:23
• Correct, except you should write $m$ instead of $x$. – grand_chat Oct 28 '16 at 15:58