Hi,
I couldn't help chipping in here because this is such a common doubt.
For the case of 2 Heads and 5 Tails out of the 7 tosses, the outcomes favourable to us are:
H,H,T,T,T,T,T
T,T,T,T,T,H,H
H,T,H,T,T,T,T
T,H,H,T,T,T,T
..
and so on.
How many such cases will be there?
The number of ways will be same as the number of ways of arranging the letters (H, H, T, T, T, T, T), which is 7!/(5!*2!) or 7C2 or 7C5
Therefore, Number of favourable outcomes = 7C2
Total number of outcomes? 2*2*2*2*2*2*2 = 2^7
Method 1: By the definition of Probabilty,
Probability = (Number of favourable outcomes)/(Total number of outcomes)
So,
Required Probabilty = (7!/(5!*2!)/(2^7) or 7C2/(2^7)
General Case:
If there are r Heads and (n - r) Tails,
the Required Probabilty = (nCr)/(2^n)
Method 2: By adding up individual probability,
(and this is what you were trying to use)
For 2 Heads and 5 Tails,
Required Probability
= P(H,H,T,T,T,T,T) + P(H,T,H,T,T,T,T) + P(H,T,T,H,T,T,T) + .... P(T,T,T,T,T,H,H)
= (1/2)^7 + (1/2)^7 + (1/2)^7 + .... (1/2)^7
(How many terms do we have? As we saw above, it's 7C2)
= (7C2)*(1/2)^7
What you missed out is that the 7 tosses are all different and the 2 Heads and the 5 Tails can be arranged on them
If you understand this then Congratulations on getting an important concept clarified.