Trials until r-th success (generalization of geometric)
The negative binomial distribution models the number of trials needed to achieve successes in repeated independent trials. The probability mass function is . The expected value is and the variance is . This distribution is used for modeling scenarios like the number of calls until sales are made, games played until wins are achieved, or attempts until successes occur.
CDF for waiting time until r-th success