logoalt Hacker News

tshaddoxtoday at 5:13 PM2 repliesview on HN

> more likely the "coin" is some imperfect PRNG in a loop

"More likely"? How can you even estimate the likelihood of the coin being "an imperfect PRNG" based on a single trial of 200 flips?


Replies

doogliustoday at 6:03 PM

You can use combinatorics to calculate the likelihood. If your PRNG is in a cycle of length N in its state space (assuming N>200), and half the state space corresponds to heads (vs tails), then the likelihood would be (N/2 choose 100)^2/(N choose 200) versus your baseline likelihood (for a truly random coin) of (200 choose 100)/2^200.

Graphing here https://www.wolframalpha.com/input?i=graph+%28%28N%2F2+choos... and it does look like it's only a slight improvement in likelihood, so I did overstate the claim. A more interesting case would be to look at some self-correcting physical process.

ajuctoday at 5:52 PM

Bayesian vs frequentist in a nutshell :)

If a student was tasked with determining some physical constant with an experiment and they got it exactly right to 20th decimal place - I'll check their data twice or thrice. Just saying. You continue believing it was the most likely value ;)