

How to create a biased coin and prove it with math - jackpirate
http://izbicki.me/blog/how-to-create-an-unfair-coin-and-prove-it-with-math

======
yuvadam
Reminds me of to achieve a fair coin toss result with a biased coin -

Toss the coin twice, if result is HH or TT, repeat. If result is HT or TH the
result is either H or T ( _apriori_ selection of either the first or second
toss, WLOG).

~~~
burgerbrain
[http://en.wikipedia.org/wiki/Randomness_extractor#Von_Neuman...](http://en.wikipedia.org/wiki/Randomness_extractor#Von_Neumann_extractor)

------
thelema314
I have a problem with the idea behind this - there's no proof that the coin is
biased; even flipping it a hundred times and getting the same result is
possible with an unbiased coin. All that statistics gives you is the
probability of having a result at least this extreme with an unbiased coin. If
this probability is low enough (often 1 in 20 or 1 in 100, but sometimes as
low as 1 in 5), the "hypothesis" of the coin being unbiased is rejected, but
this rejection will happen erroneously 1 in 20 or 100 or 5 times. As
exemplified by the XKCD cartoon: <http://xkcd.com/882/>

~~~
defen
> All that statistics gives you is the probability of having a result at least
> this extreme with an unbiased coin.

If you subscribe to frequentist statistics and use the null hypothesis of
"coin is not biased", yes. But if you're a Bayesian you can compute the
probability that the coin bias is greater than a given amount.

~~~
thelema314
Granted. But in either case, there's no proof - only a probability that you
haven't reached an incorrect conclusion. I associate the concept of proof with
logical certainty, and no statistical method will give you that.

------
carbocation
In this case, the graphs don't seem to add any more clarity beyond what is
already provided by the counts (e.g., 47 heads, 53 tails).

I would be more interested to understand to what extent each coin appears to
statistically differ from a fair coin, and in fact that's what I imagined the
article would cover, given the title.

~~~
jackpirate
That's exactly what the graphs were trying to convey. Maybe it could have been
explained more clearly?

~~~
carbocation
Plotting it out forces the reader to try to visually calculate the integral.
Wikipedia gives a nice treatment of how to get a numerical answer to "What is
the probability that this coin is fair:"
[http://en.wikipedia.org/wiki/Checking_whether_a_coin_is_fair...](http://en.wikipedia.org/wiki/Checking_whether_a_coin_is_fair#Posterior_probability_density_function)

~~~
jackpirate
I actually tried including an analytic solution as well, but it took up a lot
of space and seemed like clutter. I figured most people would prefer the
graphical solutions anyways.

Thanks for the link, I should include that inside the post somewhere. _EDIT:
Done._

------
polyfractal
It's easier to just practice flipping coins. If you start on the same side,
you can train yourself to flip the same height/force/rotations each time. This
allows you to know what side it usually lands on.

~~~
pavel_lishin
Wouldn't it be more rewarding to practice faking flipping a coin? Give it some
wobble, but make sure it doesn't actually flip over.

------
mathattack
Thanks for sharing. I think it's a better math lesson than coin tampering
lesson. Hard to imagine the wrench is state of the art. :-)

One of the subtle lessons here is just how many tosses you have to make to get
a high confidence level. In business, how often do we get that many rolls of
the dice or tosses of the coin before having to decide? And what's that say
about how confident we should be? (Perhaps this is way so many HN folks have
pivoted)

------
leeoniya
i don't think you need to go to such visible lengths to bias a coin. if one
face of the coin was weighted more (by using a heavier alloy), it would likely
bias it simply because when/if it bounces, it would be more likely to land
with that face down.

maybe?

~~~
carbocation
Codayus, if you notice this, you appear to be hellbanned (all of your comments
for the past 10 days are dead, including the one in this thread). I looked
over your comment history and I can't understand why this would be, so I'm
alerting you in case you want to ask PG for a reprieve.

~~~
tptacek
I'm not a "having conversations with 'pg over email" kind of guy, but I've
found him pretty responsive on "it doesn't look like this person should be
banned" mails. Next time, you might find it less effortful to bang out a quick
mail to pg@ycombinator.com to fix stuff like this.

(I don't know what the deal is with accidental hellbanning, but it seems to
happen with some regularity).

I mailed him already for this user, though.

~~~
carbocation
Thank you. I'll try that approach next time.

