Negative Binomial Distribution
Enter the number of successes r and success probability p to compute the negative binomial probability mass P(X=k), cumulative probability, upper tail, mean, and variance, visualized as a bar chart.
Input
Enter the number of successes r, the success probability p, and the number of failures k to compute negative binomial probabilities.
Failures before reaching r successes. A non negative integer.
Target number of successes. A positive number.
Probability of success on each trial. Greater than 0 and at most 1.
Result
Probability mass P(X = 3)
0.13671875
Cumulative P(X ≤ k)
0.36328125
Upper tail P(X greater than k)
0.63671875
Mean
5
Variance
10
Probability mass distribution
How it works
- The negative binomial distribution models the number of failures k that occur before achieving r successes in independent Bernoulli trials with success probability p.
- The probability mass is given by P(X=k)=C(k+r−1,k)·p^r·(1−p)^k, where k is the number of failures and is a non negative integer.
- The cumulative probability sums the masses from k=0 to give P(X≤k), and the upper tail is 1−P(X≤k).
- The mean is r(1−p)/p and the variance is r(1−p)/p².
- The combination C(k+r−1,k) is evaluated in log space using the log gamma function to avoid overflow.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Negative Binomial Distribution