Binomial theorem in probability We know according to binomial probability theorem ,
$$P= \binom{n}{r} p^r (1-p)^{n-r} \tag{1}$$
Now If I flip a coin 10 times and want to get the probability for 4 heads then we get according to the binomial theorem:
$$P= \binom{10}{4} \left({\frac{2}{5}}\right)^4\left(1-\frac{2}{5}\right)^{6}$$
Am I right?
If I'm right then what would be for the Newton–Pepys problem.
Why did they use the probability 
$$P= 1-\binom{n}{r} p^r (1-p)^{n-r}$$

Cant we use eq(1)?


The Binomial Distribution looks something like this:
Your first formula should actually be a summation when you are looking for multiple values. You should always look for the most efficient way to isolate the specific range of values you are looking for. Keep in mind that all the probabilities add up to 1, and if the probability of success is .5, then the left half and the right half both sum to .5. You should use subtraction and symmetry whenever it gets you the correct range faster.
Say for example that you want the probability that the number of heads is between $2$ and $8$, inclusive. You might calculate the probability that it's $0$ or $1$, (knowing that those are equivalent to $P(9)$ and $P(10)$), double it, and subtract it from $1$. Or you might calculate $P(2)+P(3)+P(4)$, double it (it's equal to  $P(6)+P(7)+P(8)$), and add $P(5)$.
