Expected value of the max of $2$ dice

Suppose the dices have $n$ faces. Let $X=\max(a,b)$

Note that:

$X=1$ only in the case (1,1), i.e. $p_X(1)=1/n^2$

$X=2$ in the cases (1,2), (2,2), (2,1), i.e. $p_X(2)=3/n^2$

$\vdots$

$X=k$ in $k+k-1=2k-1$ cases, i.e. $p_X(k)=(2k-1)/n^2$(this is easy to see when you draw all the cases).

$$E(X)=\frac{1}{n^2} \sum_{x=1}^{n}x(2x-1)=\frac{1}{n^2} \sum_{x=1}^{n}(2x^2-1)=\\ \frac{1}{n^2}\left(\frac{n(n+1)(2n+1)}{3}-\frac{n(n+1)}{2}\right)=\frac{4n^3+3n^2-n}{6n^2} = \dfrac{4n^2 + 3n - 1}{6n}$$


Denote outcomes $(X_1,X_2)$ and $Z=\max\{X_1,X_2\}$. Then just use that the outcomes are independent and break the event "$Z=a$" into "$(X_1=a \text{ and }X_2\leq a)\text{ or }(X_2=a\text{ and }X_1<a)$": $$E(Z)=\sum_{a=1}^6 a\cdot P(Z=a)=\sum_{a=1}^6 a\cdot (P(X_1=a \text{ and }X_2\leq a )+P(X_2=a \text{ and }X_1<a))$$ $$=\sum_{a=1}^6 a\cdot \left(\frac{1}{6}\cdot\frac{a}{6}+\frac{1}{6} \cdot \frac{a-1}{6}\right)=\frac{161}{36}$$


Reasoning as for the time allowed to answer to an interview:
a) in a square $6 \times 6$, the number of cases with max less then $m$, will be the square $m \times m$.
b) so $m^2/36$ gives the PDF.
c) the median will be at $PDF = 1/2$ that is for a square of area $=28$, i.e. about $5$, and the average somewhat behind.
d) to be a bit more precise, the pmf is $(m^2-(m-1)^2)=(2m-1)/36$, which is linear and can be approximated to a triangle with base a little less than $7$; the centroid will be at $2/3$ of the base, so at little less than $14/3 \approx 4.66$.
e) fully precise instead will be $$ \sum\limits_{1\, \le \,m\, \le \,6} {m\left( {2m - 1} \right)} /36 = 161/36 \approx 4.47 $$

Tags:

Probability