Hacker News new | ask | show | jobs
by JadeNB 5327 days ago
> We can approximate the probability that any two of the n decks shuffled in human history were identical as p=1-n^2/52!

I think that this is way too low. Shouldn't it be the quite large number

1 - \prod_{i = 1}^n (1 - (i - 1)/52!)

(a la the birthday paradox)?

1 comments

Sorry, I was thinking of the complementary probability (that there has been a coincidence).

Mathematica overflowed when I tried to compute this by brute force. The next best thing I can think of is to use the exponential approximation

    1 - x ≈ e^{-x},
good for very small `x`, such as ours. Ignoring the cascading errors gives

    \prod_{i = 1}^n (1 - (i - 1)/52!)
    ≈ \prod_{i = 1}^n e^{-(i - 1)/52!}
    = e^{-n(n - 1)/52!}
    ≈ 1 - n(n - 1)/52!.
The error should be roughly of the size

    \frac1 2\sum_{i = 1}^n [(i - 1)/52!]^2
    ≈ n^3/(2(52!)^2),
which is relatively small. (That's stronger, here, than just saying that it is small.) That is to say: I guess I agree with jgershen after all!