Probability density function and formula and covariance calculation

680 Views Asked by At

This is a simple question on how the covariance of a vector of random variables is calculated from the joint probability density function.

Let $X = [X_1,X_2,...,X_n]$ be a vector of random variables with a joint probability density function $\rho(X) = \rho(x_1,x_2,...,x_n)$.

Say we want to calculate the covariance $\text{Cov}(X_i,X_j)$. It is given as $$\text{Cov}(X_i,X_j) = \text{E}(X_i-\mu_i)(X_j - \mu_j),$$ where $\mu_i = E(X_i)$ etc..

I understand this to mean \begin{align} \text{E}(X_i-\mu_i)(X_j - \mu_j)= \int_{-\infty}^\infty \int_{-\infty}^\infty (x_i - \mu_i)(x_j - \mu_j) \rho(x_i,x_j) \mathrm{d}x_i \mathrm{d}x_j. \end{align}

My questions are if this is the correct expression for the covariance formula, and how the density $\rho(x_i,x_j)$ is obtained from the "full" joint density $\rho(X)$?

For the latter, my guess is that this is by marginalization, but I cannot find it stated explicitly anywhere and I just want to be sure I understand it correctly.

1

There are 1 best solutions below

0
On

The formula is correct. You can compute $\rho(x_i,x_j)$ by integrating the joint density w.r.t. all the remaining $x_k$'s.