wu :: forums
« wu :: forums - Biased Coin »

Welcome, Guest. Please Login or Register.
May 18th, 2024, 1:15am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   medium
(Moderators: Eigenray, Grimbal, william wu, SMQ, Icarus, towr, ThudnBlunder)
   Biased Coin
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Biased Coin  (Read 2051 times)
marsh8472
Newbie
*





   


Posts: 27
Biased Coin  
« on: Sep 14th, 2012, 2:17am »
Quote Quote Modify Modify

A biased coin is flipped k times.  Heads comes up x times.  Tails comes up k-x times.  What is the probability that heads is more probable than tails on this coin? (in terms of k and x)
 
 
 
I just made this up and am new here.  If this falls within the hard category feel free to move it there.   Grin
IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7527
Re: Biased Coin  
« Reply #1 on: Sep 14th, 2012, 5:32am »
Quote Quote Modify Modify

You need to know the prior distribution of the bias.
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Biased Coin  
« Reply #2 on: Sep 14th, 2012, 6:17am »
Quote Quote Modify Modify

I'd say, when in doubt, take a uniform prior distribution. That's the only one that doesn't contain information.
Or you could add the prior as an extra free parameter in the equation and see where that leads you.
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
marsh8472
Newbie
*





   


Posts: 27
Re: Biased Coin  
« Reply #3 on: Sep 14th, 2012, 9:21am »
Quote Quote Modify Modify

on Sep 14th, 2012, 6:17am, towr wrote:
I'd say, when in doubt, take a uniform prior distribution. That's the only one that doesn't contain information.
Or you could add the prior as an extra free parameter in the equation and see where that leads you.

 
Yeah I would assume a uniform in this.  
 
I found a similar problem when I looked up "Maximum_likelihood_estimate" for wikipedia
 
Maybe this would help  
 
http://izbicki.me/blog/how-to-create-an-unfair-coin-and-prove-it-with-ma th
 

 
alpha = number of heads
beta = number of tails+1
 
Then I think the answer is the integral from 0 to 0.5 of that pdf?
« Last Edit: Sep 14th, 2012, 9:42am by marsh8472 » IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Biased Coin  
« Reply #4 on: Sep 14th, 2012, 11:48am »
Quote Quote Modify Modify

Something doesn't seem right with that equation; unless it represents something other than what I'd expect.
I'd expect that the exponents of x and (x-1) should be the number of heads and tails respectively; and that the value you get is the probability of getting h heads and t tails when the probability of heads is x.
 
I'm not much of a fan of the Gamma function, I prefer just using factorials and related functions (because I'm more familiar with them, and they're clearer in this case, since the parameters match the values you're working with, which avoids off-by-one errors).
 
So, I'd say f(x, h, t) = (h+t)!/h!/t! * xh * (1-x)t
And then what we're actually after is:
11/2 f(x,h,t) dx / 10 f(x,h,t) dx
The sum of all outcomes (h,t) where the coin is biased in heads favor (x > 1/2), divided by the sum of all outcomes (h,t)
Note that we can just eliminate the factor (h+t)!/h!/t! above and below the dividing line, since it is a constant (and thus it doesn't matter in the end whether we use the Gamma function or factorials). However, I haven't been able to simplify the equation further.
You could use the incomplete Beta function, but that's just begging the question imo.
« Last Edit: Sep 14th, 2012, 12:02pm by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
marsh8472
Newbie
*





   


Posts: 27
Re: Biased Coin  
« Reply #5 on: Sep 15th, 2012, 5:58am »
Quote Quote Modify Modify

on Sep 14th, 2012, 11:48am, towr wrote:
Something doesn't seem right with that equation; unless it represents something other than what I'd expect.
I'd expect that the exponents of x and (x-1) should be the number of heads and tails respectively; and that the value you get is the probability of getting h heads and t tails when the probability of heads is x.
 
I'm not much of a fan of the Gamma function, I prefer just using factorials and related functions (because I'm more familiar with them, and they're clearer in this case, since the parameters match the values you're working with, which avoids off-by-one errors).
 
So, I'd say f(x, h, t) = (h+t)!/h!/t! * xh * (1-x)t
And then what we're actually after is:
11/2 f(x,h,t) dx / 10 f(x,h,t) dx
The sum of all outcomes (h,t) where the coin is biased in heads favor (x > 1/2), divided by the sum of all outcomes (h,t)
Note that we can just eliminate the factor (h+t)!/h!/t! above and below the dividing line, since it is a constant (and thus it doesn't matter in the end whether we use the Gamma function or factorials). However, I haven't been able to simplify the equation further.
You could use the incomplete Beta function, but that's just begging the question imo.

 
Yes that's it Smiley  That was easier than I thought it would be  Grin
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board