Live data from Hacker News

What has a 1 in a million chance? (2010)

stat.berkeley.edu

11–20 of 199 posts

Re: What has a 1 in a million chance? (2010)

#11
post #4

Picking a random integer between 1 and 1 million.

That depends on the quality of your randomness. If it's a person picking the number that definitely isn't a 1 in a million chance for most numbers. You need to get pretty specialized hardware before you can confidently say it's definitely an equal chance for every number every time.

>If it's a person picking the number that definitely isn't a 1 in a million chance for most numbers.

Only if the person isn't aware of the issues involved.

Re: What has a 1 in a million chance? (2010)

#12
post #5

Earlier quoted context omitted.

No, you don’t need specialized hardware. The output of a modern hash for crypto absolutely needs to produce a uniform distribution across a million.

But how do you pick the input for the hash?

Current date and time.

Re: What has a 1 in a million chance? (2010)

#15
post #5
post #4

Earlier quoted context omitted.

That depends on the quality of your randomness. If it's a person picking the number that definitely isn't a 1 in a million chance for most numbers. You need to get pretty specialized hardware before you can confidently say it's definitely an equal chance for every number every time.

No, you don’t need specialized hardware. The output of a modern hash for crypto absolutely needs to produce a uniform distribution across a million.

Do you mean, after picking a million numbers, then every number in the range should have been picked exactly once?

Re: What has a 1 in a million chance? (2010)

#16
post #5

Earlier quoted context omitted.

No, you don’t need specialized hardware. The output of a modern hash for crypto absolutely needs to produce a uniform distribution across a million.

But how do you pick the input for the hash?

Just bang away at the full keyboard for 50-100 characters?

Re: What has a 1 in a million chance? (2010)

#18
post #15
post #5

Earlier quoted context omitted.

No, you don’t need specialized hardware. The output of a modern hash for crypto absolutely needs to produce a uniform distribution across a million.

Do you mean, after picking a million numbers, then every number in the range should have been picked exactly once?

Definitely not this. That wouldn't be random at all. For example, after picking 999,999 numbers you would be able to predict the next number with certainty. What it means is that every time you select a number, every number in the range has an equal probability of being selected.

Re: What has a 1 in a million chance? (2010)

#19
> "Scientists have calculated that the chances of something so patently absurd actually existing are millions to one. But magicians have calculated that million-to-one chances crop up nine times out of ten."

-- Terry Pratchett

Making fun of the fact that if someone says "it's a million-to-one chance, but it might just work!" in fiction, you know it's going to work.

In _Guards! Guards!_ this is taken to the point that they reckon that it's not enough to hit the dragon with the arrow at the soft spot, they also have to try a whole bunch of improbable circumstances to get the chance to exactly 1 in a million. Because exactly 1 in a million is hard to achieve, as the article shows.

Post reply on HN