|
|
|
|
|
by peeters
1725 days ago
|
|
This doesn't seem quite right, unless I'm misunderstanding. If your bias was 128 (10000000) by your algorithm you would get heads at least 50% of the time (heads on the first flip) and tails at least 25% of the time (heads then tails). I think instead of taking the "wrong" flip result when they don't match, you should treat "getting to the end" as heads and failing before that as tails (or vice versa). |
|
In this case the algorithm says you return tails unless you flip 7 heads in a row (which happens with probability 1/128).