If I have a vector of random variables, X = [ X1, X2, X3, X4 ]
Marginalizing the probability density function can be done by integrating the PDF with respect to the variables you want to remove:
A multivariate Gaussian PDF with mean vector, μ, and covariance matrix, C, is given as:
How would I marginalize this multivariate Gaussian PDF with mean vector and a covariance matrix? Would I approach it like this?:
Would the matrix C and vector μ be treated as constants that can be moved outside the integrals?
Is there an easier way to do this?
Best Answer
The matrix $\mathbf{C}$ and the vector $\mathbf{\mu}$ are in deed constants, but, because they appear multiplying the vector $\mathbf{x}$, of which the entries $x_1$ and $x_4$ are our variables, they cannot be removed from the integral.
The standard way to do this is to expand the quadradic form inside the exponential and separate everything that does not involve $x_1$ and $x_4$ in a big constant term. ''Constant'', because it does not depend on $x_1$ and $x_4$. Now, the trick is to realize that we do not need to calculate this constant term. This is because the result we get from those integrals must be a density, i.e., it must integrate $1$.
Therefore, to find out what is the joint distribution of $x_1$ and $x_4$, we must look only at the part that depends on those variables, and see what kind of distribution family that density is in (spoiler: $x_1$ and $x_4$ will have a bivariate gaussian distribution).
This is easier seen if you give explicit values to $\mathbf{C}$ and $\mathbf{\mu}$.