Question about definition of covariance

41 Views Asked by At

I wanted to confirm my understanding of covariance.

Let there be the random variables $X$ and $Y$ and their joint PDF $f_{X, Y}$.

Their covariance is given as $\mathbb E[(X - \mu_X) \cdot (Y - \mu_Y)]$.

And we can write... $$\mathbb E[(X - \mu_X) \cdot (Y - \mu_Y)]$$ $$= \int_{X} \int_{Y}(x - \mu_X) \cdot (y - \mu_Y) \cdot f_{X, Y}(x, y) \, \mathrm dy \, \mathrm dx$$

Is this all correct?

EDIT: I meant to say $$\int_{\mathbb R} \int_{\mathbb R}(x - \mu_X) \cdot (y - \mu_Y) \cdot f_{X, Y}(x, y) \, \mathrm dy \, \mathrm dx$$

1

There are 1 best solutions below

0
On

No. If $$X,Y:(\Omega,\mathscr{A})\to (\mathbb{R},\mathscr{B}(\mathbb{R}))$$ are two random variables with $X,Y\in L^2(\mathbb P)$, then the covariance is $$\int_\Omega X(\omega)Y(\omega)\mathbb{P}(d\omega)-\mathbb{E}X\mathbb{E}Y=\int_\mathbb{R^2} xy ~\mathbb P_{(X,Y)}(d(x,y))-\mathbb{E}X\mathbb{E}Y$$

If $(X,Y)$ has a density $f_{(X,Y)}(x,y)$ with respect to the Lebesgue measure, then $$\int_{\mathbb R^2}xy~\mathbb{P}_{(X,Y)}\left(d(x,y)\right)=\int_\mathbb{R^2}xy\cdot f_{(X,Y)}(x,y) \lambda(dx,dy)=\int_{\mathbb{R}}\int_\mathbb R xy \cdot f_{(X,Y)}(x,y) ~dx dy$$ in the last step we used Fubini-Tonelli.

We require $X,Y\in L^2(\mathbb P)$ so that the product $XY$ is integrable.