# 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
