[Math] the probability that exactly 7 of the first 10 coin tosses are heads

probabilityprobability theoryproblem solving

A biased coin is tossed infinitely many times and has probability $p$ of being "heads". What is the probability that exactly $7$ of the first $10$ coin tosses are "heads", in terms of $p$?

It's a homework.

What I thought it was the answer:

$p =$ probability of being heads
$(1-p)$ = probability of being tails

So $p$ must happen seven times so: $p^7$, and $(1-p)$ must happen $3$ times, so: $(1-p)^3$.
That way the final answer, in my mind, should be $p^7(1-p)^3$
But it is not.

Could someone help me?

Best Answer

Choose $7$ out of $10$ results to be heads, and $3$ out of the remaining $3$ results to be tails.

So the probability is:

$$\binom{10}{7}\cdot(p^7)\cdot\binom{3}{3}\cdot(1-p)^3=120\cdot(p^7)\cdot(1-p)^3$$