# Exercise C.3.1

Suppose we roll two ordinary, 6-sided dice. What is the expectation of the sum of two values showing? What is the expectation of the maximum of two values showing?

The expectation of the sum is:

$$ \begin{aligned} \E[X] &= \sum_{x=2}^{12}x\Pr\{X = x\} \\ &= 2 \cdot \frac 1 36 + 3 \cdot \frac 2 36 + 4 \cdot \frac 3 36 + 5 \cdot \frac 4 36 + 6 \cdot \frac 5 36 + 7 \cdot \frac 6 36 + 8 \cdot \frac 5 36 + 9 \cdot \frac 4 36 + 10 \cdot \frac 3 36 + 11 \cdot \frac 2 36 + 12 \cdot \frac 1 36 \\ &= 7 \end{aligned}$$

The result is as expected, the probabilities are obtained by just counting them.

As for the maximum, a table helps illustrate the probabilities:

1 | 2 | 3 | 4 | 5 | 6 | |
---|---|---|---|---|---|---|

1 |
1 | 2 | 3 | 4 | 5 | 6 |

2 |
2 | 2 | 3 | 4 | 5 | 6 |

3 |
3 | 3 | 3 | 4 | 5 | 6 |

4 |
4 | 4 | 4 | 4 | 5 | 6 |

5 |
5 | 5 | 5 | 5 | 5 | 6 |

6 |
6 | 6 | 6 | 6 | 6 | 6 |

There is a nice geometrical interpretation here. In any case, the chance of $n$ being the maximum of two dice is $(2n-1)/36$. Thus:

$$ \E[Y] = \sum_{i=1}^{6}i\Pr\{Y = i\} = \sum_{i=1}^{6}\Bigg(i \cdot \frac{2i - 1}{36}\Bigg) = \frac{2\sum{i^2} - \sum{i}}{36} = \frac{(6 \cdot 7 \cdot 13)/6 - (6 \cdot 7)/2}{36} = \frac{161}{36} = 4.47\ldots $$