Consider two dice each with six possible numbers 1, 2, 3, 4, 5, 6 (equal chance)
ID: 3170160 • Letter: C
Question
Consider two dice each with six possible numbers 1, 2, 3, 4, 5, 6 (equal chance). Compute the theoretical probability of getting the sum to be equal to 2, 3, ..., 12. Write Matlab code to print out this theoretical distribution (in red) using the "bar" command, Now use the Matlab code discussed in class on 14 February 2017 to figure out how to simulate discrete distributions to simulate the sum of two dice. Your output should clearly compare the theoretical vs. the simulated % for each of the values: 2, 3, ..., 12. Do some experiments varying the number of simulated values to see if the simulated %'s come closer to the theoretical ones.Explanation / Answer
(a) The probabilities are
Sum Probability 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