Unfair coin probability (P) that results in 0.5% chance of getting x tails out of y tosses?

For an unfair coin toss that produces heads with probability P, what is the value of P that will result in 0.5% (i.e. 0.005) chance of getting exactly x tails out of y tosses?

i.e. is there a general solution to ${y\choose x}P^{y-x}(1-P)^x=0.005$ for $P?$

• When you say .5% do you mean the probability multiplied by 100 to get a percent value, or is that just the probability with a percent put at the end? – Dunka Dec 13 '14 at 18:29
• When you say getting $x$ tails, do you mean exactly $x$ tails or at least $x$ tails? – peterwhy Dec 13 '14 at 18:30
• Dunka, I meant what I wrote 0.5% = 0.005. peterwhy, I mean exactly x tails. – user1745038 Dec 13 '14 at 21:23

Since the probability of getting $x$ tails out of $y$ tosses is ${y\choose x}P^{y-x}(1-P)^x$, we just need to solve ${y\choose x}P^{y-x}(1-P)^x=0.005$ for $P.$
• For the $x=1, y=2$ case, your two values are complementary, which makes sense as you can switch the roles of "heads" and "tails" in this case due to symmetry. – mathmandan Dec 16 '14 at 18:25