The probability mass function of a negative binomial random variable X is given by
$$P(Y=y|\\theta)={r+y-1 \\choose y}(1-\\theta)^y\\theta^r $$ , y=0,1,2... $