How to interpret Scipy's negative binomial distribution In Python Scipy I obtain the follow result and am not sure how to interpret it
>>> scipy.stats.nbinom(n=2, p=0.5).pmf(1)
0.25

As far as I understood the negative binomial distribution, I should obtain with my function the probability of $2$ successes after only $1$ trial of Bernoulli experiment. Should the probability not be $0$?

As stated in the documentation of scipy.stats.nbinom. The returned probability mass is the probability of failure, NOT success.
