Suppose I have 6 different coins that have wildly different increasing chances of flipping a heads, and I know the chances of flipping a heads for each.

(ie. Coin 1: 1/280 chance of heads ... Coin 6: 1/120 chance of heads)

Without looking, if I choose one of these coins at random and flip it some limited number of times, how can I determine the probability it is each of the 6 coins in relation to each other from the results alone?

(ie. A result like [Coin1: 5%, Coin2: 7%, Coin3: 10%, Coin4: 14%, Coin5: 25%, Coin6: 39%])

My statistics knowledge is limited to what I learned in first year university, so I originally thought I could solve this problem using the chi-square test with the expected results of each of the 6 coins. The problem is this gives me the probability that the results were simply due to chance vs it not actually being that coin (possibly not even one of the original 6 coins, when I know it must be one of the 6 coins!).

So for example if I flipped a coin 10,000 times and (by some extreme chance) every result was a heads, I should be getting a result reporting the confidence of coin 6 as being something extremely high with a very tiny % chance of being coin 1 to 5. Instead the result I get is that there's a 0.000001% or so chance of it being any of the 6 coins at all.

Am I using the wrong approach to solving this problem?

  • 1
    $\begingroup$ Is this homework or an example from a book? If so, please add the self-study tag. $\endgroup$
    – Peter Flom
    Feb 7, 2014 at 12:20
  • $\begingroup$ I posted an answer, assuming since you mentioned that your stats knowledge was limited to your first year university that this is related to an actual problem you have and not self-study, but I guess I should let you clarify that. If it is not self-study, I'll undelete my post. $\endgroup$ Feb 7, 2014 at 12:50
  • $\begingroup$ @spd You might as well undelete it: it's not our job to enforce academic honesty codes around the world. Moreover, you provide guidance and an approach rather than a complete answer and that's in the spirit of answering self-study questions anyway. $\endgroup$
    – whuber
    Feb 7, 2014 at 15:47
  • $\begingroup$ @spdickson I'm not a student anymore, it's related to an actual problem I'm trying to solve. $\endgroup$
    – arcade
    Feb 7, 2014 at 18:11
  • $\begingroup$ Great, then I hope the answer is useful to you. Let me know if you have any questions. $\endgroup$ Feb 7, 2014 at 18:24

1 Answer 1


Say you know the probabilities are $\left\{p_1,p_2,p_3,p_4,p_5,p_6\right\}$. If you flip a coin $n$ times and get $x$ heads you can calculate the probability of $x$ heads out of $n$ flips given $p_1$ probability of flipping heads using the binomial distribution: $$Pr(x|n,p_1)=\binom{n}{x}p_1^n\left(1-p_1\right)^{n-x}$$ Since you know that it can only be one of those 6 probabilities you can calculate the total probability as follows: $$\sum_{i=1}^{6}\binom{n}{x}p_i^n\left(1-p_i\right)^{n-x}$$ You can put these two probabilities together to get the probability that the coin you flipped has probability of success $p_1$: $$\frac{\binom{n}{x}p_1^n\left(1-p_1\right)^{n-x}}{\sum_{i=1}^{6}\binom{n}{x}p_i^n\left(1-p_i\right)^{n-x}}$$


With regards to large $n$, as is pointed out in the comments, large $n$ should not be a problem computationally because the above simplifies to $$\frac{p_1^n\left(1-p_1\right)^{n-x}}{\sum_{i=1}^{6}p_i^n\left(1-p_i\right)^{n-x}}$$

  • $\begingroup$ Is there by any chance a typo in your formulas? I see the probability mass function listed elsewhere with the number of successes above the p1 probability of flipping heads, which I've used instead. Additionally, as the number of trials I'm using often ends up being above 10,000, can I use a normal approximation to the binomial distribution to calculate this quicker? I'll read up on it a bit more. $\endgroup$
    – arcade
    Feb 10, 2014 at 8:31
  • $\begingroup$ @arcade See the PMF in binomial distribution. I don't see a typo, but that doesn't mean there isn't one. As for an approximation that might be quicker for large $n$, see my update. $\endgroup$ Feb 10, 2014 at 13:25
  • $\begingroup$ Why do you need an approximation for large $n$? Because $\binom{n}{x}$ cancels in the fraction it doesn't really appear in the formula, leaving quantities that are easily computed even for enormous $n$. $\endgroup$
    – whuber
    Feb 10, 2014 at 17:26
  • $\begingroup$ @whuber Excellent point. I got too caught up in the fact that I knew there was an approximation to think about whether it should be necessary. $\endgroup$ Feb 10, 2014 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.