Given a 6 sided dice, how many number of throws are required to guarantee a 6 as output?
This solution is basically finding expectation over 1 roll, 2 rolls, 3 rolls ... and so on until infinite rolls of dice. Basically SUM( k * P(rolls=k)) for k = 1 to infinity. Now probability we get a 6 in exactly kth roll is defined as P(rolls=k) = q^(k-1) * p, where p is probability we get a 6 in kth roll, and q^(k-1) is probability we do not get a 6 in all k-1 rolls. I guess it still cannot guarantee that we will always get a 6, rather that if we roll on average of 6 times in a row, we will get definitely get a 6. Quite interesting problem indeed.
References: