Final answer:
Cov(X, Y) = -27, Cov(X, Z) = -31.5.
Step-by-step explanation:
Cov(X, Y):
Let's start by calculating the covariance between X and Y.
Cov(X, Y) = E[(X - E[X])(Y - E[Y])]
Since X and Y are defined as X = first roll minus second roll, and Y = sum of the two rolls:
X = X1 - X2
Y = X1 + X2
Substituting these values into the covariance formula:
Cov(X, Y) = E[(X1 - X2 - E[X1 - X2])(X1 + X2 - E[X1 + X2])]
Cov(X, Y) = E[(X1 - X2 - 0)(X1 + X2 - E[2X1])]
Cov(X, Y) = E[(X1 - X2)(X1 + X2 - 2E[X1])]
Cov(X, Y) = E[(X1 - X2)(X1 + X2 - 2(4.5))]
Cov(X, Y) = E[(X1 - X2)(X1 + X2 - 9)]
Since the two rolls are independent, we can use the linearity of the expectation:
Cov(X, Y) = E[X1^2 - X1X2 + X1X2 - X2^2 - 9X1 + 9X2]
Cov(X, Y) = E[X1^2 - X2^2 - 9X1 + 9X2]
Using the fact that X1 and X2 are each rolled on an 8-sided die, their expected values are both equal to (1 + 2 + ... + 8) / 8 = 4.5:
Cov(X, Y) = E[X1^2 - X2^2 - 9X1 + 9X2]
Cov(X, Y) = E[X1^2] - E[X2^2] - 9E[X1] + 9E[X2]
Since the expected value of a roll on an 8-sided die is 4.5, we have:
Cov(X, Y) = E[X1^2] - E[X2^2] - 9(4.5) + 9(4.5)
Since X1 and X2 are independent identically distributed random variables, we have:
Cov(X, Y) = E[X^2] - E[X^2] - 9(4.5) + 9(4.5)
Cov(X, Y) = Var(X) - 0 - 9(4.5) + 9(4.5)
Since X is the sum of two rolls on an 8-sided die, its variance can be calculated as follows:
Var(X) = Var(X1 + X2) = Var(X1) + Var(X2) = (1/3) + (1/3) = 2/3
Substituting this value back into the covariance formula:
Cov(X, Y) = Var(X) - 0 - 9(4.5) + 9(4.5)
Cov(X, Y) = 2/3 - 0 - 9(4.5) + 9(4.5)
Cov(X, Y) = -27
Cov(X, Z):
Now, let's calculate the covariance between X and Z.
Cov(X, Z) = E[(X - E[X])(Z - E[Z])]
Since X and Z are defined as X = first roll minus second roll, and Z = 2 times the first roll, minus the second roll:
X = X1 - X2
Z = 2X1 - X2
Substituting these values into the covariance formula:
Cov(X, Z) = E[(X1 - X2 - E[X1 - X2])(2X1 - X2 - E[2X1 - X2])]
Cov(X, Z) = E[(X1 - X2 - 0)(2X1 - X2 - E[2X1])]
Cov(X, Z) = E[(X1 - X2)(2X1 - X2 - 2E[X1])]
Cov(X, Z) = E[(X1 - X2)(2X1 - X2 - 2(4.5))]
Cov(X, Z) = E[(X1 - X2)(2X1 - X2 - 9)]
Using the linearity of the expectation:
Cov(X, Z) = E[2X1^2 - X1X2 - 2X2X1 + X2^2 - 9X1 + 2X2]
Cov(X, Z) = E[2X1^2 - 2X2X1 - 9X1 + 2X2]
Using the same logic as before, the expected value of a roll on an 8-sided die is 4.5, so we have:
Cov(X, Z) = E[2X1^2 - 2X2X1 - 9X1 + 2X2]
Cov(X, Z) = E[2X^2 - 2X2 - 9X1 + 2X2]
Since X1 and X2 are independent identically distributed random variables, we have:
Cov(X, Z) = E[2X^2 - 2X^2 - 9X1 + 2X2]
Cov(X, Z) = E[-9X1 + 2X2]
Again, since X1 and X2 are independent identically distributed random variables, we have:
Cov(X, Z) = -9E[X1] + 2E[X2]
Substituting the expected values of X1 and X2:
Cov(X, Z) = -9(4.5) + 2(4.5)
Cov(X, Z) = -40.5 + 9
Cov(X, Z) = -31.5