There are 36 way a pair of dice can fall:
(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,3) (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)
for x=0, the rolls with absolute difference 0 are these 6:
(1,1), (2,2), (3,3), (4,4), (5,5), (6,6). so P(0) = 6/36 = 1/6.
for x=1, the rolls with absolute difference 1 are these 10:
(1,2), (2,3), (3,4), (4,5), (5,6), (2,1), (3,2), (4,3), (5,3), (6,5).
So P(1) = 10/36 = 5/18.
for x=2, the rolls with absolute difference 2 are these 8:
(1,3), (2,4), (3,5), (4,6), (6,4), (5,3), (4,2), (3,1).
So P(2) = 10/36 = 5/18.
for x=3, the rolls with absolute difference 3 are these 6:
(1,4), (2,5), (3,6), (4,1), (5,2), (4,1).
So P(3) = 6/36 = 1/6.
for x=4, the rolls with absolute difference 4 are these 4:
(1,5), (2,6), (5,1), (6,2).
So P(4) = 4/36 = 1/9.
for x=5, the rolls with absolute difference 5 are these 2:
(1,6), (1,6).
So P(5) = 2/36 = 1/18.
So the probability function of Y is
x P(x)
0 6/36 = 1/6
1 10/36 = 5/18
2 8/36 = 2/9
3 6/36 = 1/6
4 4/36 = 1/9
5 2/36 = 1/18
-----------------
36/36 = 1
The cumulative distribution function is found by accumulating
value plus the sum of the values before it.
x CP(x)
0 6/36 = 1/6
1 6/36+10/36 = 16/36 = 4/9
2 8/36+6/36+8/36 = 22/36 = 11/18
3 6/36+8/36+6/36+6/36 = 26/39 = 2/3
4 6/36+8/36+6/36+10/36+4/36 = 34/36 = 17/18
5 6/36+8/36+6/36+10/36+4/36+2/36 = 36/36 = 1
-----------------
36/36 = 1
Edwin