# Bounds on Cov(X, Y) given Var(X), Var(Y)?

I'm generating random multivariate normal data using the rmultnorm() function in R, which allows users to specify a vector of $k$ population means and a $k \times k$ variance-covariance matrix.


Does it make sense to use the property:

\begin{align}\Var(X) + \Var(Y) = \Var(X+Y) - 2\Cov(X,Y)\end{align}

and the Pearson correlation coefficient equation:

\begin{align}-1 \leq \frac{\Cov(X,Y)}{\sqrt{\Var(X)\Var(Y)}} \leq 1 \end{align}

to set upper/lower bounds on $\Cov(X,Y)$?

• Multiply your second inequality by the denominator. Those are your bounds if you only have two variables. If you have k>2, you need the covariance matrix to be positive definite to generate like that (unless it's written especially cleverly, in which case it can be positive semidefinite). There are a variety of ways to get a positive semidefinite matrix; one common way is via working with its choleski decomposition. – Glen_b Dec 8 '12 at 0:43

For a single covariance you only need the bottom equation. The bounds are that the covariance cannot be greater than the product of the standard deviations (and cannot be less than the negative of the same value). However for a covariance matrix of more than 2 terms there is an additional limit, the matrix has to be positive semi-definite (or positive definite in some cases). This eliminates cases like X and Y are strongly positively correlated and X and Z are strongly possitively correlated, but Y and Z are strongly negatively correlated (this does not work in the real world, but could still fit the pairwise bounds). One way to check this is that if all the eigen values are positive then it is postive definite and if the eigen values are all non-negative then it is positive semi-definite.

• Cool, thanks Greg - I'll run the eigen() function to make sure my variance-covariance matrices don't violate the positive-definite limit. – RobertF Dec 7 '12 at 22:17
