Calculate the covariance of two discrete uniformly distributed RVs

766 Views Asked by At

I am working on the following exercise:

Let $X,Y$ be two discrete uniform and independent RVs. Show by COMPUTATION that $Cov(X, Y ) = 0$.

We defined $Cov(X,Y) := E(XY)-E(X)E(Y)$. I know that $E(X) = \frac{n+1}{2}$, but I do not know how to compute $E(XY)$ in this general setting with the sum definition of $E(X)$. Is there a trick?

2

There are 2 best solutions below

0
On BEST ANSWER

Let's start from the definition of covariance.

$$ \text{Cov}(X, Y) = \mathbb{E}[XY] - \mathbb{E}[X]\mathbb{E}[Y] $$

Recall the definition of expectation, which, in the case of continuous variables, can be expressed as follows:

$$ \mathbb{E}[X] = \int_{x \in \chi} x f(x) \, dx $$

where $f(x)$ denotes the probability density function for the random variable.

Let $X \sim U(a, b)$ and $Y \sim U(c, d)$. Then, we can apply the definition of expectation to rewrite covariance as

$$ \text{Cov}(X, Y) = \int_a^b \int_c^d x y f_x(x) f_y(y) \, dx \, dy - \int_a^b x f_x(x) \, dx \int_c^d y f_y(y) \, dy $$

Because the two RVs are independent, we can see how the nested integral can be rearranged into the second term, resulting in zero.

0
On

Hint: Use the Law of Total Expectation.

$\begin{align}\qquad\mathsf{Cov}(X,Y)&=\mathsf E(XY)-\mathsf E(X)\,\mathsf E(Y)\\&=\mathsf E(\mathsf E(XY\mid X))-\mathsf E(X)\,\mathsf E(Y)\\&~~\vdots\\&=\mathsf E(X)\,\mathsf E(Y)-\mathsf E(X)\,\mathsf E(Y)\\&=0 \end{align}$

Also use: Linearity of Expectation and Independence.