logoalt Hacker News

ColinWright12/10/20241 replyview on HN

I'm not a mathematician so please bear with me here

I am a mathematician, so please bear with me when I try to explain how this can work.

The rational numbers are countable, and that means that I can write a list of them. There are several ways of doing this, but personally I like the Calkin-Wilf tree[0]. That only gives the positive ones, but we can include zero and the negative ones by interleaving them.

So, whatever interval you choose, there are infinitely more reals outside the interval as inside (by that I mean that you can fit an infinite number of copies of that interval up to infinity). So the probability e is not >0, it is effectively 0.

One you have chosen the two numbers, L and U, I note that there are rational numbers in between. Choose one of those numbers, call it M.

M is in my list above. Now I roll a die, discarding numbers from the list until I get a 6. There is a non-zero probability that the number retained is M, so there is a non-zero probability that my chosen number is between L and U. So e is definitely non-zero.

The second problem is, what does it mean to choose a real at random?

It doesn't have to be uniformly at random -- that's the mistake nearly everyone makes -- and the above process does it perfectly well. It only ever chooses a rational number, but that's OK. It's still a real number, it's still a random number, and for any non-empty interval, there is a non-zero chance the chosen number is inside.

... as a human living in the finite universe there are limitations to your choice.

Yes, but that is accounted for in the explicit description of how to choose the number.

Any number you can write using all the atoms in the universe is infinitely outnumbered by all numbers that you can't.

Again, this is accounted for by the fact that we are not choosing uniformly at random.

[0] https://en.wikipedia.org/wiki/Calkin%E2%80%93Wilf_tree


Replies

vbarrielle12/10/2024

Am I right to assume one could also sample from a Gaussian distribution for the method to work? Of course, the probability e of sampling between the two real numbers would be very small, but it would be nonzero.

show 1 reply