Hacker News new | ask | show | jobs
by hn_throwaway_99 3358 days ago
Someone else responded to me in a recent Hacker News discussion that really clarified this in my head: A real number essentially has an infinite number of digits after the decimal place - the difference between a rational and an irrational number is that the digits end up in a repeating pattern in a rational number (you can think of rationals that terminate as really having an infinite number of zeros, e.g. 1.5 as 1.5000000...). Thus, to randomly pick a real number, you randomly select digits an infinite number of times after the decimal. Clearly there is no way a random process will produce an infinite number of repeating digits, thus the probability of picking a rational would be 0.
1 comments

Wouldn't it be simpler to explain it this way: there are infinitely many reals between any two different reals, and thus the theoretical probability of picking any number between them at random is 1/infinity, which we think if as 0.

But in that case, why is is more probable to pick an irrational number?

I don't think it's simpler that way at all, mainly because the ways in which some "infinities" are larger than others, which explains why it's more probable to pick an irrational number. The rational numbers are countable, while the real numbers are not.