# 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.

Given $\newcommand{\Var}{\mathrm{Var}}\Var(X)$, and $\Var(Y)$, what are the boundaries for the values of $\newcommand{\Cov}{\mathrm{Cov}}\Cov(X, Y)$ I can select for the 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. Commented Dec 8, 2012 at 0:43

In the multivariate case, you can use what is called the multivariate Cauchy-Schwarz inequality: $$\newcommand{\Var}{Var} \newcommand{\Cov}{Cov} \Var(z) \ge \Cov(z,y) \Var(y)^{-1} \Cov(y,z)$$ Where here the inequality sign must be interpreted in the sense of the partial order on the cone of positive-definite matrices: $A \le B$ means that $B-A$ is positive definite.