Which distribution should I use?

Which distribution for count data?

Your data are whole numbers: successes, arrivals, defects, clicks, words. Start with what fixes the count, then compare the variance with the mean.

  1. One trial, yes or no?

    A single success/failure is Bernoulli(). With more than two labels it is categorical.

    Bernoulli → Categorical →

  2. A fixed number of independent trials, each with the same chance?

    The number of successes in trials is binomial(). Its variance is always below its mean.

    Binomial →

  3. Drawing without replacement from a small population?

    If you sample items from of which are marked, the marked count is hypergeometric. When is much bigger than it is close to binomial.

    Hypergeometric →

  4. The success chance varies from group to group?

    Trials whose itself varies (by patient, by batch, by player) give more spread than the binomial allows. A beta-distributed gives the beta-binomial.

    Beta-binomial →

  5. Events in a fixed window of time or space, with no upper limit?

    Independent events at a steady rate give a Poisson() count, whose variance equals its mean. Calls per hour, typos per page, decays per second.

    Poisson →

  6. The variance is clearly bigger than the mean?

    Over-dispersed counts are usually negative binomial: a Poisson whose rate varies (gamma-distributed). This is the common case in real data.

    Negative binomial →

  7. Far more zeros than a Poisson predicts?

    If some units can never have an event (non-smokers, idle machines), mix a point mass at zero with a Poisson: the zero-inflated Poisson.

    Zero-inflated Poisson →

  8. Counting trials until the first success?

    The number of trials up to and including the first success is geometric(); failures before the -th success are negative binomial.

    Geometric → Negative binomial →

  9. The difference between two counts?

    Goals scored minus goals conceded, or photon counts minus background: the difference of two independent Poissons is Skellam, and can be negative.

    Skellam →

  10. Counts in several categories at once?

    The counts in each of categories from draws are multinomial.

    Multinomial →

  11. Ranks or frequencies with a long tail?

    Word frequencies, city sizes by rank and similar data where the -th most common item has frequency roughly proportional to follow Zipf's law. The logarithmic distribution is another long-tailed count, used for species abundance.

    Zipf → Logarithmic →

  12. Every value in a range equally likely?

    A fair die, a random ticket from : the discrete uniform. Estimating from a sample of serial numbers is the German tank problem.

    Discrete uniform →

Checking the choice

A quick check: compare the sample variance with the sample mean. About equal suggests Poisson; well above it suggests negative binomial (or zero inflation, if the excess is all at zero); well below it suggests a binomial with a known maximum.

Other guides: Waiting times · Proportions · Extremes and tails · Measurements · Bayesian priors