# What is the expected number of trials before x successes with variable probability?

I am trying to calculate the probability of reaching n successes on a trial, knowing that a failure will increase success chance.

In simpler term, what is the mean number of trials before we reach $$x$$ successes with $$p = min(y + wF, 1)$$? (with $$F$$ being the number of failures)

This does include the fact that after a certain number of failures, success is guaranteed ($$p>1$$).

I've tried to inspire myself from this question, but I don't want $$F$$ to reset upon success.

• Confusing. Looks like you intend that if $wy = q$ and $F$ is the number of failures that have already occurred, then chance of failure on next trial is $qF$. If this is wrong, please advise. If this is right, then what is the chance of failure on the very 1st trial? Commented Jun 15, 2021 at 7:19
• Re previous comment - perhaps I am misinterpreting your mathematical intent. Please edit your question, using MathJax to show math. Also, re previous comment, I question whether my interpretation is tenable. Besides the problem of determining chance of failure on 1st trial, chance of failure on any trial must be $\leq 1$. However, the expression $qF$ may exceed $1$. Commented Jun 15, 2021 at 7:23
• @user2661923 Thanks for your comment, I'll try to update my question to make it more clear. Also, correcting my typo: $p$ is the chance of success, defined by a base probability $y$ plus $wF$. Not multiplied. Commented Jun 15, 2021 at 7:27
• Then, how do you prevent $y + wF$ from exceeding $1$? Commented Jun 15, 2021 at 7:28
• You could simply specify $p = \min(y + wF, 1)$, if that accurately represents your intent. Commented Jun 15, 2021 at 8:13