Disclaimer: I have already graduated from college  this isn't a homework question.
I have always been curious about this:
Say I have a coin. I flip it, and it turns up heads. I flip it again  heads. And again, heads. My question is how would we assess the "probability that this coin is weighted?"
If it were not weighted we could basically compare it against how confident we are in its convergence to 50% heads/tails, whereas for a weighted coin we'd compare it to 100% heads or something. But what is the statistical logic behind making this kind of claim?
For instance, say my question was "I flip a coin 6 times and get 6 heads. What is the probability it's a weighted coin?" How would I construct such a certainty threshold/probability?
Weighted coin question and probability
Moderators: gmalivuk, Moderators General, Prelates

 Posts: 6
 Joined: Thu Aug 18, 2011 5:02 pm UTC
Re: Weighted coin question and probability
With Bayesian probability. In particular, frequency probability.
wee free kings
Re: Weighted coin question and probability
If you don't want to go into Bayesian probabilities, you can still use a hypothesis test to compare against the null hypothesis that the coin is fairly weighted  which is, in a way, what you're talking about when you say "compare it against how confident we are in its convergence to 50% heads/tails". The rough setup of the hypothesis test is to say "If this coin were fair, how likely is it that a result as unusual as three of the same in a row occurs?" and if the likelihood of that is fairly small, then we reject the null hypothesis  i.e., we conclude that it's unlikely the coin is fair.
You can also look at the level of weighting as being a parameter of the coin, and construct a maximum likelihood estimate of that parameter, to get a feel for where you might suspect that the coin's probability of showing heads lies.
You can also look at the level of weighting as being a parameter of the coin, and construct a maximum likelihood estimate of that parameter, to get a feel for where you might suspect that the coin's probability of showing heads lies.
pollywog wrote:I want to learn this smile, perfect it, and then go around smiling at lesbians and freaking them out.Wikihow wrote:* Smile a lot! Give a gay girl a knowing "Hey, I'm a lesbian too!" smile.

 Posts: 6
 Joined: Thu Aug 18, 2011 5:02 pm UTC
Re: Weighted coin question and probability
Yes I know it would involve some sort of Bayesian probability or a null hypothesis test of sorts, but I never knew how to actually compute it

 Posts: 118
 Joined: Tue Jun 24, 2008 2:57 am UTC
 Location: Atlanta, GA
 Contact:
Re: Weighted coin question and probability
FixMyIgnorance wrote:Yes I know it would involve some sort of Bayesian probability or a null hypothesis test of sorts, but I never knew how to actually compute it
Right, but that would imply that you test how weighted you believe the coin is weighted to begin with, as Conman pointed out.

 Posts: 286
 Joined: Tue Aug 22, 2006 10:35 pm UTC
 Contact:
Re: Weighted coin question and probability
Edit: I didn't answer your 6heads question, modified to "I flip a coin 3 times and get 3 heads. What is the probability it's a weighted coin?" instead.
Bayesian: start with your current belief, which for a random coin found in your change normally looks something like "the coin flips like a normal coin, landing heads with p=0.5 + 0.001, with probability ~0.99995, and like a trick coin, landing heads say P(p)=1/sqrt(p(1p)) the remaining 0.00005". Now we want int(P(trick,p=p*HHH),p*=0..1), which is int(P(HHHtrick,p=p*)P(trick,p=p*)/P(HHH),p*=0..1)
P(HHHtrick,p=p*)=p*^3
P(trick,p=p*)=(0.00005)/sqrt(p*(1p*))
int(x^3*0.00005/sqrt(x*(1x)),x=0..1)= 0.0000490874
Divide by P(HHH) which is 0.99995*(1/2)^3+0.00005*int(x^3/sqrt(x*(1x)),x=0..1)=0.125043 (and will be dominated by (1/2)^X for X heads in a row until about a dozen heads).
So after three heads, rather than a normal coin with probability 0.99995 you should think it's a normal coin with probability 0.9996.
After 10 heads? 1  0.000027677 / (0.000027677+0.0009765625) = 97.2%
After 15 heads? 1  0.0000226924 / (0.0000226924+0.000030517578125) = 57.4%
After 20 heads? 1  0.0000196932 / (0.0000196932+0.00000095367431640625) = 4.6%
For things this extreme, the quick and dirty solution is probably better: your prior says a 1 in 20000 chance of a trick coin, so you'll need an event of surprise about log2(20000)=14.28 coin flips in a row to make you consider the alternative.
Bayesian: start with your current belief, which for a random coin found in your change normally looks something like "the coin flips like a normal coin, landing heads with p=0.5 + 0.001, with probability ~0.99995, and like a trick coin, landing heads say P(p)=1/sqrt(p(1p)) the remaining 0.00005". Now we want int(P(trick,p=p*HHH),p*=0..1), which is int(P(HHHtrick,p=p*)P(trick,p=p*)/P(HHH),p*=0..1)
P(HHHtrick,p=p*)=p*^3
P(trick,p=p*)=(0.00005)/sqrt(p*(1p*))
int(x^3*0.00005/sqrt(x*(1x)),x=0..1)= 0.0000490874
Divide by P(HHH) which is 0.99995*(1/2)^3+0.00005*int(x^3/sqrt(x*(1x)),x=0..1)=0.125043 (and will be dominated by (1/2)^X for X heads in a row until about a dozen heads).
So after three heads, rather than a normal coin with probability 0.99995 you should think it's a normal coin with probability 0.9996.
After 10 heads? 1  0.000027677 / (0.000027677+0.0009765625) = 97.2%
After 15 heads? 1  0.0000226924 / (0.0000226924+0.000030517578125) = 57.4%
After 20 heads? 1  0.0000196932 / (0.0000196932+0.00000095367431640625) = 4.6%
For things this extreme, the quick and dirty solution is probably better: your prior says a 1 in 20000 chance of a trick coin, so you'll need an event of surprise about log2(20000)=14.28 coin flips in a row to make you consider the alternative.
GENERATION 1i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.
Re: Weighted coin question and probability
What am I missing here? It will happen 1 in 32 times (1 in 64 if you prespecify heads rather than just sitting down and immediately throwing 6 of a kind in a row). Isn't it then just a question of whether that probability makes you suspicious or not? It would probably make me wary if I was gambling, but I wouldn't convict anyone on it (IMHO convictions based on nothing more than probabilities are always unsafe  I'm not even sure why probabilities even feature in evidence).
What information beyond that can one work with? I'm being really thick, I'm afraid... can someone enlighten me as to why the answer is more complicated than that?
What information beyond that can one work with? I'm being really thick, I'm afraid... can someone enlighten me as to why the answer is more complicated than that?
How can I think my way out of the problem when the problem is the way I think?
Re: Weighted coin question and probability
It isn't more complicated than that.* You go into a hypothesis test with a notion of how unusual an sample has to be to make you reject the null hypothesis. If you want to convince yourself that a coin is weighted, you might choose a traditional alpha value of 0.05. This means that there is a 5% chance that you're rejecting the null hypothesis even though it's true because fair coins can have streaks. If you don't think a jury is going to be convinced at that level, then you choose a much smaller alpha value. But if you go too far, then you're going to cling to null hypotheses that aren't true. I assume that there is some sort of general notion of what sorts of mathematical confidences are stronger than "reasonable doubt", but I don't know what they are.
* Well, the solutions are more complicated for most of statistics, where you don't know the exact nature of the population distribution the way you do for an elementary binomial case like a coin flip. But it's the same base of starting with a null hypothesis, an alternative hypothesis, some statistic you can perform on the sample, and a critical value for that statistic that would make you reject the null hypothesis.
* Well, the solutions are more complicated for most of statistics, where you don't know the exact nature of the population distribution the way you do for an elementary binomial case like a coin flip. But it's the same base of starting with a null hypothesis, an alternative hypothesis, some statistic you can perform on the sample, and a critical value for that statistic that would make you reject the null hypothesis.
 gmalivuk
 GNU Terry Pratchett
 Posts: 26820
 Joined: Wed Feb 28, 2007 6:02 pm UTC
 Location: Here and There
 Contact:
Re: Weighted coin question and probability
Because probabilities are all we really have in the real world.tomandlu wrote:IMHO convictions based on nothing more than probabilities are always unsafe  I'm not even sure why probabilities even feature in evidence
Re: Weighted coin question and probability
gmalivuk wrote:Because probabilities are all we really have in the real world.
You are right of course... Thinking about it in depth, my real concern is when statistics are used not just to prove guilt, but to prove the existence of a crime.
The was a case here in the UK where a woman was convicted of murdering two children, since cot deaths only occurred in, say, 1 in 10,000. Therefore, argued the prosecution, it was a 10,000*10,000 chance that she hadn't murdered both children (or at least that's what the jury heard).
How can I think my way out of the problem when the problem is the way I think?
Re: Weighted coin question and probability
The defense should have had an easy retort. The correct question is 'assuming the kids are both dead, what is the probability that they both died of SIDS', and the 1 in 10,000 probability does not address that at all. The probability that they should have used would be the proportion of # of SIDS deaths to # of murders that looked like SIDS.tomandlu wrote:The was a case here in the UK where a woman was convicted of murdering two children, since cot deaths only occurred in, say, 1 in 10,000. Therefore, argued the prosecution, it was a 10,000*10,000 chance that she hadn't murdered both children (or at least that's what the jury heard).
The prosecution must also prove that cot deaths of siblings are independent events uninfluenced by either genetics and caregiving.
So the problem isn't math. The problem is WRONG math. I agree that statistics are the 3rd sort of lie (lies and damned lies being the other 2). Probabilities, however, are absolute  only assumptions make them faulty.
Adam
Who is online
Users browsing this forum: No registered users and 11 guests