# Probability of exactly two heads in four coin flips?

When you flip a coin four times, what is the probability that it will come up heads exactly twice?

My calculation:

• we have $2$ results for one flip : up or down
• so flip $4$ times, we have $4\cdot2 = 8$ results total

Thus the probability is: $2/ 8 = 0.25$ but the correct answer is $0.375$. Can anyone explain why I'm wrong?

• Nope, if you flip 4 times, there are $2^4$ possible outcomes. How many of these outcomes have two heads? – Irvan Oct 6 '14 at 8:15

## 3 Answers

My calculation:

we have 2 results for one flip : up or down so flip 4 times, we have 4x2 = 8 results total

Two results for each of four coin flips. When ways to perform tasks in series, we multiply. So that is $2\times 2\times 2\times 2$ results in total. That is $2^4$ or $16$.

For the favourable case we need to count the ways to get $2$ heads and $2$ tails. The count of permutations of two pairs of symbols is: $\frac{4!}{2!2!}=6$. This is easily confirmed by just counting.

$$\Bigl|\{\mathsf {HHTT, HTHT, HTTH, THHT, THTH, TTHH}\}\Bigr|=6$$

Thus the probability is: $\tfrac{\;6}{16}$, or: $$0.375$$

• Thanks, i got the idea, but i don't understand what "!" is ? – NeedAnswers Oct 6 '14 at 11:19
• @hoangnnm It's the Factorial notation. $n!$ is the product of all integers less than or equal to $n$. $n!=(n)(n-1)(n-2)\cdots(2)(1)$ en.wikipedia.org/wiki/Factorial – Graham Kemp Oct 6 '14 at 11:55
• oh. i got it now. your anwser is easier for me to understand. Therefore, i will remark yours as answer! – NeedAnswers Oct 6 '14 at 13:28

Assuming unbiased coin with probability of head $=\dfrac12$

and using Binomial Distribution, $$\binom42\left(\frac12\right)^2\left(1-\frac12\right)^{4-2}$$

Use binomial probability since there are only two possibilities: success and failure, where success represents getting a heads, and tails being a fail.

Let $X$ = Success (i.e. heads)

Therefore we are trying to find $P(X=2)$, which is $\binom42\cdot(0.5)^2\cdot(0.5)^2=0.375$.

Hope this helped!

The derivation of binomial probability:

Getting two heads out of 4 can be portrayed is, disregarding order:

HHTT (H=heads and T=tails)

Multiplying their probabilities will yield $(0.5)^4$, but as for ordering, we get $4!/(2!\cdot2!)$ due to repetition, which is the same as $4C2$. So our answer is $\binom42\cdot(0.5)^4$ which is $0.375$

• If you don't know what binomial probability is, I highly suggest you learn it, as even if it is not part of your course content, you will benefit greatly from it nonetheless, in the area of probability. – dsfsdggasrgzafd Oct 6 '14 at 8:23
• Thanks alot. By the way, can you recommend some algorithm that use previous events to calculate the posibilites of the outcome? – NeedAnswers Oct 6 '14 at 11:15
• And i don't quietly under this part : (4 2) , what operator is this? It is clearly not a division! – NeedAnswers Oct 6 '14 at 11:18