A Variance/covariance rules
If \(C\) is constant, then
\[ Var\left(C\right) = 0 \]
If \(X_{1}\) and \(X_{2}\) are independent, then
\[ Var\left(X_{1} + X_{2}\right) = Var\left(X_{1}\right) + Var\left(X_{2}\right) \]
Consequence of Rule 1 and Rule 2:
\[ Var\left(X + C\right) = Var\left(X\right) \]
If \(X_{1}\) and \(X_{2}\) are independent, then
\[ Var\left(X_{1} - X_{2}\right) = Var\left(X_{1}\right) + Var\left(X_{2}\right) \]
If \(a\) is any number,
\[ Var\left(aX\right) = a^2 Var\left(X\right) \] Related to this rule is the corresponding one for standard deviations:
\[ SD\left(aX\right) = \left| a \right| SD\left(X\right) \]
\[ Cov(X, X) = Var(X) \]
\[ Cov\left(X_{1}, X_{2}\right) = Cov\left(X_{2}, X_{1}\right) \]
If \(C\) is constant, then
\[ Cov\left(X, C\right) = 0 \]
\[ Cov\left(X_{1} + X_{2}, X_{3}\right) = Cov\left(X_{1}, X_{3}\right) + Cov\left(X_{2}, X_{3}\right) \]
\[ Cov\left(X_{1} - X_{2}, X_{3}\right) = Cov\left(X_{1}, X_{3}\right) - Cov\left(X_{2}, X_{3}\right) \]
Consequence of Rule 6, Rule 8, and Rule 9:
\[ Cov\left(X_{1}, X_{2} \pm X_{3}\right) = Cov\left(X_{1}, X_{2}\right) \pm Cov\left(X_{1}, X_{3}\right) \]
If \(a\) is any number,
\[ Cov\left(a X_{1}, X_{2}\right) = a Cov\left(X_{1}, X_{2}\right) = Cov\left(X_{1}, a X_{2}\right) \]
If \(X_{1}\) and \(X_{2}\) are independent, then
\[ Cov\left(X_{1}, X_{2}\right) = 0 \]
For any two variables \(X_{1}\) and \(X_{2}\):
\[ Var(aX_{1} + bX_{2}) = a^2Var(X_{1}) + b^2Var(X_{2}) + 2abCov(X_{1}, X_{2}) \]
For any three variables \(X_{1}\), \(X_{2}\), and \(X_{3}\):
\[\begin{align} Var(aX_{1} + bX_{2} + cX_{3}) &= a^2Var(X_{1}) + b^2Var(X_{2}) + c^2Var(X_{3}) \\ & \quad + 2abCov(X_{1}, X_{2}) \\ & \quad + 2acCov(X_{1}, X_{3}) \\ & \quad + 2bcCov(X_{2}, X_{3}) \end{align}\]
This can be extended to any number of variables. Each variance appears with a coefficient squared and each pair of variables gets a covariance term with 2 times the product of the corresponding variable coefficients.