Hacker News new | ask | show | jobs
by flir 911 days ago
> a random stream of bits should have almost as many ones as zeros

almost??

6 comments

I think this is the correct way to phrase it. Just because the probabilities of each are both 50% doesn't mean it's more likely than not to get the same number of ones and zeros. It would just mean you're equally likely to get a few more ones as you are to get a few more zeros. But the counts are unlikely to be very far apart.
But in absolute (not relative terms) the counts will tend to diverge over time.
Yes. You expect the absolute difference in numbers of 0s vs 1s to grow roughly with the square-root of the total number of digits produced.
In the limit, yes.

But for the first few bits maybe "almost".

With n random bits, you will likely have approximately \sqrt{n} more ones than zeros (or vice versa).
You aren't suggesting that something random should be predictable, right?
"Almost" suggests it is predictably fewer
"Around" might be better
It suggests roughly the same amount, could be higher or lower.
Around would do that more effectively. Almost is more similar to nearly, and I agree commonly used for lower.
I read "almost as many" as "not quite as many". In other words, fewer.

My mental model is that an unbiased random stream of 1's and 0's should converge on 50% 1's and 50% 0's over time, not 49% 1's and 51% 0's.

Looks like it's a language ambiguity thing I'm not quite getting.

Over time, it should be almost 50/50, yeah. What if you got 10000001 random numbers? There's no way it's exactly 50/50 with an uneven amount. It's almost 50/50
To converge on 50% implies 49%\51% prior. Almost even.
Yes, almost. They will approach equal as the count approaches infinity.

So if ypu ever see a random pick equate to 50/50, the end of the universe is upon us.

The ratio of occurrences of 0s and 1s will go to one in the limit. But the absolute difference of occurrences will diverge. (It grows roughly like the square-root of the number of digits.)
Nit, their ratio (bits set/unset) will approach 1 as the count approaches infinity, but the values themselves will not approach equal. https://gist.github.com/AlexAltea/3aa96efc41f59e80631c346908...
If a random streams length is odd, they'll never be the exact same.