Talk:Checking if a coin is fair
From Wikipedia, the free encyclopedia
Contents |
[edit] Correct answer
To check the bias of the coin, given the event of h heads out of n tosses, one has to calculate the probability of such an event to occur given that the coin is fair. Then one has to decide whether the coin is fair based on whether such a probability is acceptable or not. The probability of the event, given the fair coin, is equal to
where ε is the observed deviation. The formula accounts for possible deviation either way as well as deviations larger than observed. For example, if one observes 7 heads out of 10 tosses, a probability of such a deviation from expected value of .5 is equal to
Then one has to decide whether such probability is acceptable. In the example above, the event is not uncommon, so the coin can be fair. The fact that the observation may be more probable given a somewhat unfair coin is irrelevant.
(Igny 18:12, 19 September 2005 (UTC))
It seems to me that the article was written by an undergraduate student possibly following a solution of a poorly informed tutor. Likely both failed the introductory statistics course that semester. Unless there are strong objections, I will edit the article a bit later.(Igny 18:25, 19 September 2005 (UTC))
Isn't this what you are talking about ? : Would you like to write a new section in the article using your method. Does this method assumes that the coin is fair to begin with? ie. fair until proven unfair. Ohanian 13:20, 3 November 2005 (UTC)
[edit] Other applications
The above mathematical analysis for determining if a coin is fair, can also be applied to other uses. Some examples of other usage includes:
- Determining the product defective rates of a product when subjected to a particular (but well defined) condition.
Sometimes a product can be very difficult or expensive to make. Furthermore if testing such products will result in their destruction, a minimum amount of products should be tested. Using the same analysis the probability density function of the product defect rate can be found.
- Two party polling. If a small sample poll is taken where the there are only two mutually exclusive choices, then this is equivalent to tossing a single coin multiple times using a bias coin. The same analysis can therefore be applied to determine actual voting ratio.
- Finding the proportion of females in an animal group.
Determining the gender ratio in a large group of an animal species. Provided that a very small sample is taken when performing the random sampling of the population, the analysis is similar to determining the probability of obtaining heads in a coin toss.
By Ohanian 01:45, 2005 Mar 26 (UTC)
[edit] Accuracy of article
The article manages to say that tossing a coin 10 times and getting 7 heads is enough to say "one may be pretty confident that the coin is indeed biased". No statistician of whatever philosophy would accept that. In fact getting 7 out of 10 from a fair coin is not uncommon.
Most Bayesian statisticians would not accept the argument given through the article. In fact the article has a mixture of classical hypothesis testing and some Bayesian language, and manages come out with strange conclusions as a result. The talk about a normal curve and the central limit theorem is odd, given that the drawn curve is clearly a beta distribution.
The article on Bayes factors give some ideas about the way Bayesians might go (and 7 out of 10 would, like the example there, could in fact minimally increase their belief that the coin was fair), but in fact they base their decision theory not on confidence intervals, but by minimising the expected loss when combining their posterior probability distribution and their loss function (i.e. their prior probability distribution, the likelihood of the evidence and their loss function). In my view this article should either use Bayesian methods fully (best) or frequentist language and analysis (second best). That is of course assuming that the article adds value at all.--Henrygb 01:01, 8 Apr 2005 (UTC)
- Right. I'd rewritten portions of this article, but the latter part still doesn't make sense to me. The conclusion of the first part could be radically restated, simply showing the Beta distribution plot as the posterior density based on 7 heads and 3 tails and a uniform prior. I think everyone would agree up to this point. What conclusions to draw from the posterior is an entirely different matter that deserves a better discussion. --MarkSweep 01:43, 8 Apr 2005 (UTC)
The first part, about using Bayesian methods is mathematically correct, though not well written. The prior should be stated (and justified) first, then the posterior derived. He has the posterior mentioned first, then says what prior he used. Secondly, I would say the strategy of estimating the binomial parameter is a poor one. It's not the best way of answer the question. The best way is set it up as Bayesian hypothesis test. Let H1 be the hypothesis that the coin is fair, H2 that it is not. Give them both a prior probability of one half, then compute the Bayes factor.
The second part switches to classical methods used for sample size determination. As others have said, it would best to do that part by Bayesian methods. I would approach it as follows. Bayesians consider inference to be a special case of decision-making under uncertainty, where the actions being contemplated are to report particular values. Here we would have to specify a loss function that defines how much it 'costs' us (in some sense) to toss the coin, versus the 'cost' (consequences) of not knowing. If that loss function can be defined, we can compute the expected reduction in loss corresponding one more coin toss. If it is positive we should toss again. For a sensible loss function this reduction in loss will eventually be negative and we should stop tossing.
Blaise 18:13, 20 Apr 2005 (UTC)
Hello, Please let me respond to this. The problem is basically the interpretation of the results.
Firstly, before getting any further, let defined an "unbias coin" very loosely as 0.45 < Pr(head) < 0.55 This is a very lousy definition but I need one to make my case.
Now, why was 10 coin tosses choosen in the example section? The answer is simple. To make the calculations of the factorials easy to make. 11! (eleven factorial) 7! (seven factorial) and 3! (three factorial) are very easy to calc on your typical scientific calculator.
If a more reasonable number of coin toss was choosen, say 10,000 coin tosses, it would be impossible to calculate the factorials using a high school calculator. This defeats the whole purpose of the example section which is to make things clearer to the reader.
Next, the intepretation of the result.
Before even a single toss of the coin is performed, the odds are already stacked against an unbias coin.
This is because the prior distribution of the probability of the coin was ASSUMED to be UNIFORM. In this distribution the odds that the coin is unbias (before any coin tossing) is 0.10 while the odds that it is bias is 0.90
Compare this with a normal human's everyday experience of coin. Most human experience of coin is that they are mostly unbias (even before any coin tosing is performed).
So after tossing the coin 10 times with 7 heads and 3 tails. The calculations suggested that the probability that "the toss results came from an unbias coin" is 13% and that the probability that "the toss results came from a bias coin" is 87%.
Note that it does NOT say that the coin is bias. Merely the results are more likely to come from a bias coin GIVEN the prior distribution of a UNIFORM probability distribution (where the odds are already stacked against an unbias coin.
The number of toss 10, is a red herring because the probability calculations are correct (given the prior assumptions).
Let me conclude by giving you this story. Suppose:
An earth astronaut has arrived at a planet on the Alpha Centauri System. He noticed that the local aliens play a game where an irregular shaped object with a red dot is tossed. He only witnessed the aliens tossing the object 10 times in which the object landed on the ground with the dot facing up 7 times and 3 times with the dot facing down. From this, the astronaut did his calculations and concluded that there is only 13% chance that the object is fair(unbias).
What would you say about the above story? The mathematical calculations are EXACTLY the same.
Ohanian 08:15, 2005 Apr 8 (UTC)
- I would say that before he saw the evidence be had a personal probability of 0.1 that the coin was fair, and after seeing the evidence he had a personal probability of 0.13 that it was fair. In other words, the evidence of 7 out of 10 pointed very slightly towards the coin being fair - as I said above and using Bayes factors would show. But if I had been the astronaut, I doubt I would have started with the same prior probability, and I would have taken into account any costs or consequences of making a wrong decision and how wrong my decision was. --Henrygb 09:16, 8 Apr 2005 (UTC)
-
- The Bayesian discussion doesn't describe how most Bayesians would approach the problem. The problem should be framed as a sharp null hypothesis versus a vague alternative hypothesis. That is, the sharp null hypothesis is that the coin is exactly fair, and the vague alternative hypothesis is that there is some prior probability f(r) that the coin has a bias r. One would then calculate the Bayes factor as the probability of obtaining the data given no bias divided by the integrated (over all r) probability of obtaining the data given that the coin has bias...with the weight for a particular bias being given by the prior on r.
-
- What the author of this article has done, instead, is to calculate, given that the coin is biased, what the probability of the bias lying in a particular interval is. As a Bayesian hypothesis test this is completely flawed, because it never considers probabilities calculated on the actual null hypothesis of no bias.
-
- See, for example, the articles by Berger and Delampady and Berger and Sellke (access to jstor.org required).
-
- Henrygb's comments about using decision theory (loss function and all that) are correct and appropriate. As it is, the article is seriously misleading, and wrong. Personally, I think the article is redundant...everything in it is better discussed elsewhere in WikiPedia. Bill Jefferys 14:54, 8 September 2006 (UTC)
[edit] "How-To" Format Changes/Candidacy for Movement
I've gone through and changed most of the language that made this seem like a how-to guide, and removed the "candidate to be moved to Wikibooks" notice accordingly. I got rid of all the necessary "we"'s, "you"'s, "one"'s, et cetera in favor of more straightforward wording.
However, I can't say I've improved the factual accuracy of the article significantly (and I don't have time to research the material in question at the moment), so I've left the corresponding notice up for now. - 68.20.21.191 04:53, 15 Apr 2005 (UTC)
[edit] Mergers and acquisitions
Do we need both this article and Checking if a coin is biased
Blaise 09:10, 28 Apr 2005 (UTC)
- What a mess. Those are two incompatible forks of coin flipping. Merging in the changes from ...biased will be "fun". I added a notice to that article, because the present article contains more material and was edited more recently. --MarkSweep 16:35, 28 Apr 2005 (UTC)
-
- Sure. So does mean we go into "merge into" and "merged with" tags? I think this page should be the final page. But they are more or less the same, I say merge. HereToHelp 12:37, 13 October 2005 (UTC)
[edit] Has anyone ever done experiments to deduce the fairness of a coin?
I have a friend of mine who is a very competent statistician. Some time ago he did a number of experiments with a variety of coins he made. These had uneven weights, shapes etc. He found that there is no such thing as a biased coin. His results are unpublished, although I'd like him to publish them, but I'm wondering if anyone has done the same experiment?
- Well, a statistician wouldn't be the man for the job; a physicist or computer simulator would. -Grick(talk to me!) 05:14, Jun 16, 2005 (UTC)
- How's this? Coin toss simulator Coolgamer 16:35, Jun 22, 2005 (UTC)
[edit] Cleanup tag
I've moved this cleanup tag from the article:
While the article could certainly be improved, it's not obvious to me why this tag is warranted. Enchanter 21:28, 30 October 2005 (UTC)