Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Problem:
- What is the expected number of rolls of a 6-sided die before u land on 3 unique faces?
- Expansion:
- Given a fair n-sided die, what is the expected number of rolls before you land k <= n unique faces?
- ===
- Let e(k) = the expected number of rolls needed to land k unique faces. Then, e(k + 1) = e(k) + [expected number of rolls required before a new face is rolled]
- For k = 1, e(1) = 1, regardless of the value of n
- For k = 2, e(2) = e(1) + (n)/(n - 1) = 1 + n/(n - 1). This is because our probability of rolling a new face is p = (n - 1)/(n), and so the expected number of rolls required to roll a new face is 1/p = n/(n - 1)
- Similarly, for k = 3, e(3) = e(2) + n/(n - 2) = 1 + n/(n - 1) + n/(n - 2).
- Thus, for any arbitrary value of k > 1, our expected value is e(k) = e(k - 1) + n/(n - k - 1). Consolidating, we have e(k) = 1 + n/(n - 1) + n/(n - 2) + . . . + n/(n - k - 1)
- There's probably some way to telescope or make that into a nice formula, but I'm too lazy to do it so rip.
- But yeah for the original problem e(3) = 1 + 6/5 + 6/4 = 37/10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement