Calculating odds to succeed in N trials with changing success rate and a maximum success rate.

Let me preface this by saying that this is similar to the following question: Calculating Probability with Changing Odds. However I do have some differences in the problem that I am having trouble figuring out.

The problem is:

Imagine you have the chance at succeeding at some task with a base rate of $$R$$. Everytime you fail to succeed, the possible success rate increases by $$10\%$$. That is the new success rate for the next try will be $$R + (R * 0.10)$$ This relation holds true until a maximum success rate of $$2R$$. How do you calculate the average amount of tries to succeed? And how do you calculate the probability that you will fail $$N$$ number of times before succeeding?

So for example if our $$R = 10\%$$ then it will increase by $$1\%$$ each time, upto a maximum success rate of $$20\%$$.

I'm having a bit of trouble modifying the solution from the linked problem to account for this constraint of a maximum success rate. Could anyone provide me a method on how to calculate the average attempts and probability of failing $$N$$ trials?

• You mean somerhing like this here? There is $R=0.5$ and two successes. Commented Apr 29, 2022 at 18:22
• @callculus42 Maybe? I'm having a bit of trouble deciphering how that works. Commented Apr 29, 2022 at 20:17

If $$\ r\$$ is the fraction by which $$\ R\$$ increases after each failure, then the probability $$\ R_n\$$ of success in the next trial after $$\ n\$$ failures is given by $$R_n=\min\big( (1+r)^nR, 2R\big)\ ,$$ —that is, $$\ R_n=(1+r)^nR\$$ if $$\ n\le\left\lfloor\frac{\log(2)}{\log(1+r)}\right\rfloor\$$, or $$\ R_n=2R\$$ otherwise. The probability of success after after exactly $$\ N\$$ failures is therefore $$(1+r)^NR\prod_{n=0}^N\big(1-(1+r)^nR\big)$$ if $$\ N\le d=\left\lfloor\frac{\log(2)}{\log(1+r)}\right\rfloor\$$, or $$2R\left((1-2R)^{N-d}\prod_{n=0}^d\big(1-(1+r)^nR\big)\right)$$ if $$\ N>d\$$.
The expected number of failures occurring before success is terefore \begin{align} \sum_{N=1}^dN(1+r)^NR&\prod_{n=0}^N\big(1-(1+r)^nR\big)\\ &\hspace{2em}+2R\prod_{n=0}^d\big(1-(1+r)^nR\big)\sum_{N=d+1}^\infty N(1-2R)^{N-d}\\ &=\sum_{N=1}^dN(1+r)^NR\prod_{n=0}^N\big(1-(1+r)^nR\big)\\ &\hspace{1em}+2R\prod_{n=0}^d\big(1-(1+r)^nR\big)\sum_{m=1}^\infty (m+d)(1-2R)^m\\ &=\sum_{N=1}^dN(1+r)^NR\prod_{n=0}^N\big(1-(1+r)^nR\big)\\ &\hspace{3em}+(1+2Rd)\prod_{n=0}^d\big(1-(1+r)^nR\big)\ , \end{align} and the expected number of attempts to success will be one more than this.