(The question is very loosely related to Pathfinder 2e, so I left out the tag intentionally. It is actually about Trick Magic Item and a Wand of Tailwind)
I need at least a 10 on a d20. I can roll until I get it, or I get a 1. What is the chance I succeed? I would like to have the general formula, not just for 10.
The chance of success on the first try is 55% (11/20). If I do not succeed, which has a chance of 40%, I can try again with the same chance, so should be:
$$ 0.55 + 0.4 \times 0.55 + (0.4\times0.55)^2 + {...} + (0.4 \times 0.55)^n $$
Generally (TN = target number)
$$ \frac{21-TN}{20} + \frac{TN-2}{20}\times\frac{21-TN}{20} + {...} $$
But how do I calculate the sum of this?
(The question is very loosely related to Pathfinder 2e, so I left out the tag intentionally. But edgerunner asked, so here it is.
If you have the Trick Magic Item skill feat, you can try to cast a 2nd rank Tailwind from a Magic Wand. It lasts 8 hours, so you can try this before your adventuring day starts. As no one is hurrying you, you can try until you Succeed, or until you Critically Fail, which only happens on a 1 by the time you can afford a 5th level wand. There is no consequence in getting 2-9, other than wasting your turn, which is not an issue outside of combat.)