TITLE: Flipping a set of unfair coins
QUESTION [10 upvotes]: Let's say I have $5$ unfair coins. Each with an independent, known, probability of landing on heads. I flip each coin once. How can I find the probability that I get $3$ or more heads?
Example:
$P(H_1) = .38$
$P(H_2) = .18$
$P(H_3) = .71$
$P(H_4) = .66$
$P(H_5) = .29$

REPLY [2 votes]: Encode using probability generating functions (pgfs). Let $X$ be the number of heads after performing the experiment. Then $X=\sum_{i=1}^5 X_i$ where $X_i$ is a Bernoulli trial for the $i$ th coin $H_i$ with probability of success $p_i$. Let $g_X$ be the pgf of $X$. Since the $X_i$ are independent, it follows that 
$$
\sum_{i=0}^5P(X=i)t^i=g_X(t)=Et^{X}=\prod_i Et^{X_i}=\prod_i [(1-p_i)+p_it]
$$
Using the probabilities given in the question
$$
\begin{align}
g_X(t)&=(0.62+0.38t)(0.82+0.18t)(0.29+0.71t)(0.34+0.66t)(0.71+0.29t)\\
&=0.00929515 t^5 + 0.0888525 t^4 + 0.285981 t^3 + 0.379892 t^2 + 0.200389 t + 0.0355911
\end{align}
$$
Thus
$$
P(X\geq3)=0.38412865
$$