Means and Variances of Linear Combinations of Random Variables
In probability theory and statistics, linear combinations of random variables are common in various contexts, such as in regression analysis, portfolio theory, and signal processing. Understanding how the mean and variance behave for these linear combinations is crucial for analyzing the outcomes of such combinations.
1. Linear Combination of Random Variables
A linear combination of random variables is an expression that involves the random variables and constants (coefficients). For two random variables X1 and X2, a linear combination can be written as:
Z=aX1+bX2+c
where:
- a and b are constants (scalars),
- X1 and X2 are random variables, and
- c is a constant (can be thought of as a shift).
More generally, for n random variables X1,X2,…,Xn, a linear combination is:
Z=a1X1+a2X2+⋯+anXn+c
where a1,a2,…,an are constants (coefficients) and c is also a constant.
2. Mean of a Linear Combination
The mean (or expected value) of a linear combination of random variables is computed using the linearity of expectation. The expected value of a linear combination of random variables is the linear combination of their expected values. Specifically:
E[Z]=E[a1X1+a2X2+⋯+anXn+c]
Using the linearity of expectation:
E[Z]=a1E[X1]+a2E[X2]+⋯+anE[Xn]+c
This property holds regardless of whether the random variables X1,X2,…,Xn are independent or not.
Example:
Suppose you have two random variables X1 and X2 with the following expected values:
- E[X1]=3
- E[X2]=5
Now, consider the linear combination Z=2X1−3X2+4. The expected value of Z is:
E[Z]=2E[X1]−3E[X2]+4
E[Z]=2(3)−3(5)+4=6−15+4=−5
So, the expected value of Z is -5.
3. Variance of a Linear Combination
The variance of a linear combination of random variables depends on both the variances of the individual random variables and the covariances between them. For two random variables X1 and X2, the variance of Z=a1X1+a2X2 is given by:
Var(Z)=Var(a1X1+a2X2)
Using the properties of variance, we can expand this as:
Var(Z)=a12Var(X1)+a22Var(X2)+2a1a2Cov(X1,X2)
If there are more than two random variables (say, X1,X2,…,Xn), the variance of the linear combination Z=a1X1+a2X2+⋯+anXn becomes:
Var(Z)=a12Var(X1)+a22Var(X2)+⋯+an2Var(Xn)+2i<j∑aiajCov(Xi,Xj)
This formula accounts for the variance of each random variable as well as the covariance between each pair of random variables.
Key Points:
- The variance of a linear combination depends on the coefficients of the random variables, their individual variances, and the covariances between the variables.
- The covariance term captures how the random variables co-vary, and it will influence the total variance if the variables are not independent.
Example:
Suppose we have two random variables X1 and X2 with the following properties:
- Var(X1)=4
- Var(X2)=9
- Cov(X1,X2)=3
Now, consider the linear combination Z=2X1−3X2. The variance of Z is:
Var(Z)=22Var(X1)+(−3)2Var(X2)+2(2)(−3)Cov(X1,X2)
Var(Z)=4×4+9×9+2×2×(−3)×3
Var(Z)=16+81−36=61
So, the variance of Z is 61.
4. Special Cases: Independent Random Variables
If the random variables X1,X2,…,Xn are independent, then the covariance between any pair of variables is zero, i.e., Cov(Xi,Xj)=0 for i=j. In this case, the variance of the linear combination simplifies to:
Var(Z)=a12Var(X1)+a22Var(X2)+⋯+an2Var(Xn)
In the case of independent random variables, we only need to consider the individual variances, not the covariances.
Example (Independent Case):
If X1 and X2 are independent, with Var(X1)=4 and Var(X2)=9, and the linear combination is Z=2X1−3X2, the variance is:
Var(Z)=22Var(X1)+(−3)2Var(X2)
Var(Z)=4×4+9×9=16+81=97
Thus, the variance of Z in the case of independent random variables is 97.
5. Summary of Formulas
- Mean of a Linear Combination:
For random variables X1,X2,…,Xn and constants a1,a2,…,an, the expected value of the linear combination Z=a1X1+a2X2+⋯+anXn+c is:
E[Z]=a1E[X1]+a2E[X2]+⋯+anE[Xn]+c
- Variance of a Linear Combination:
For random variables X1,X2,…,Xn with coefficients a1,a2,…,an, the variance of the linear combination Z=a1X1+a2X2+⋯+anXn is:
Var(Z)=a12Var(X1)+a22Var(X2)+⋯+an2Var(Xn)+2i<j∑aiajCov(Xi,Xj)
- If X1,X2,…,Xn are independent, the covariance terms drop out, and the variance simplifies to:
Var(Z)=a12Var(X1)+a22Var(X2)+⋯+an2Var(Xn)
Conclusion
The mean and variance of linear combinations of random variables are important tools for understanding the behavior of sums, differences, and weighted combinations of random variables. The expected value of a linear combination is simply the linear combination of the expected values, while the variance involves not only the individual variances but also the covariances between the random variables. When the variables are independent, the covariance terms disappear, simplifying the calculation of variance.