Suppose we roll two dice and let X and Y be the two numbers
     Suppose we roll two dice and let X and Y be the two numbers that appear. Find the distribution of |X - Y|.    
 
  
  Solution
If two dice rolled, then total number of outcomes are 6*6 =36
(X-Y| takes values 0,1,2,3,4,5
(X-Y| takes value 0 when the events are (1,1),(2,2), (3,3),(4,4),(5,5),(6,6)
Therefore P((X-Y|=0) =6/36
Similarly (X-Y| takes value1 when the events are (1,2),(2,1), (3,2),(2,3),(3,4),(4,3),(5,4),(4,5),(6,5),(5,6)
Therefore P((X-Y|=1) =10/36
Proceeding similar way P((X-Y|=2) =8/36; P((X-Y|=3) =6/36; P((X-Y|=4) =4/36, P((X-Y|=5) =2/36
| |X-Y| | P(|X-Y|) | 
| 0 | 1/6 | 
| 1 | 2/7 | 
| 2 | 2/9 | 
| 3 | 1/6 | 
| 4 | 1/9 | 
| 5 | 1/18 | 

