If X = the number of tosses until you get a number on the die three times, find E(X) by conditioning.
So far, Y = 1 if I get a number that has been rolled before, and Y = 0 if I get a new number.
E(X) = p(E(X)|Y=1) + (1-p)(E(X)|Y=0) = this is where I get confused.
It is possible to solve this problem by using conditional probabilities on the number of pairs formed in each of the turns. This way, one can find the probability of the game finishing in $3, 4, \ldots, 13$ turns, which can then be used to calculate $E(X).$
For each turn, one can calculate the amount of unique combinations which result in a given number of pairs (two dice with the same value) the turn before. For instance, when we start the third turn, there are $6$ possible combinations which result in exactly one pair of numbers thrown in the first two turns: $\{1, 1\}, \{2, 2\}, \{3, 3\}, \{4, 4\}, \{5, 5\}, \{6, 6\}.$ The probability of having thrown the same value twice is $\frac{6}{6^2} = \frac{1}{6}.$ The probability of throwing the same value in the third turn equals $\frac{1}{6},$ and we thus find:
$$P(3) = \frac{1}{36} \approx 0.0278$$
This reasoning can be extended to other turns as well. For instance, when starting the seventh turn, we have thrown either (1) three pairs, (2) two pairs and two unique values, (3) one pair and four unique values or (4) six unique values with the first six dice. These events have a probability of respectively:
We thus find:
$$P(7) = 0.0386 \cdot \frac{3}{6} + 0.3472 \cdot \frac{2}{6} + 0.2315 \cdot \frac{1}{6} + 0.0154 \cdot \frac{0}{6} \approx 0.1736$$
Using this approach for each of the possible number of turns, we find:
$$P(3) \approx 0.0278$$ $$P(4) \approx 0.0694$$ $$P(5) \approx 0.1157$$ $$P(6) \approx 0.1543$$ $$P(7) \approx 0.1736$$ $$P(8) \approx 0.1665$$ $$P(9) \approx 0.1350$$ $$P(10) \approx 0.0900$$ $$P(11) \approx 0.0469$$ $$P(12) \approx 0.0172$$ $$P(13) \approx 0.0034$$
Note that indeed, $\sum_{i=3}^{13}P(i) = 1$. Finally, we find:
$$E(X) = \sum_{i=3}^{13}P(i) \cdot i \approx 7.2955$$