Convention: failures before the rth success
Y counts failures before r successes, so Y starts at 0. Trials have independent outcomes and a common probability 0 < p ≤ 1. Here r is a positive whole-number success target. Total trials T = Y + r.
The final trial must be a success. The coefficient counts placements of the preceding r − 1 successes among the first k + r − 1 trials. Under this convention, E[Y] = r(1 − p)/p and Var(Y) = r(1 − p)/p².
Cells are exact probabilities of the stated failure count, rounded to four decimals. The displayed rows are only part of an infinite support, so the columns need not sum to 1.
Exact probabilities: r = 2 successes
| failures k | p = 0.1 | p = 0.2 | p = 0.3 | p = 0.5 | p = 0.7 |
|---|---|---|---|---|---|
| 0 | 0.0100 | 0.0400 | 0.0900 | 0.2500 | 0.4900 |
| 1 | 0.0180 | 0.0640 | 0.1260 | 0.2500 | 0.2940 |
| 2 | 0.0243 | 0.0768 | 0.1323 | 0.1875 | 0.1323 |
| 3 | 0.0292 | 0.0819 | 0.1235 | 0.1250 | 0.0529 |
| 4 | 0.0328 | 0.0819 | 0.1080 | 0.0781 | 0.0198 |
| 5 | 0.0354 | 0.0786 | 0.0908 | 0.0469 | 0.0071 |
| 6 | 0.0372 | 0.0734 | 0.0741 | 0.0273 | 0.0025 |
| 7 | 0.0383 | 0.0671 | 0.0593 | 0.0156 | 0.0009 |
| 8 | 0.0387 | 0.0604 | 0.0467 | 0.0088 | 0.0003 |
| 9 | 0.0387 | 0.0537 | 0.0363 | 0.0049 | 0.0001 |
| 10 | 0.0384 | 0.0472 | 0.0280 | 0.0027 | 0.0000 |
| 11 | 0.0377 | 0.0412 | 0.0214 | 0.0015 | 0.0000 |
| 12 | 0.0367 | 0.0357 | 0.0162 | 0.0008 | 0.0000 |
| 13 | 0.0356 | 0.0308 | 0.0122 | 0.0004 | 0.0000 |
| 14 | 0.0343 | 0.0264 | 0.0092 | 0.0002 | 0.0000 |
| 15 | 0.0329 | 0.0225 | 0.0068 | 0.0001 | 0.0000 |
| 16 | 0.0315 | 0.0191 | 0.0051 | 0.0001 | 0.0000 |
| 17 | 0.0300 | 0.0162 | 0.0038 | 0.0000 | 0.0000 |
| 18 | 0.0285 | 0.0137 | 0.0028 | 0.0000 | 0.0000 |
| 19 | 0.0270 | 0.0115 | 0.0021 | 0.0000 | 0.0000 |
| 20 | 0.0255 | 0.0097 | 0.0015 | 0.0000 | 0.0000 |
Exact probabilities: r = 3 successes
| failures k | p = 0.1 | p = 0.2 | p = 0.3 | p = 0.5 | p = 0.7 |
|---|---|---|---|---|---|
| 0 | 0.0010 | 0.0080 | 0.0270 | 0.1250 | 0.3430 |
| 1 | 0.0027 | 0.0192 | 0.0567 | 0.1875 | 0.3087 |
| 2 | 0.0049 | 0.0307 | 0.0794 | 0.1875 | 0.1852 |
| 3 | 0.0073 | 0.0410 | 0.0926 | 0.1562 | 0.0926 |
| 4 | 0.0098 | 0.0492 | 0.0972 | 0.1172 | 0.0417 |
| 5 | 0.0124 | 0.0551 | 0.0953 | 0.0820 | 0.0175 |
| 6 | 0.0149 | 0.0587 | 0.0889 | 0.0547 | 0.0070 |
| 7 | 0.0172 | 0.0604 | 0.0800 | 0.0352 | 0.0027 |
| 8 | 0.0194 | 0.0604 | 0.0700 | 0.0220 | 0.0010 |
| 9 | 0.0213 | 0.0591 | 0.0599 | 0.0134 | 0.0004 |
| 10 | 0.0230 | 0.0567 | 0.0503 | 0.0081 | 0.0001 |
| 11 | 0.0245 | 0.0536 | 0.0416 | 0.0048 | 0.0000 |
| 12 | 0.0257 | 0.0500 | 0.0340 | 0.0028 | 0.0000 |
| 13 | 0.0267 | 0.0462 | 0.0275 | 0.0016 | 0.0000 |
| 14 | 0.0275 | 0.0422 | 0.0220 | 0.0009 | 0.0000 |
| 15 | 0.0280 | 0.0383 | 0.0174 | 0.0005 | 0.0000 |
| 16 | 0.0284 | 0.0345 | 0.0137 | 0.0003 | 0.0000 |
| 17 | 0.0285 | 0.0308 | 0.0107 | 0.0002 | 0.0000 |
| 18 | 0.0285 | 0.0274 | 0.0084 | 0.0001 | 0.0000 |
| 19 | 0.0284 | 0.0242 | 0.0065 | 0.0001 | 0.0000 |
| 20 | 0.0281 | 0.0213 | 0.0050 | 0.0000 | 0.0000 |
Exact probabilities: r = 5 successes
| failures k | p = 0.1 | p = 0.2 | p = 0.3 | p = 0.5 | p = 0.7 |
|---|---|---|---|---|---|
| 0 | 0.0000 | 0.0003 | 0.0024 | 0.0312 | 0.1681 |
| 1 | 0.0000 | 0.0013 | 0.0085 | 0.0781 | 0.2521 |
| 2 | 0.0001 | 0.0031 | 0.0179 | 0.1172 | 0.2269 |
| 3 | 0.0003 | 0.0057 | 0.0292 | 0.1367 | 0.1588 |
| 4 | 0.0005 | 0.0092 | 0.0408 | 0.1367 | 0.0953 |
| 5 | 0.0007 | 0.0132 | 0.0515 | 0.1230 | 0.0515 |
| 6 | 0.0011 | 0.0176 | 0.0600 | 0.1025 | 0.0257 |
| 7 | 0.0016 | 0.0221 | 0.0660 | 0.0806 | 0.0121 |
| 8 | 0.0021 | 0.0266 | 0.0693 | 0.0604 | 0.0055 |
| 9 | 0.0028 | 0.0307 | 0.0701 | 0.0436 | 0.0024 |
| 10 | 0.0035 | 0.0344 | 0.0687 | 0.0305 | 0.0010 |
| 11 | 0.0043 | 0.0375 | 0.0656 | 0.0208 | 0.0004 |
| 12 | 0.0051 | 0.0400 | 0.0612 | 0.0139 | 0.0002 |
| 13 | 0.0060 | 0.0419 | 0.0560 | 0.0091 | 0.0001 |
| 14 | 0.0070 | 0.0431 | 0.0504 | 0.0058 | 0.0000 |
| 15 | 0.0080 | 0.0436 | 0.0447 | 0.0037 | 0.0000 |
| 16 | 0.0090 | 0.0436 | 0.0391 | 0.0023 | 0.0000 |
| 17 | 0.0100 | 0.0431 | 0.0338 | 0.0014 | 0.0000 |
| 18 | 0.0110 | 0.0422 | 0.0289 | 0.0009 | 0.0000 |
| 19 | 0.0120 | 0.0408 | 0.0245 | 0.0005 | 0.0000 |
| 20 | 0.0129 | 0.0392 | 0.0206 | 0.0003 | 0.0000 |
Worked example
With r = 3 and p = 0.5, exactly two failures before the third success has probability C(4,2)(0.5)⁵ = 0.1875. It means the third success arrives on trial 5. The expected failure count is 3, while the expected total-trial count is 6.
Achieving three successes within five trials means Y ≤ 2. Summing failures 0, 1 and 2 gives 0.5000. Software counting total trials needs its endpoint shifted by r.
Another parameterization treats the negative binomial as an overdispersed count model with mean and dispersion. Do not transfer those parameter names to this waiting-trial table without a conversion. Changing success probabilities or dependence also changes the trial model.
Continue
Compare the geometric table, which corresponds to r = 1 after translating its trial-count convention. SciPy documents failures before the success target.