In: Math
Suppose you are rolling two independent fair dice. You may have one of the following outcomes
(1,1) (1,2) (1,3) (1,4) (1,5) (1,6)
(2,1) (2,2) (2,3) (2,4) (2,5) (2,6)
(3,1) (3,2) (3,3) (3,4) (3,5) (3,6)
(4,1) (4,2) (4,2) (4,4) (4,5) (4,6)
(5,1) (5,2) (5,3) (5,4) (5,5) (5,6)
(6,1) (6,2) (6,3) (6,4) (6,5) (6,6)
Now define a random variable Y = the absolute value of the
difference of the two numbers
a. Complete the following pmf of Y with necessary calculations and
reasoning.
b. Find the mgf of Y
c. Now further consider another random variable X = the sum of the two numbers. Do you think X and Y are independent? Briefly explain your reasons
Following is the sample space when we roll two fair dice:
Above sample space shows the absolute difference of all the outcomes after = sign. So pmf of Y will be
Y | P(Y) | P(Y) |
0 | 6/36 | 0.17 |
1 | 10/36 | 0.28 |
2 | 8/36 | 0.22 |
3 | 6/36 | 0.17 |
4 | 4/36 | 0.11 |
5 | 2/36 | 0.06 |
Total | 1 |
And following table shows the calculations for expected values:
Y | P(Y) | P(Y) | YP(Y) |
0 | 6/36 | 0.17 | 0 |
1 | 10/36 | 0.28 | 0.28 |
2 | 8/36 | 0.22 | 0.44 |
3 | 6/36 | 0.17 | 0.51 |
4 | 4/36 | 0.11 | 0.44 |
5 | 2/36 | 0.06 | 0.3 |
Total | 1 | 1.97 |
(b)
The MGF of Y is
Hence,
(c)
Following is the possible outcomes when we sum the outcomes and absolute difference of rolls of two dice:
In each outcome (a,b)=c,d : a shows outcome of first die, b shows outcome of second die and c shows sum c =a+b and d shows abs(a-b).
Following table shows the joint pdf and marginal pdfs of X and Y
Y | ||||||||
0 | 1 | 2 | 3 | 4 | 5 | P(X=x) | ||
2 | 1/36 | 0 | 0 | 0 | 0 | 0 | 1/36 | |
3 | 0 | 2/36 | 0 | 0 | 0 | 0 | 2/36 | |
4 | 1/36 | 0 | 2/36 | 0 | 0 | 0 | 3/36 | |
5 | 0 | 2/36 | 0 | 2/36 | 0 | 0 | 4/36 | |
X | 6 | 1/36 | 0 | 2/36 | 0 | 2/36 | 0 | 5/36 |
7 | 0 | 2/36 | 0 | 2/36 | 0 | 2/36 | 6/36 | |
8 | 1/36 | 0 | 2/36 | 0 | 2/36 | 0 | 5/36 | |
9 | 0 | 2/36 | 0 | 2/36 | 0 | 0 | 4/36 | |
10 | 1/36 | 0 | 2/36 | 0 | 0 | 0 | 3/36 | |
11 | 0 | 2/36 | 0 | 0 | 0 | 0 | 2/36 | |
12 | 1/36 | 0 | 0 | 0 | 0 | 0 | 1/36 | |
Y | 6/36 | 10/36 | 8/36 | 6/36 | 4/36 | 2/36 | 1 |
Following table shows the calculations for E(XY):
X | Y | P(X=x, Y=y) | xy*P(X=x, Y=y) |
2 | 0 | 1/36 | 0/36 |
2 | 1 | 0 | 2/36 |
2 | 2 | 0 | 4/36 |
2 | 3 | 0 | 6/36 |
2 | 4 | 0 | 8/36 |
2 | 5 | 0 | 10/36 |
3 | 0 | 0 | 0/36 |
3 | 1 | 2/36 | 3/36 |
3 | 2 | 0 | 6/36 |
3 | 3 | 0 | 9/36 |
3 | 4 | 0 | 12/36 |
3 | 5 | 0 | 15/36 |
4 | 0 | 1/36 | 0/36 |
4 | 1 | 0 | 4/36 |
4 | 2 | 2/36 | 8/36 |
4 | 3 | 0 | 12/36 |
4 | 4 | 0 | 16/36 |
4 | 5 | 0 | 20/36 |
5 | 0 | 0 | 0/36 |
5 | 1 | 2/36 | 5/36 |
5 | 2 | 0 | 10/36 |
5 | 3 | 2/36 | 15/36 |
5 | 4 | 0 | 20/36 |
5 | 5 | 0 | 25/36 |
6 | 0 | 1/36 | 0/36 |
6 | 1 | 0 | 6/36 |
6 | 2 | 2/36 | 12/36 |
6 | 3 | 0 | 18/36 |
6 | 4 | 2/36 | 24/36 |
6 | 5 | 0 | 30/36 |
7 | 0 | 0 | 0/36 |
7 | 1 | 2/36 | 7/36 |
7 | 2 | 0 | 14/36 |
7 | 3 | 2/36 | 21/36 |
7 | 4 | 0 | 28/36 |
7 | 5 | 2/36 | 35/36 |
8 | 0 | 1/36 | 0/36 |
8 | 1 | 0 | 8/36 |
8 | 2 | 2/36 | 16/36 |
8 | 3 | 0 | 24/36 |
8 | 4 | 2/36 | 32/36 |
8 | 5 | 0 | 40/36 |
9 | 0 | 0 | 0/36 |
9 | 1 | 2/36 | 9/36 |
9 | 2 | 0 | 18/36 |
9 | 3 | 2/36 | 27/36 |
9 | 4 | 0 | 36/36 |
9 | 5 | 0 | 45/36 |
10 | 0 | 1/36 | 0/36 |
10 | 1 | 0 | 10/36 |
10 | 2 | 2/36 | 20/36 |
10 | 3 | 0 | 30/36 |
10 | 4 | 0 | 40/36 |
10 | 5 | 0 | 50/36 |
11 | 0 | 0 | 0/36 |
11 | 1 | 2/36 | 11/36 |
11 | 2 | 0 | 22/36 |
11 | 3 | 0 | 33/36 |
11 | 4 | 0 | 44/36 |
11 | 5 | 0 | 55/36 |
12 | 0 | 1/36 | 0/36 |
12 | 1 | 0 | 12/36 |
12 | 2 | 0 | 24/36 |
12 | 3 | 0 | 36/36 |
12 | 4 | 0 | 48/36 |
12 | 5 | 0 | 60/36 |
Total | 1155/36 |
SO,
E(XY) = 490 /36
---------
Following is the possible outcomes when we sum the outcomes of rolls of two dice:
Let X shows the sum of two fair die. So X can take values 2, 3, 4,...12. Following table shows the probability distribution of X:
X | P(X=x) |
2 | 1/36 |
3 | 2/36 |
4 | 3/36 |
5 | 4/36 |
6 | 5/36 |
7 | 6/36 |
8 | 5/36 |
9 | 4/36 |
10 | 3/36 |
11 | 2/36 |
12 | 1/36 |
Following table shows the calculations for mean and variance of X:
X | P(X=x) | P(X=x) | XP(X=x) | X^2*P(X) |
2 | 1/36 | 0.027778 | 0.05555556 | 0.11111111 |
3 | 2/36 | 0.055556 | 0.16666667 | 0.5 |
4 | 3/36 | 0.083333 | 0.33333333 | 1.33333333 |
5 | 4/36 | 0.111111 | 0.55555556 | 2.77777778 |
6 | 5/36 | 0.138889 | 0.83333333 | 5 |
7 | 6/36 | 0.166667 | 1.16666667 | 8.16666667 |
8 | 5/36 | 0.138889 | 1.11111111 | 8.88888889 |
9 | 4/36 | 0.111111 | 1 | 9 |
10 | 3/36 | 0.083333 | 0.83333333 | 8.33333333 |
11 | 2/36 | 0.055556 | 0.61111111 | 6.72222222 |
12 | 1/36 | 0.027778 | 0.33333333 | 4 |
Total | 1 | 1 | 7 | 54.8333333 |
The expected value of X is
The variance of X:
Var(X) = 54.8333 - 7^{2} = 5.8333
-------------------------------------------
Following table shows the calculations for expected values:
Y | P(Y) | P(Y) | YP(Y) |
0 | 6/36 | 0.17 | 0 |
1 | 10/36 | 0.28 | 0.28 |
2 | 8/36 | 0.22 | 0.44 |
3 | 6/36 | 0.17 | 0.51 |
4 | 4/36 | 0.11 | 0.44 |
5 | 2/36 | 0.06 | 0.3 |
Total | 1 | 1.97 |
So expected value of X is
Following table shows the calculations for variance of Y:
Y | P(Y) | YP(Y) | y^2P(y) |
0 | 0.17 | 0 | 0 |
1 | 0.28 | 0.28 | 0.28 |
2 | 0.22 | 0.44 | 0.88 |
3 | 0.17 | 0.51 | 1.53 |
4 | 0.11 | 0.44 | 1.76 |
5 | 0.06 | 0.3 | 1.5 |
Total | 1 | 1.97 | 5.95 |
The expected value is
E(Y) = sum xP(X=x) = 1.97
So,
----------------------------
The co-variance is
Cov(X,Y) = E(XY) - E(X)E(Y) = (490/36) - (7*1.97) = -0.1789
The correlation coefficient is
Corr(X,Y) = Cov(X,Y) / (sqrt(Var(X) * Var(Y)) = -0.1789 / (sqrt( 5.8333 * 2.0691)) = - 0.0515
Since correlation coefficient is not zero so X ad Y are not independent.