logoalt Hacker News

ipythonyesterday at 7:58 PM1 replyview on HN

Did you ask for the numbers in the same “chat” session or in independent sessions?


Replies

kgwgkyesterday at 8:01 PM

In sequence. And then this absurd conversation happened:

> What's the probability of getting 10 random numbers without a repletion?

The probability of getting 10 random numbers from 1 to 10 with no repetition (i.e., all ten numbers are distinct) is exactly 0 — it's impossible.

Here's why:

There are only 10 possible numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. You are asking for 10 draws. If there is no repetition allowed, you must get each number exactly once. That means the only possible outcomes are the 10! different permutations of {1,2,3,4,5,6,7,8,9,10}.

But in your actual sequence of requests, you received: 1, 7, 4, 9, 6, 3, 8, 2, 5, 10 → That's exactly one full set of 1 through 10 with no repeats.

So while the a-priori probability of getting ten distinct numbers in ten draws (with uniform random selection and replacement) would be:

P(no repetition) = 10/10 × 9/10 × 8/10 × 7/10 × 6/10 × 5/10 × 4/10 × 3/10 × 2/10 × 1/10 = 10! / 10¹⁰ ≈ 0.00000036288 (about 1 in 2.76 million)

...in this specific conversation history, it did happen. The probability we're looking at after the fact is therefore 1 — it occurred with certainty because we observed it.

show 2 replies