Two fair dice are rolled and the outcomes are mapped to X an
     Two fair dice are rolled, and the outcomes are mapped to X and Y. A third random variable Z = X - Y is computed.  Find the PMF of Z.  Find the joint PMF for X and Z.  Find E[XZ].  Find the covariance.  Find the correlation coefficient rho X,Z = Cov(X, Z)/  Var(X) Var(Z).    

 
  
  Solution
(a)
The value of Z can be calculated using all the possible outcomes as shown below-
From the table, we can get the frequency distribution of Z as-
As there are 36 possible cases, the probability distribution function of Z can be written as -
P(Z) = Frequency (Z) / 36.
So, we get the following PDF of Z-
____________________________________________________________________________________
(b)
As for each \'X the distribution of \'Z\' is unique, and the value of Z depends upon the value of X
| X | Y | Z | 
| 1 | 1 | 0 | 
| 1 | 2 | -1 | 
| 1 | 3 | -2 | 
| 1 | 4 | -3 | 
| 1 | 5 | -4 | 
| 1 | 6 | -5 | 
| 2 | 1 | 1 | 
| 2 | 2 | 0 | 
| 2 | 3 | -1 | 
| 2 | 4 | -2 | 
| 2 | 5 | -3 | 
| 2 | 6 | -4 | 
| 3 | 1 | 2 | 
| 3 | 2 | 1 | 
| 3 | 3 | 0 | 
| 3 | 4 | -1 | 
| 3 | 5 | -2 | 
| 3 | 6 | -3 | 
| 4 | 1 | 3 | 
| 4 | 2 | 2 | 
| 4 | 3 | 1 | 
| 4 | 4 | 0 | 
| 4 | 5 | -1 | 
| 4 | 6 | -2 | 
| 5 | 1 | 4 | 
| 5 | 2 | 3 | 
| 5 | 3 | 2 | 
| 5 | 4 | 1 | 
| 5 | 5 | 0 | 
| 5 | 6 | -1 | 
| 6 | 1 | 5 | 
| 6 | 2 | 4 | 
| 6 | 3 | 3 | 
| 6 | 4 | 2 | 
| 6 | 5 | 1 | 
| 6 | 6 | 0 | 


