Algorithm Search⌘K

Definitioncore

Improper prior

Also called flat prior.

A prior measure with infinite total mass, such as a uniform prior on the real line. It is usable when the posterior it gives is proper.

An improper prior is a measure on the parameter space with infinite total mass, used in Bayes' theorem in the place of a prior density. Standard cases are the flat density on the real line for a location parameter and the density 1/σ1/\sigma for a scale parameter. The product of likelihood and prior can still have a finite integral, and then the normalized product is a proper posterior that can be used like any other. Whether it is proper depends on the model and often on the data, so it must be checked; an improper prior also gives no joint law of parameter and data, so marginal likelihoods and Bayes factors are not defined.

Definition

Let the data xx have density f(x∣θ)f(x \mid \theta), θ∈Θ\theta \in \Theta. An improper prior is a σ\sigma-finite measure on Θ\Theta with infinite total mass; on Θ⊆Rd\Theta \subseteq \mathbb{R}^d it is given by a density π(θ)≥0\pi(\theta) \ge 0 with ∫Θπ(θ) dθ=∞\int_\Theta \pi(\theta)\, d\theta = \infty.

  • The formal marginal is m(x)=∫Θf(x∣θ) π(θ) dθm(x) = \int_\Theta f(x \mid \theta)\, \pi(\theta)\, d\theta.
  • If 0<m(x)<∞0 < m(x) < \infty, the formal posterior π(θ∣x)=f(x∣θ)π(θ)/m(x)\pi(\theta \mid x) = f(x \mid \theta)\pi(\theta)/m(x) is a probability density, and the posterior is called proper. If m(x)=∞m(x) = \infty, there is no posterior.
  • An improper prior is defined only up to a positive constant cc. The posterior does not depend on cc; the formal marginal m(x)m(x) does.

A prior is improper because of its total mass, not because it is flat: the uniform density on [0,1][0, 1] is a proper prior, and 1/σ1/\sigma on (0,∞)(0, \infty) is improper without being flat. A noninformative prior can be proper, such as the Jeffreys prior Beta(1/2,1/2)(1/2, 1/2) for a binomial proportion.

Why use one. Improper priors appear in three ways.

  1. As limits of proper priors. The posterior for a normal mean under the prior N(0,τ2)N(0, \tau^2) tends to the posterior under the flat prior as τ→∞\tau \to \infty.
  2. From invariance. The flat prior on a location and 1/σ1/\sigma on a scale are the priors left unchanged by shifts and by changes of units; the Jeffreys prior and the reference prior are often improper.
  3. To give estimators with good frequentist risk. The minimizer of posterior expected loss under an improper prior is a generalized Bayes estimator; many admissible estimators are of this form, and some generalized Bayes estimators are not admissible, such as the sample mean of a normal vector in three or more dimensions.

What breaks. Under an improper prior (θ,X)(\theta, X) has no joint probability law and mm is not a probability density, since ∫m(x) dx=∫π(θ) dθ=∞\int m(x)\, dx = \int \pi(\theta)\, d\theta = \infty. Three consequences follow.

  • Propriety must be checked. For each model, find the data sets with m(x)<∞m(x) < \infty. The check is analytic: bound the integral of f(x∣θ)π(θ)f(x \mid \theta)\pi(\theta) near every place where π\pi or ff is large, such as the ends of Θ\Theta and points where a variance is 0.
  • A sampler does not check it. The full conditional laws used by Gibbs sampling can all be proper while the joint posterior is not. The chain then runs and gives numbers that approximate nothing (Hobert and Casella, 1996).
  • Bayes factors are undefined. The Bayes factor m1(x)/m0(x)m_1(x)/m_0(x) changes by the factor cc when the improper prior π1\pi_1 of model 1 is replaced by c π1c\,\pi_1, so its value is arbitrary. The constant cancels only for a parameter that both models share with the same prior. A very diffuse proper prior in its place gives a Bayes factor that depends on the prior scale; that is the Lindley paradox.

Examples and non-examples

A normal mean, flat prior. Let X1,…,Xn∣μX_1, \ldots, X_n \mid \mu be iid N(μ,σ2)N(\mu, \sigma^2) with σ\sigma known and π(μ)=1\pi(\mu) = 1 on R\mathbb{R}. Then m(x)m(x) is finite for n≥1n \ge 1 and the posterior is N(xˉ,σ2/n)N(\bar x, \sigma^2/n). Its 95% credible interval has the numbers of the z confidence interval.

A normal mean and scale, prior 1/σ1/\sigma. Let π(μ,σ)=1/σ\pi(\mu, \sigma) = 1/\sigma on R×(0,∞)\mathbb{R} \times (0, \infty). For n≥2n \ge 2 observations that are not all equal the posterior is proper, and μ∣x\mu \mid x is distributed as xˉ+(s/n) tn−1\bar x + (s/\sqrt n)\, t_{n-1}, with s2s^2 the sample variance with divisor n−1n - 1. For the data 2.1, 3.4, 2.9, 3.8 (xˉ=3.05\bar x = 3.05, s=0.73258s = 0.73258, t(3,0.975)=3.18245t_{(3, 0.975)} = 3.18245) the 95% credible interval for μ\mu is [1.8843,4.2157][1.8843, 4.2157], the same numbers as the t confidence interval. For n=1n = 1 the posterior is improper: integrating over μ\mu first gives ∫0∞σ−1 dσ=∞\int_0^\infty \sigma^{-1}\, d\sigma = \infty.

The Haldane prior. For X∣p∼X \mid p \sim Binomial(n,p)(n, p) take π(p)=p−1(1−p)−1\pi(p) = p^{-1}(1 - p)^{-1} on (0,1)(0, 1), the formal Beta(0,0)(0, 0). The formal posterior is Beta(x,n−x)(x, n - x), which is proper only when 0<x<n0 < x < n. For x=0x = 0, m(0)=∫01p−1(1−p)n−1 dp=∞m(0) = \int_0^1 p^{-1}(1 - p)^{n-1}\, dp = \infty. A data set with no successes, the case where a prior matters most, gives no posterior at all.

A variance component with prior 1/τ21/\tau^2. Let Xi∣θi∼N(θi,1)X_i \mid \theta_i \sim N(\theta_i, 1) and θi∣τ2∼N(0,τ2)\theta_i \mid \tau^2 \sim N(0, \tau^2) for i=1,…,ki = 1, \ldots, k, with π(τ2)=1/τ2\pi(\tau^2) = 1/\tau^2. Integrating out the θi\theta_i gives Xi∣τ2X_i \mid \tau^2 iid N(0,1+τ2)N(0, 1 + \tau^2), whose likelihood L(τ2)L(\tau^2) tends to the positive value ∏iφ(xi)\prod_i \varphi(x_i) as τ2→0\tau^2 \to 0, where φ\varphi is the standard normal density. So ∫01L(τ2) τ−2 dτ2=∞\int_0^1 L(\tau^2)\, \tau^{-2}\, d\tau^2 = \infty, and the posterior is improper for every data set. Yet both full conditionals are proper: θi∣τ2,x∼N(xiτ2/(1+τ2),τ2/(1+τ2))\theta_i \mid \tau^2, x \sim N\big(x_i\tau^2/(1 + \tau^2), \tau^2/(1 + \tau^2)\big), and τ2∣θ\tau^2 \mid \theta is inverse gamma with shape k/2k/2 and scale ∑iθi2/2\sum_i \theta_i^2/2.

What the Gibbs sampler does (measured). Take k=8k = 8 and start the chain at τ2=1\tau^2 = 1. For data drawn with seed 7 and θi∼N(0,1)\theta_i \sim N(0, 1) (∑xi2=11.86\sum x_i^2 = 11.86), τ2\tau^2 fell below 10−610^{-6} at iteration 237 and was 2.9×10−322.9 \times 10^{-32} at iteration 2000: the chain fell into the infinite mass at 0. For data drawn with θi∼N(0,32)\theta_i \sim N(0, 3^2) and seeds 1, 2 and 3 (∑xi2=93.28\sum x_i^2 = 93.28, 93.59 and 63.15), 200000 iterations never went below 0.33, and the medians of the first 10000 draws were 11.5, 11.38 and 7.38. Those chains look healthy, but there is no posterior for them to approximate.

Non-example: the uniform prior on [0,1][0, 1]. It is flat and proper. The "flat prior" alias of this page refers to flat densities on unbounded sets.

Non-example: a vague proper prior. N(0,106)N(0, 10^6) for a mean is proper, so the posterior always exists. When the data are informative its posterior is close to the flat-prior one, but its marginal likelihood, and so any Bayes factor that uses it, depends on the value 10610^6.

  • Jeffreys prior. The prior proportional to det⁡I(θ)\sqrt{\det I(\theta)}; improper for location and scale families, proper for a binomial proportion.
  • Reference prior. Bernardo's prior that lets the data dominate; often improper, and defined as a limit of proper priors on compact sets.
  • Generalized Bayes estimator. The minimizer of posterior expected loss under an improper prior with a proper posterior; see Bayes estimator.
  • Marginal likelihood. Defined only up to the arbitrary constant of an improper prior, so it cannot compare models.
  • Hierarchical Bayesian model. The setting where improper priors on variance components most often give improper posteriors; proper priors such as a half-Cauchy on the standard deviation avoid the problem.

References

  1. James P. Hobert and George Casella, The effect of improper priors on Gibbs sampling in hierarchical linear mixed models, Journal of the American Statistical Association 91(436), 1996, pages 1461 to 1473 (conditions for a proper posterior in hierarchical linear mixed models, and Gibbs samplers whose conditionals are proper while the joint posterior is not)
  2. Christian P. Robert, The Bayesian Choice, 2nd edition, Springer, 2007, Chapter 1 (improper prior distributions) and Chapter 3 (noninformative priors)
  3. Andrew Gelman, John B. Carlin, Hal S. Stern, David B. Dunson, Aki Vehtari and Donald B. Rubin, Bayesian Data Analysis, 3rd edition, CRC Press, 2013, Chapter 2 (noninformative and improper priors, and the need to check that the posterior is proper) and Chapter 5 (hierarchical models and the prior for the group-level variance)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/9EF9PG/text.yaml