Math calculator

Negative Binomial Regression Calculator

Counts that spread.

Counts that spread

Support tickets raised per account in a month, against the number of seats on the account. The mean count is 3.40 and the variance is 20.87 — six times larger, where a Poisson model insists they are equal. Fitting one anyway gives standard errors 2.279 times smaller than they should be, so every interval is less than half its proper width. The same fit predicts 9.9 accounts with no tickets at all; 49 had none. The coefficients survive roughly intact, which is exactly why this goes unnoticed: the estimates look fine and only the uncertainty is wrong.

200 rows · mean 3.400 · variance 20.874 · dispersion 1.2090

The Poisson standard errors are 2.279 times too small

Variance is 5.11 times the mean here, and a Poisson model requires them to be equal. The coefficients barely move between the two fits, which is why this is so easy to miss — the estimates look right and only the uncertainty is wrong. Simulated over 200 datasets, a nominal 95% Poisson interval covers the truth 61.5% of the time at a dispersion of 0.5 and 38.5% at 1.2.

Dispersion

1.2090

variance is 5.11× the mean

Standard errors too small by

2.279×

if you fit a Poisson instead

Mean and variance

3.40 / 20.87

Poisson requires these to be equal

Zeros predicted

9.9

by Poisson — 49 observed

The same coefficients, different uncertainty

Poisson and negative binomial coefficients with their standard errors and the ratio between them
TermPoissonIts errorNegative binomialIts errorError ratio
Intercept0.59310.09810.45820.20622.102
Predictor 10.03910.00520.04740.01202.279

Read the last column, not the first two. Poisson regression stays consistent for the coefficients under overdispersion — that is why they barely move — but its standard errors assume a variance the data does not have. Everything downstream inherits that: the intervals, the p-values and every significance claim built on them.

Diagnostics for the Poisson assumption

Dispersion diagnostics and predicted zero counts under each model
DiagnosticValueReading
Dispersion parameter1.20904variance exceeds the mean
Pearson dispersion5.334well above the 1 a Poisson implies
Likelihood-ratio test431.921p = 3.103232e-96
Zeros observed49what the data contains
Zeros a Poisson predicts9.85far too few
Zeros this model predicts54.59closer to the data

The likelihood-ratio test compares the two fits, and its p-value is halved because the null puts the dispersion parameter on the boundary of the parameter space — dispersion cannot be negative, so the usual chi-square reference distribution is the wrong one.

This model handles counts that are more variable than Poisson. It does not handle counts with a separate source of zeros — if the zeros come from units that could never have had an event, a zero-inflated model is the right shape. Compare the observed and predicted zero counts above to tell them apart.

Dispersion estimated Poisson beside it Error ratio per term Boundary-corrected test A genuinely Poisson preset

What this tool shows

A nominal 95% Poisson interval covers the true coefficient 38.5% of the time when counts are overdispersed. Measured over 200 simulated datasets at a dispersion of 1.2, against 61.5% at 0.5 and 96.5% when the Poisson assumption actually holds. The negative binomial interval stayed at 95.0% throughout. This is not a standard error being slightly optimistic — a 95% interval that covers 38.5% of the time is a different interval wearing the wrong label. On the preset the Poisson errors are 2.279 times too small, and the coefficients barely move, which is exactly why it goes unnoticed.

  • A negative binomial fit with the dispersion parameter estimated, not assumed
  • The Poisson fit beside it, with the ratio between their standard errors per coefficient
  • A boundary-corrected likelihood-ratio test of whether the extra parameter is needed
  • Observed zeros against the number each model predicts
  • Pearson dispersion as a second, independent diagnostic
  • A preset where counts are genuinely Poisson and the model collapses to it
Dispersion estimated Poisson beside it Error ratio per term Boundary-corrected test

Poisson regression fixes the variance to the mean. Most real counts do not.

Updated 13 September 2026 · Works in any browser, no installation

Negative binomial regression models counts whose variance exceeds their mean, by estimating the spread as a parameter instead of forcing it to equal the average. Poisson regression assumes variance and mean are identical. When they are not, its coefficients stay roughly right and its standard errors are far too small — so the estimates look fine and every interval and p-value built on them is wrong.

At a glance

Formula shown
The Poisson model sets Var(Y) = μ. The negative binomial sets Var(Y) = μ + αμ², estimating α from the data, so α = 0 returns the Poisson exactly. exp(β) is a rate ratio in both. Testing α = 0 puts the null on the boundary of the parameter space, since dispersion cannot be negative, so the likelihood-ratio p-value is halved relative to the usual chi-square reference.
Scenario support
Support tickets per account, hospital visits per patient, accidents per junction, defects per batch, citations per paper, and any count where a few units contribute far more events than the average would allow.
Educational estimate
Planning support from the values you enter — not professional advice.

What a 95% interval really covers

The usual way to describe overdispersion is that the Poisson standard errors are “too small”, which sounds like a correction of the second decimal. It is worth putting a number on instead.

Two hundred datasets were simulated at each of three settings, with a known true coefficient of 0.7. For each, a Poisson model was fitted and its nominal 95% interval was checked: did it contain the truth?

When the Poisson assumption genuinely held, it did so 96.5% of the time — correct behaviour. At a dispersion of 0.5, 61.5%. At a dispersion of 1.2, 38.5%. The negative binomial interval covered 97.0%, 96.0% and 95.0% across the same three settings.

An interval labelled 95% that contains the truth in fewer than two of five samples is not a conservative interval or a slightly optimistic one. Every significance test built on it is operating at a false-positive rate several times what it claims. And nothing about the fit signals this: the coefficients are consistent under overdispersion, so they land in the right place, and only the uncertainty around them is wrong.

The preset shows the mechanism directly. Mean count 3.40, variance 20.87 — six times larger, where the Poisson model requires them equal. The resulting standard errors are 2.279 times too small, so every interval is under half its proper width.

Three ways to notice

The first is the crudest and usually enough: compare the mean and the variance of the counts. A Poisson model insists they are equal, and on the preset they are 3.40 and 20.87. That comparison ignores the predictors, so it is a screening check rather than a test, but a factor of six is not subtle.

The second is the Pearson dispersion statistic, which is the sum of squared standardised residuals divided by the residual degrees of freedom. It should be about 1 under a correct Poisson fit and comes back at 5.33 here. Unlike the raw comparison it accounts for the predictors, so it is the one to quote.

The third is the likelihood-ratio test between the two fits, reported with its p-value halved. That halving is not a fudge: testing whether the dispersion parameter is zero puts the null on the boundary of the parameter space, because dispersion cannot go negative, and the usual chi-square reference distribution is then the wrong one. The correct reference is a mixture, which works out as halving the ordinary p-value.

A fourth signal is on the tool for a different reason: observed zeros against Poisson-predicted zeros. On the preset a Poisson fit predicts 9.9 accounts with no tickets and 49 had none. Excess zeros are a symptom of overdispersion, but they can also be a separate phenomenon entirely, which the next section covers.

Overdispersed, or zero-inflated

Two different things produce more zeros than a Poisson expects, and they call for different models.

Overdispersion means the rate varies across units. Some accounts raise many tickets, some raise almost none, and the spread of rates produces both a long tail and extra zeros. The negative binomial handles this by construction — it is a Poisson whose rate is itself random — and on the preset it predicts 54.6 zeros against 49 observed, close enough.

Zero inflation means some units could never have had an event at all. Accounts on a plan without support access do not raise tickets at any rate, and they are a different population rather than the low end of one. A zero-inflated model splits them out explicitly.

The predicted-zero row is how to tell. If the negative binomial matches the observed zero count, the spread explains them and there is nothing further to do. If it still falls well short, there is a separate source of zeros that varying the rate cannot reach, and the zero-inflated model is the right shape. The distinction is substantive as much as statistical: it asks whether a zero means “had the opportunity and no events” or “never had the opportunity”.

The other fixes, and when they are enough

Quasi-Poisson is the common alternative: keep the Poisson fit and multiply the standard errors by the square root of the estimated dispersion. It is simple, it fixes the intervals, and it is often sufficient. What it does not give you is a likelihood, so information criteria and likelihood-ratio tests are unavailable, and it does not model the count distribution — so it says nothing about predicted zeros or any other feature of the shape. The same arithmetic is laid out on the Poisson regression page.

Robust or sandwich standard errors are another route to roughly the same place, and carry the same limitation: corrected uncertainty around a model of the mean, with no claim about the distribution.

The negative binomial does more work than either. It is a genuine probability model, so it supports likelihood comparisons, predicts the distribution of counts including the zeros, and gives a dispersion parameter that is interpretable in its own right. The cost is one extra parameter, and the second preset shows what that costs when it is not needed: dispersion 0.0025, coefficients identical to four decimals, standard error ratio 1.005. Nothing is lost by fitting it.

Reporting it

Report the dispersion parameter and the Pearson statistic, not just the coefficients. They are what justify the model choice, and a count model reported without any dispersion diagnostic leaves a reader unable to judge whether the intervals mean anything.

Give rate ratios rather than raw coefficients where the audience is not statistical — exp(β) is a multiplicative effect on the expected count and reads directly. Report observed against predicted zeros, since that is the check that distinguishes overdispersion from zero inflation.

If you fitted a Poisson and found no overdispersion, say so and give the number. “Dispersion 0.0025, likelihood-ratio p = 0.46” is a much stronger statement than the silence that usually stands in for it, and it costs one line.

Sources and methodology

References for the model and for detecting overdispersion.

Method. Coefficients are fitted by iteratively reweighted least squares at a fixed dispersion, alternating with a golden-section search on the profile likelihood for the dispersion itself. The likelihood-ratio p-value is halved because the null sits on the boundary of the parameter space. The coverage figures quoted above come from 200 simulated datasets at each setting with a known true coefficient, counting how often each nominal 95% interval contained it. The suite separately confirms the model collapses onto the Poisson when there is no overdispersion — dispersion below 0.05, coefficients agreeing and standard errors within 1.15 — and that the dispersion parameter is recovered on average at true values of 0.3, 0.8 and 1.5. That engine is verified on every change against 490 assertions. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

Poisson RegressionPoisson regression with rate ratios, the Pearson dispersion check, and quasi-Poisson standard errors printed beside the Poisson ones for every coefficient.
Zero-InflatedFit a zero-inflated Poisson model, with the zeros a plain Poisson would predict against the zeros actually observed and a Vuong comparison.
Negative BinomialShows both conventions at once — failures before the rth success and total trials differ by exactly r, so the same k gives two answers 32% apart and nobody says which they meant.
Poisson DistributionPoisson probabilities with a dispersion test against your own variance — because a Poisson forces variance to equal the mean, and real count data usually does not, which is exactly where the tail goes wrong.
Incidence RateEvents per person-time with the exact Poisson interval, including at zero events: the exact two-sided upper limit is 3.688879 per unit of person-time, not the 3 the one-sided rule of three gives.
Logistic RegressionLogistic regression with odds ratios converted to risk ratios at your own event rate, a likelihood ratio test, AUC, and separation reported rather than hidden.

More in Math, or browse all calculators.

Educational use disclaimer

An educational tool. The negative binomial addresses counts more variable than Poisson; it does not address zeros arising from a separate population, which requires a zero-inflated model. The likelihood-ratio test for dispersion places the null on a parameter boundary and its p-value is halved accordingly. Coverage figures quoted are from simulation under the stated conditions and are not guarantees for any particular dataset.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (5 updates)

Published 13 September 2026

  1. Published a negative binomial fit with the dispersion parameter estimated rather than assumed.
  2. Measured what overdispersion does to coverage: a nominal 95% Poisson interval covers 38.5% of the time.
  3. Printed the standard error ratio per coefficient, since the coefficients themselves barely move.
  4. Halved the likelihood-ratio p-value because the null sits on a parameter boundary.
  5. Compared observed with predicted zeros to separate overdispersion from zero inflation.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.