Why Put Positive Prior Probability at Zero?
A variance component can be small without being exactly zero. That distinction matters when the scientific question is whether the model needs a particular source of group-level variation at all, rather than whether the variation is merely modest. A prior that is continuous over positive variances can express beliefs about how large the component might be, but it assigns probability zero to the single value zero. It therefore cannot, by itself, produce a positive posterior probability that the component is exactly absent.
A point-mass prior addresses that question directly. It places some prior probability at zero and spreads the remaining probability over positive values. The data then update the relative support for a model with no variation from this component and one with positive variation. The result is a posterior probability for exact zero, not a statement that the variance is likely to be merely close to zero.
Model and Prior Definition
Consider a GLMM with one variance component of interest, denoted by \(\psi=\tau^2\), where \(\tau\) is the corresponding random-effect standard deviation. For example, if \(b_j\) is a random intercept for group \(j\), the model may specify \(b_j\mid\psi\sim N(0,\psi)\). At \(\psi=0\), this distribution is degenerate at zero: the random intercept is zero for every group. At \(\psi>0\), it allows group-to-group variation. Other fixed effects and model parameters are collected in \(\theta\).
Let \(H_0\) denote the model with \(\psi=0\), and let \(H_1\) denote the model with \(\psi>0\). For observed data \(y\), write \(f(y\mid\theta,\psi)\) for the likelihood after integrating over the random effects according to the GLMM. Under \(H_0\), the random effect associated with this component is fixed at zero; other model components, if present, remain part of the model.
The slab density \(g\) describes prior uncertainty conditional on the component being positive. It must integrate to one over \(\psi>0\). A density on the positive line has no point probability at zero, even if it concentrates substantial density near zero. The spike, in contrast, assigns actual probability to the single value \(\psi=0\).
For a well-defined comparison, the nuisance-parameter priors must also be specified under both hypotheses. Denote them by \(p_0(\theta)\) and \(p_1(\theta\mid\psi)\). They may be chosen to agree on parameters common to both models, but this choice must be made deliberately. The marginal likelihoods are
These quantities average the likelihood over each model's prior uncertainty. In particular, \(m_1(y)\) averages over the slab as well as over nuisance parameters; it is not the likelihood evaluated at the best-fitting positive variance.
Posterior Odds: The Updating Rule
Define the Bayes factor in favor of positive variance over exact zero by \(BF_{10}=m_1(y)/m_0(y)\). The posterior odds equal the prior odds multiplied by this Bayes factor. The relation follows directly from Bayes' rule:
Converting the odds to probabilities gives
The probabilities sum to one because the comparison contains just these two hypotheses. A Bayes factor greater than one favors positive variance relative to zero; a Bayes factor less than one favors zero relative to positive variance. Neither statement alone determines the posterior probability: the prior odds also matter.
Worked Example: Updating Prior Odds With a Bayes Factor
Suppose the prior probability of exact zero is \(\pi_0=0.40\). After integrating over the relevant parameters, suppose the hypothetical data give \(m_0(y)=0.12\) and \(m_1(y)=0.36\). Calculate the posterior probabilities.
First, the Bayes factor for positive variance is $$ BF_{10}=\frac{m_1(y)}{m_0(y)}=\frac{0.36}{0.12}=3. $$ Thus, the observed data are three times as probable under the slab model as under the zero-variance model, using the specified prior averages.
The prior odds for positive variance versus zero are $$ \frac{P(H_1)}{P(H_0)}=\frac{0.60}{0.40}=1.5. $$ The posterior odds are therefore \(3(1.5)=4.5\) to 1 in favor of positive variance. Converting to probability, $$ P(H_1\mid y)=\frac{4.5}{1+4.5}=0.8182,\qquad P(H_0\mid y)=1-0.8182=0.1818. $$ Under this specified model and prior, the posterior probability of a positive variance component is about 0.818, and that of exact zero is about 0.182. These are conditional probabilities given the data and the model specification, not probabilities that the hypotheses are universally true.
Computing the Slab Marginal Likelihood
The slab evidence averages across plausible positive values. This averaging is essential: a wide slab can place substantial prior probability on values that fit the data poorly, which affects its marginal likelihood even if some particular positive value fits well. For a finite mixture slab with positive support points \(\psi_1,\ldots,\psi_K\) and weights \(w_k\) summing to one, the integral has the transparent approximation
where \(m(y\mid\psi_k)\) is itself averaged over nuisance parameters. This finite calculation illustrates the averaging operation; in a continuous slab, the corresponding weighted average is an integral.
Worked Example: Averaging Evidence Across a Slab
Consider a hypothetical slab represented by three positive variance values, \(\psi_1=0.25,\ \psi_2=0.50,\ \psi_3=1.00\), with prior weights \(0.20,\ 0.50,\ 0.30\). Suppose the nuisance-averaged data evidences at those values are respectively \(0.10,\ 0.20,\ 0.05\), and the zero-model evidence is \(m_0(y)=0.09\). Let \(\pi_0=0.70\).
The slab marginal likelihood is the weighted average $$ m_1(y)=(0.20)(0.10)+(0.50)(0.20)+(0.30)(0.05) =0.020+0.100+0.015=0.135. $$ Hence \(BF_{10}=0.135/0.09=1.5\). The prior odds for positive variance are \(0.30/0.70=0.4286\), so the posterior odds are \(1.5(0.4286)=0.6429\) to 1 in favor of positive variance. Therefore $$ P(H_1\mid y)=\frac{0.6429}{1+0.6429}=0.3913,\qquad P(H_0\mid y)=0.6087. $$ Although the data favor the slab in Bayes-factor terms, the prior assigns much greater probability to zero. The posterior probability of exact zero remains larger. This is not a contradiction: evidence and prior odds both contribute to the posterior.
Interpreting the Test and Its Assumptions
The calculation is valid when the two hypotheses and their priors define proper predictive distributions for the data. In practice, this requires a proper slab density, proper priors for nuisance parameters (or other conditions ensuring finite, well-defined marginal likelihoods), and a likelihood that matches the assumed GLMM. The random-effect distribution and link, the meaning and scale of \(\psi\), and the prior probabilities must all be stated. A variance of 0.5, for example, has meaning only relative to the random-effect scale used in the model.
Under these conditions, the Bayes factor compares the probability assigned to the observed data by the two prior-predictive distributions. It does not compare only their maximum likelihoods, and it is not a frequentist p-value. A posterior probability such as \(P(H_0\mid y)=0.61\) is a probability assigned to the exact-zero hypothesis after combining the data with the stated prior model; it is not a 61% long-run error rate.
A point-mass comparison also differs from using only a continuous prior on \(\psi>0\). Under such a continuous prior, \(P(\psi=0)=0\) before seeing data. If the likelihood is regular enough for a posterior density to exist, the posterior probability at that single point remains zero. A high density near zero can indicate that small positive values receive substantial posterior support, but it does not create posterior mass at exact zero.
Worked Example: Data Favoring Exact Zero
Suppose a hypothetical analysis gives \(m_1(y)=0.025\) and \(m_0(y)=0.10\), with prior probability \(\pi_0=0.20\). Find the posterior probability of zero.
The Bayes factor for positive variance is \(BF_{10}=0.025/0.10=0.25\), so the data favor exact zero by a factor of \(1/0.25=4\) in the marginal-likelihood comparison. The prior odds for positive variance are \(0.80/0.20=4\) to 1. Updating gives posterior odds \(4(0.25)=1\) to 1. Thus $$ P(H_0\mid y)=\frac{1}{1+1}=0.50,\qquad P(H_1\mid y)=0.50. $$ The data favor zero relative to the slab, but the prior initially favored positive variance by four to one. The two influences exactly balance here. It would be incorrect to report that the posterior probability of zero is 0.80: that was the prior probability, before incorporating the data.
Diagnostics, Alternatives, and Limitations
A numerical posterior probability is meaningful only to the extent that the model and calculation are credible. Check that the likelihood includes the required random-effect integration, the slab weights or density are normalized, and \(m_0(y)\) and \(m_1(y)\) are computed on the same observed data and response scale. If the marginal likelihoods are extremely small, compute their ratio using log marginal likelihoods to avoid numerical underflow. For example, \(\log BF_{10}=\log m_1(y)-\log m_0(y)\).
A further diagnostic is to inspect whether the fitted model can plausibly represent the data under both hypotheses. Poor fit under both does not become reassuring because one marginal likelihood is larger. Compare relevant data features with model-based predictions and examine whether conclusions depend on implausible prior regions. The Bayes factor and posterior probability are conditional on the likelihood, the slab, the prior probability \(\pi_0\), and the nuisance-parameter priors.
The main alternatives answer different questions. A continuous prior alone estimates uncertainty among positive values but cannot assign probability to exact zero. A likelihood-ratio test compares fit under constrained and unconstrained models using a frequentist calibration; because zero is at the boundary of the nonnegative variance space, its reference distribution need not be the usual interior-parameter chi-square distribution. The point-mass Bayesian approach instead makes the prior odds explicit and reports posterior model probabilities. It does not remove the need to specify assumptions, and its answers can depend on the slab and on \(\pi_0\).
Computation also has a structural pitfall. A sampler that updates \(\psi\) only as a continuous positive quantity will not visit the exact value zero; a density estimate near zero is not a posterior model probability. Exact inference requires a method that represents the point mass, such as explicit model-indicator sampling or separate computation of the two marginal likelihoods. These methods can be challenging in complex GLMMs, especially when the random-effect likelihood is expensive to integrate.
The practical value of this formulation is that it makes the scientific distinction explicit: evidence for a small positive component is not automatically evidence for an exactly absent component. It also forces the analyst to report both the prior odds and the data-based Bayes factor, making the source of a posterior conclusion more transparent. The limitation is equally important: a posterior probability is not prior-free, and the models being compared may both be inadequate.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A prior assigns probability 0.25 to zero variance. What is the prior odds for positive variance versus zero?
- If \(BF_{10}=2\) and the prior probability of zero is 0.60, calculate the posterior probability of positive variance.
- Why does a continuous prior density on positive variances not give positive posterior probability to exact zero?
- Suppose the slab marginal likelihood is 0.08 and the zero-model marginal likelihood is 0.16. Interpret \(BF_{10}\).
Solutions. (1) The prior probability of positive variance is \(0.75\), so the odds are \(0.75/0.25=3\) to 1. (2) The prior odds for positive variance are \(0.40/0.60=2/3\). The posterior odds are \(2(2/3)=4/3\), so \(P(H_1\mid y)=(4/3)/(1+4/3)=4/7\approx0.5714\). (3) A continuous distribution assigns probability zero to any single point, and Bayesian updating with a likelihood does not turn that zero prior point mass into a positive point mass. (4) \(BF_{10}=0.08/0.16=0.50\). The data are half as probable under the slab's prior-predictive distribution as under the zero model's, so the marginal-likelihood comparison favors exact zero by a factor of two; posterior odds still depend on prior odds.