I know the probability of success of a surgery is 0.85. I want to know what is the probability that it'll be successful in 7 patients given the fact it was successful to 5 ones.
I thought about calculating $$P(X=6)+P(X=7)$$ where $X$ is a negative binomial variable. So, the probability would be: $$\binom{7-1}{6-1}\cdot0.85^6\cdot0.15^1+\binom{7-1}{7-1}\cdot0.85^7\cdot0.15^0$$ is it correct?
Given that $n$ patients were treated, of which at least $5$ were successful, the probability that at least $7$ are successful is $$\Pr[X \ge 7 \mid X \ge 5] = \frac{\Pr[X \ge 7]}{\Pr[X \ge 5]} = \frac{\sum_{x=7}^n \binom{n}{x} (0.85)^x (0.15)^{n-x}}{\sum_{x=5}^n \binom{n}{x} (0.85)^x (0.15)^{n-x}}.$$ For $n = 7$, this is simply $\frac{289}{835}$. A plot of this probability as a function of $n$ is provided below.