Suppose I have two dice : $D_1$ and $D_2$. Both $D_1$ and $D_2$ have 6 sides.
- If $D_1$ = 1, there is a $1/6$ probability that $D_2$ will take any number from 1 to 6
- If $D_1$ = 2, there is a $1/6$ probability that $D_2$ will take any number from 1 to 6
- If $D_1$ = 3, there is a $1/6$ probability that $D_2$ will take any number from 1 to 6
- If $D_1$ = 4, there is a $1/6$ probability that $D_2$ will take any number from 1 to 6
- If $D_1$ = 5, there is a $1/6$ probability that $D_2$ will take any number from 1 to 6
- If $D_1$ = 6, there is a $1/2$ probability that $D_2$ will be 6, and a $1/2$ probability that $D_2$ take any number from 1 to 5 (divided equally)
My Problem: Let's define a Random Variable called $Z$ such that $Z$ = $D_1$ + $D_2$ (i.e. sum of the rolls from both dice). I am interested in finding out a probability distribution of $Z$ so that I can find out the Expected Value of $Z$, i.e. $E(Z)$ and the Variance of $Z$, i.e. $Var(Z)$.
Here is what I tried so far:
Part 1: To begin this question, I first wrote the Probability Mass Function of $Z=z$ (here $X$ is the result of the first roll and $Y$ is the result of the second roll):
\begin{align*} P(Y = j | X = i) = \begin{cases} 0.5 & \text{if } i = 6 \text{ and } j = 6 \\ \frac{1}{10} & \text{if } i = 6 \text{ and } j \neq 6 \\ \frac{1}{6} & \text{if } i \neq 6 \end{cases} \end{align*}
Part 2: Then, I extended this concept to the Expected Value :
$$E(Z) = \sum_{i=1}^{6} \sum_{j=1}^{6} P(X = i, Y = j | X = i) \cdot [i + j = z]$$
$$E(Z^2) = \sum_{i=1}^{6} \sum_{j=1}^{6} P(X = i, Y = j | X = i) \cdot [i + j = z]^2$$
Part 3: Here, there will be covariance in certain cases. Since $Cov(X,Y) = E(XY) - E(X)E(Y)$, I can write:
$$E(XY) = \sum_{i=1}^{6} \sum_{j=1}^{6} P(X = i, Y = j | X = i) \cdot (i \cdot j)$$ $$E(X)E(Y) = \left(\sum_{i=1}^{6} P(X = i) \cdot i\right) \cdot \left(\sum_{j=1}^{6} P(Y = j | X = i) \cdot j\right)$$ $$Cov(X,Y) = E(XY) - E(X)E(Y) = \sum_{i=1}^{6} \sum_{j=1}^{6} P(X = i, Y = j | X = i) \cdot (i \cdot j) - \left(\sum_{i=1}^{6} P(X = i) \cdot i\right) \cdot \left(\sum_{j=1}^{6} P(Y = j | X = i) \cdot j\right)$$
Part 4: Using the identity that $Var(Z) = Var(X) + Var(Y) - 2Cov(X,Y)$ and $Var(Z) = E(Z^2) - E(Z)^2$, I can write:
$$Var(Z) = \sum_{i=1}^{6} \sum_{j=1}^{6} P(X = i, Y = j | X = i) \cdot [i + j = z]^2 + (\sum_{i=1}^{6} \sum_{j=1}^{6} P(X = i, Y = j | X = i) \cdot [i + j = z])^2 - (\sum_{i=1}^{6} \sum_{j=1}^{6} P(X = i, Y = j | X = i) \cdot (i \cdot j) - \left(\sum_{i=1}^{6} P(X = i) \cdot i\right) \cdot \left(\sum_{j=1}^{6} P(Y = j | X = i) \cdot j\right))$$
My Question:
Have I done this correctly?
Suppose I have some observed data, e.g. Roll 1 = (x1,y1), Roll 2 = (x2, y2), ... Roll 2 = (xn, yn) etc. : I want to estimate the probabilities within the $Var(Z)$ formula based on this observed data. I think I should just be able to use the Maximum Likelihood Estimator for each probability? (i.e. of all the times $D_1 = 1$, how many of these times was $D_2 = 2$, $D_2 = 3$, $D_2 = 4$, $D_2 = 5$, $D_2 = 6$, etc. Of course, these will all be independent probabilities except for when $D_1 = 6$. Am I correct? i.e.
$$\hat{P}_{MLE}(X = i, Y = j | X = i) = \frac{\# \{ (x,y) : x = i \text{ and } y = j \}}{\# \{ x : x = i \}}$$ $$E(\hat{Z}_{MLE}) = ... $$ $$Var(\hat{Z}_{MLE}) = ....$$
And finally, suppose if I were to falsely believe that $D_1$ and $D_2$ were completely independent and uncorrelated, thus believing that there is no covariance term. Logically, I would underestimate $Var(Z)$ because I have eliminated all covariances?
However, the estimate for $E(Z)$ would also be incorrect as this would be affected by incorrectly assuming the absence of correlation. If the two dice are correlated such that the first 6 is more likely to be followed by another 6... the expected sum will be slightly higher compared to two uncorrelated dice. so if I incorrectly ignore correlation... even E(X+Y) will be biased.
Thanks!
Note: Here are the formulae if we assume both dice are independent (notice that the conditional probabilities have been dropped):
$$E(Z) = \sum_{i=1}^{6} \sum_{j=1}^{6} P(X = i, Y = j) \cdot [i + j = z]$$
$$Var(Z) = \sum_{i=1}^{6} \sum_{j=1}^{6} P(X = i, Y = j ) \cdot [i + j = z]^2 + (\sum_{i=1}^{6} \sum_{j=1}^{6} P(X = i, Y = j ) \cdot [i + j = z])^2 $$