0

A person rolls a die until he gets a result he has gotten before. Let $X$ be the amount of rolls and find the probability distribution of $X$.

I was first thinking this was a geometric distribution, but I am not sure how I am supposed to construct said distribution, if someone could throw me a bone, that would be great!

1 Answers1

1

Let $d$ be the number of sides on the die. Let's assume the die is fair, as the problem becomes more complicated if it is not fair, and I don't want to think about it.

On the first roll, it is not possible to roll the same number as has been previously rolled before, so $P(X=1) = 0$.

Now, $P(X=n)$ can be calculated as the first $n-1$ rolls are distinct, and the $n$-th roll is one of the previous $n-1$ rolls. This probability is:

$$\dfrac{d\cdot (d-1)\cdots (d-n+2)}{d^{n-1}}\cdot \dfrac{n-1}{d} = \dfrac{\tfrac{d!}{(d-n+1)!}(n-1)}{d^n}$$

for all $n\le d+1$.

Wolframalpha can be used to verify that:

$$\sum_{n=2}^{d+1} P(X=n) = 1$$

SlipEternal
  • 10,555
  • 1
  • 17
  • 38
  • I think I may have phrased my question wrong. The result doesn't necessarily have to be the same as the first die throw, it just has to be the same as a previous throw. i.e. Say he rolls 3, then rolls a 4, then rolls a 2 and then rolls a 4 (again). How would this affect the distribution? – DerpyMcDerp Sep 15 '20 at 14:53
  • @DerpyMcDerp I updated my response. – SlipEternal Sep 15 '20 at 15:19