Find the expected value of a dice sum If fair dodecahedron is rolled until at least $k$($k$ is fixed between 2 and 12) is gotten, and $X$ is the sum of all numbers appeared until the last time, what is $E(X)$?

Let $n=12$ denote the number of faces. If the first roll is $i\geqslant k$, $X=i$. If the first roll is $i\lt k$, $X=i+X'$ where $X'$ is distributed like $X$. Hence,
$$
\mathrm E(X)=\frac1n\sum_{i\geqslant k}i+\frac1n\sum_{i\lt k}\left(i+\mathrm E(X)\right)=\frac1n\sum_{i=1}^ni+\frac1n\mathrm E(X)\sum_{i=1}^{k-1}1,
$$
that is,
$$
n\mathrm E(X)=\frac{n(n+1)}2+(k-1)\mathrm E(X),
$$
hence
$$
\mathrm E(X)=\frac{n(n+1)}{2(n-k+1)}=\frac{78}{13-k}.
$$
