# How to calculate the probability of $3$ heads out of $10$ coins IF each coin has a different probability for head

Let's say

I have $10$ biased coins. Each coin has a different probability for head.

$$\text{coins} = [10\%, 20\%, 30\% ...]$$ I flip each coin once

What is the probability of getting:

1. At least $3$ heads
2. Exactly $3$ heads
• Someone correct me if I'm wrong but could you make a symmetry argument to say that this is equivalent to treating all the coins as having a probability of $\frac{0.1+0.2+...+1}{10}=0.55$ – Remy Dec 15 '17 at 7:14
• @Remy No, that would be incorrect. For example, suppose you have two coins with probabilities of heads being 0 and 1. The result when you toss these coins is not like tossing two coins with probability of heads 1/2. – awkward Dec 15 '17 at 14:36

You can use a probability generating function. If the probability that coin $i$ comes up heads is $p_i$ for $i = 1,2 ,3 \dots ,10$, then the probability that you will get exactly $n$ heads when the ten coins are tossed is the coefficient of $x^n$ in $$\prod_{i=1}^{10} (1 - p_i + p_i x)$$ when the product is expanded. This is easy if you have a computer algebra system but tedious otherwise.

The result when $p_i = 0.1 i$ is $$0.00036288 x^{10}+0.00699984 x^9+0.0482076 x^8+0.159749 x^7+0.28468 x^6+0.28468 x^5 \\+0.159749 x^4+0.0482076 x^3+0.00699984 x^2+0.00036288 x$$ so the probability of exactly three heads is $0.0482076$. For the probability of at least three heads, add the probabilities for one or two heads and subtract from 1. (It is not possible to get zero heads in this example, because $p_{10} = 1$.)

• Can you explain this a little more: For the probability of at least three heads, add the probabilities for one or two heads and subtract from 1. – samol Dec 15 '17 at 18:38
• @samol If $H$ is the total number of heads, $P(H=0)+P(H=1)+P(H=2)+P(H \ge 3) = 1$. Solve for $P(H \ge 3)$. You could also add up the probabilities of 3, 4, 5, ... , 10 heads, but that's more work. – awkward Dec 15 '17 at 20:34

The solution is easy but cumbersome (if I am using the right word). So, I will show the solution for $4$ coins (for the sake of simplicity.) And assume the probabilities to get heads are different: $a,b,c,d$.

If we have $4$ coins then there are 4 possibilities to get exactly $3$ heads and there is one more possibility to get at least $3$ heads as shown below

Accordingly the probability to get exactly $3$ heads is

$$abc+acd+abd+bcd.$$

If we want the "at least" case then we have to add $abcd$.

In the case of $10$ coins the number of possibilities for exactly $3$ heads is ${10 \choose 3}=120$ and all have to be listed like above. In the "at least" case we have much more possibilities to be listed: $\sum_{i=3}^{10} {10\choose i}$ and all have to be depicted.