Which distribution should I use?

Which prior distribution should I use?

A prior has to live where the parameter lives: a probability on , a rate on , a covariance matrix among the positive-definite ones. Conjugate priors make the posterior a closed form; the relationships page marks every conjugate pair.

  1. A probability (binomial, Bernoulli)?

    Beta(): the posterior after successes in is Beta().

    Beta → Binomial →

  2. A rate (Poisson, exponential)?

    Gamma(): after counts the posterior is Gamma().

    Gamma → Poisson → Exponential →

  3. A mean with known variance?

    A normal prior gives a normal posterior whose precision is the sum of the prior and data precisions.

    Normal →

  4. A variance ?

    The inverse gamma is conjugate. For a scale in a hierarchical model, a half-normal or half-Cauchy is the usual weakly informative choice.

    Inverse gamma → Half-normal → Half-Cauchy →

  5. Category probabilities ?

    Dirichlet(): observed counts are simply added to .

    Dirichlet → Categorical → Multinomial →

  6. A covariance or precision matrix?

    The inverse-Wishart (for a covariance) and the Wishart (for a precision) are conjugate for a multivariate normal.

    Inverse Wishart → Wishart → Multivariate normal →

  7. Need the predictive distribution of new data?

    Integrating the parameter out gives the posterior predictive: beta prior + binomial gives the beta-binomial, gamma + Poisson gives the negative binomial, and an unknown normal variance gives a Student .

    Beta-binomial → Negative binomial → Student's t →

Checking the choice

Simulate from the prior before fitting (a prior predictive check): draw parameters, then fake data, and see whether the fake data look possible.

Other guides: Counts · Waiting times · Proportions · Extremes and tails · Measurements