Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Waiting Time Paradox or Why Is My Bus Always Late?. Parent comment
Instead of 1 in 14 million, we'll just do 1 in 2, and 8 players.
So we'll check how many bits are set in the average random byte:
void Main() { byte[] buffer = new byte[256*1024]; Random.Shared.NextBytes(buffer); var avg = buffer.Average(b => System.Runtime.Intrinsics.X86.Popcnt.PopCount(b)); Console.WriteLine(avg); }
Now let's check how many bits are set in the average random byte given that the low bit is 1 (i.e. player 1 has won!)
void Main() { byte[] buffer = new byte[256*1024]; Random.Shared.NextBytes(buffer); var avg = buffer .Where(b => (b & ((byte)0x01)) == 0x01) .Average(b => System.Runtime.Intrinsics.X86.Popcnt.PopCount(b)); Console.WriteLine(avg); }
Which is 1+3.5
In this case, we're 1+ average from the 7 other players, so being an average of 7 others not 8 others is significant.
If we simulate with millions of players, you'll see that removing 1 person from the pool makes essentially no difference.
There are no comments on this comment yet.
Instead of 1 in 14 million, we'll just do 1 in 2, and 8 players.
So we'll check how many bits are set in the average random byte:
Okay, bounces around 3.998 to 4.001, seems normal.Now let's check how many bits are set in the average random byte given that the low bit is 1 (i.e. player 1 has won!)
Now ~=4.500Which is 1+3.5
In this case, we're 1+ average from the 7 other players, so being an average of 7 others not 8 others is significant.
If we simulate with millions of players, you'll see that removing 1 person from the pool makes essentially no difference.