[Math] Probability of getting 2 head and 2 tail

probability

If a fair coin is tossed 4 times what is the probability that two heads and two tails will result ?

My calculation is.
no. of ways of getting exactly 2 head and 2 tails .will be $6$ out of $8$.
Eg $$HHTT,THHT,TTHH,HTTH,HTHT,THTH,HHHT,TTTH$$

Best Answer

Let the random variable $X$ be the number of heads that come up when a fair coin is tossed $4$ times. Then $X \sim B\left(4, \frac{1}{2}\right)$.

We want there to be exactly two heads (forcing the other two tosses to be tails), so $$\mathbb{P}(X = 2) = \binom{4}{2} \left(\frac{1}{2}\right)^2 \left(\frac{1}{2}\right)^2 = \frac{3}{8}.$$