Mathwizurd.com is created by David Witten, a mathematics and computer science student at Stanford University. For more information, see the "About" page.
You have a normal six-sided die. On average, how many rolls do you need to see a repeat?
Solution
The key to this problem is realize there are only a few scenarios where one could see a repeat. If you roll seven dice, one roll must repeat. The smallest number of dice you could roll and see a repeat is 2. Therefore, we get our answer:
$$E(\text{rolls}) = 2 * P(\text{Repeat on the 2nd roll}) +\\ 3 * P(\text{Repeat on the 3rd roll}) + \\4 * P(\text{Repeat on the 4th roll}) + \\
5 * P(\text{Repeat on the 5th roll}) +\\ 6 * P(\text{Repeat on the 6th roll}) +\\ 7 * P(\text{Repeat on the 7th roll})$$
In theory, you could calculate all the probabilities and multiply them by their values. However, that gets pretty complicated.
An easier way is to express the expected value of rolls remaining if we have k numbers left.
$$E_0 = 1$$
With k numbers remaining, there are two possibilities. Either you pick a new number, or you're done.
$$E_n = \dfrac{n}{6}(1 + E_{n-1}) + \dfrac{6-n}{6}(1) = 1 + \dfrac{n}{6}E_{n-1}$$
Now, we go from the bottom up:
$$E_1 = 1 + \dfrac{1}{6}E_0 = \dfrac{7}{6}$$
$$E_2 = 1 + \dfrac{2}{6}E_1 = \dfrac{25}{18}$$
$$E_3 = 1 + \dfrac{3}{6}E_2 = \dfrac{61}{36}$$
$$E_4 = 1 + \dfrac{4}{6}E_3 = \dfrac{115}{54}$$
$$E_5 = 1 + \dfrac{5}{6}E_4 = \dfrac{899}{324}$$
$$E_6 = 1 + \dfrac{6}{6}E_5 = \dfrac{1223}{324}$$
$$\dfrac{1223}{324} = 3.77$$
On average, it should take around 3.77 rolls.