Tutorials › Generalized Linear Mixed Models (GLMM) › Variance, Standard Deviation, and Precision Parameterizations

Bayesian GLMM and Prior Specification for Variance Components · Tutorial 242 of 698

Variance, Standard Deviation, and Precision Parameterizations

Translate among random-effect variance, standard deviation, and precision, and assess what a prior specified on each scale says about plausible group heterogeneity.

Advanced 12 min read

What You'll Learn

  • Translate between a random-effect variance, standard deviation, and precision, including their units and supports.
  • Interpret each parameter in a conditional GLMM model.
  • See how prior probabilities change when a prior is specified on a different scale.
  • Identify the boundary behavior associated with zero variance and infinite precision.
  • Use scale-aware summaries and checks to spot prior specifications that do not match their intended meaning.

Why the Parameterization Matters

A GLMM’s random-effect distribution describes how groups or other clusters vary around the population-level part of the model. That variation can be expressed as a variance, a standard deviation, or a precision. These are equivalent ways to describe a positive scale parameter, but they are not interchangeable when assigning a prior: a prior that is simple on one scale can imply a very different distribution on another.

The distinction matters both substantively and computationally. A standard deviation is often easiest to interpret as a typical amount of group-to-group variation. A variance appears directly in the normal random-effect distribution, while a precision is convenient in some mathematical formulations and computations. Before interpreting a Bayesian result, identify which quantity was parameterized and on which scale its prior was specified.

Three Representations of One Random-Effect Scale

Consider a GLMM with a scalar random intercept \(b_j\) for group \(j\). Conditional on that random intercept, an observation’s response distribution is described by the GLM component of the model, with linear predictor \(x_{ij}^{\mathsf T}\beta+b_j\). The random intercepts are assumed to follow a mean-zero normal distribution with a common variance.

$$ b_j \sim N(0,\sigma_b^2), \qquad \sigma_b>0. $$

Here \(\sigma_b^2\) is the random-intercept variance and \(\sigma_b\) is its standard deviation. Define the scalar precision by \(\tau_b=1/\sigma_b^2\). Thus, precision is the reciprocal of the variance, not the reciprocal of the standard deviation.

Definition: For a positive random-effect variance \(v_b=\sigma_b^2\), its standard deviation is \(\sigma_b=\sqrt{v_b}\), and its precision is \(\tau_b=1/v_b=1/\sigma_b^2\). Equivalently, \(v_b=\sigma_b^2=1/\tau_b\) and \(\sigma_b=1/\sqrt{\tau_b}\). Variance has squared units, standard deviation has the original units, and precision has inverse-squared units.

All three parameters describe the same underlying dispersion when converted correctly. Large \(\sigma_b\) means substantial variation in group intercepts; large \(\sigma_b^2\) means the same thing in squared units. In contrast, large \(\tau_b\) means small variance and therefore less group-to-group variation. Precision moves in the opposite direction from variance and standard deviation.

For a random effect on a log-odds scale, the standard deviation is measured in log-odds units and the variance in squared log-odds units. For a random effect on a log-rate scale, the corresponding units are log-rate and squared log-rate. These are model-scale units, not response-scale units such as probabilities or counts.

Worked Example: Converting a Random-Intercept Scale

Suppose a hypothetical logistic GLMM assigns a random-intercept standard deviation of \(\sigma_b=0.8\) log-odds units. Convert this value to variance and precision, and describe the direction of the relationship.

The variance is the square of the standard deviation:

$$ \sigma_b^2=(0.8)^2=0.64 \text{ squared log-odds units}. $$

The precision is the reciprocal of this variance:

$$ \tau_b=\frac{1}{0.64}=1.5625 \text{ inverse squared log-odds units}. $$

Thus the same random-effect scale can be reported as standard deviation \(0.8\), variance \(0.64\), or precision \(1.5625\). A precision larger than this would correspond to a smaller variance, not a larger one.

Prior Specification Depends on the Scale

A prior is a probability distribution on a parameter, so “a prior on the random-effect scale” is incomplete unless the scale is named. For example, a uniform distribution over a range of standard deviations gives equal prior probability to equal-width intervals of \(\sigma_b\). A uniform distribution over a range of variances instead gives equal probability to equal-width intervals of \(\sigma_b^2\). Those statements generally imply different probabilities for events such as “the standard deviation is below 1.”

The same caution applies to precision. A prior that is uniform over an interval of precisions assigns equal probability to equal-width intervals of \(\tau_b\); since \(\tau_b=1/\sigma_b^2\), those intervals do not correspond to equal-width intervals on either the variance or standard-deviation scale. The prior’s interpretation should therefore be stated in terms of the parameter on which it is defined, with important implications translated to the scale that has scientific meaning.

A density’s numerical height is not preserved by a change of parameterization. Translating a prior distribution from one scale to another requires accounting for how intervals on the two scales correspond. The resulting prior is a probability distribution on the new scale, not a copied density formula with a new parameter name. The next step in this sequence treats the change-of-variable calculation in detail; for now, the key practice is to compare probabilities and quantiles on the scale of interpretation.

Worked Example: Uniform Priors on Variance and Standard Deviation

Compare two hypothetical prior specifications for the same random-intercept standard deviation. Under prior A, \(\sigma_b\) is uniform from 0 to 2. Under prior B, the variance \(\sigma_b^2\) is uniform from 0 to 4. Find the prior probability that \(\sigma_b<1\) under each specification.

Under prior A, the interval from 0 to 1 is half the total interval from 0 to 2:

$$ P_A(\sigma_b<1)=\frac{1-0}{2-0}=0.5. $$

Under prior B, the event \(\sigma_b<1\) is equivalent to \(\sigma_b^2<1\), because \(\sigma_b\) is positive. The prior is uniform on the variance interval from 0 to 4, so:

$$ P_B(\sigma_b<1) =P_B(\sigma_b^2<1) =\frac{1-0}{4-0}=0.25. $$

Both priors have the same endpoints when expressed as standard deviations, from 0 to 2. Nevertheless, they assign different probability to standard deviations below 1: 0.5 under prior A and 0.25 under prior B. Therefore, saying only that the prior ranges from 0 to 2 does not fully specify the prior; its parameterization matters.

Precision and the Zero-Variance Boundary

The allowed values of variance and standard deviation include zero as a boundary when a model permits no random-effect variation. Precision, defined as the reciprocal of variance, is positive and finite for every strictly positive variance. As variance approaches zero, precision grows without bound:

$$ \sigma_b^2 \to 0^+ \quad \Longleftrightarrow \quad \tau_b \to \infty. $$

Consequently, zero variance is not represented by a finite precision value. A model that allows the random effect to be exactly absent must handle that boundary as a special case rather than treating it as an ordinary finite precision. This distinction is important when interpreting posterior summaries near zero or comparing parameterizations computationally.

Precision is also easy to misread numerically. A precision of 4 means a variance of \(1/4\), not a variance of 4; its corresponding standard deviation is \(1/2\). Conversely, a small precision means a large variance and a large standard deviation.

Worked Example: Interpreting a Uniform Precision Prior

Suppose a hypothetical model assigns \(\tau_b\) a uniform prior from \(0.25\) to \(4\), measured in inverse squared log-odds units. Translate the support to the variance and standard-deviation scales, and calculate the prior probability that \(\sigma_b<1\) log-odds unit.

Because variance is the reciprocal of precision, the variance ranges from \(1/4\) to \(1/0.25\), or from \(0.25\) to \(4\) squared log-odds units. Taking square roots gives the standard-deviation range from \(0.5\) to \(2\) log-odds units.

The event \(\sigma_b<1\) is equivalent to \(\sigma_b^2<1\), or to \(\tau_b>1\). Under the uniform prior on precision, the relevant interval is from 1 to 4 out of the full interval from 0.25 to 4:

$$ P(\sigma_b<1) =P(\tau_b>1) =\frac{4-1}{4-0.25} =\frac{3}{3.75} =0.8. $$

Thus this prior assigns probability 0.8 to a standard deviation below 1 log-odds unit. It does not assign equal probability to equal-width intervals of standard deviation: it is uniform in precision, not in standard deviation. Reporting the prior only as “uniform” would omit the information needed to understand its implications.

Practical Comparison and Checks

No parameterization is universally best. The relevant choice depends on what is easiest to interpret, specify, or compute, while recognizing that the induced prior must be understood on the scale of interest.

ParameterMeaning of a larger valueNatural unitsKey caution
Variance \(\sigma_b^2\)More random-effect dispersionSquared model-scale unitsA uniform variance prior is not uniform in standard deviation
Standard deviation \(\sigma_b\)More typical group-level deviationModel-scale unitsA uniform standard-deviation prior implies a different variance distribution
Precision \(\tau_b\)Less random-effect dispersionInverse-squared model-scale unitsThe direction is reversed, and zero variance corresponds to infinite precision

When specifying or reviewing a model, write down the exact relationship among the parameters, their units, and the prior’s support. Then translate useful prior summaries—such as quantiles or probabilities of scientifically meaningful ranges—to the standard-deviation or variance scale as appropriate. This is more informative than comparing density heights, which depend on parameterization.

A useful diagnostic is to check whether the stated prior support and implied scale are compatible with the model. For instance, a variance prior must have nonnegative support, while a standard deviation and a precision must be positive. If converting a precision range yields implausibly large or tiny standard deviations, that is a reason to revisit the specification before fitting the model. In posterior output, also verify that software labels the reported quantity correctly: a value labeled “precision” cannot be interpreted as a standard deviation.

These checks do not establish that a prior is scientifically appropriate; they prevent avoidable scale and interpretation errors. They also do not replace examining how posterior conclusions respond to plausible alternative priors. The central limitation is that a convenient parameterization alone does not justify a prior. The prior should ultimately be evaluated in terms of the heterogeneity it makes plausible.

Common Mistakes

  • Calling precision the inverse standard deviation. Precision is \(1/\sigma_b^2\), whereas \(1/\sigma_b\) is the inverse standard deviation.
  • Assuming “uniform” is scale-neutral. A uniform prior on variance, standard deviation, or precision gives equal probability to intervals on a different parameter and therefore implies different probabilities there.
  • Interpreting larger precision as more heterogeneity. Since variance is \(1/\tau_b\), larger precision corresponds to less random-effect variation.
  • Ignoring units. Variance and precision have squared and inverse-squared units, respectively; interpreting their numerical values as if they were standard deviations is incorrect.
  • Treating zero variance as a finite precision. Zero variance is a boundary approached as precision tends to infinity, not a finite precision value.
Key takeaway: Variance, standard deviation, and precision encode the same positive random-effect scale, but priors specified on these different scales are generally different probability distributions. State the parameterization, units, support, and implications on the scale used for interpretation.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. If a random-effect variance is \(2.25\), what are its standard deviation and precision?
  2. A prior is uniform on a standard deviation from 0 to 3. What prior probability does it assign to \(\sigma_b<1\)?
  3. If \(\tau_b=0.5\), what are the variance and standard deviation? Does this represent greater or less heterogeneity than \(\tau_b=2\)?
  4. Why can zero random-effect variance not be represented by a finite value of precision?

Solutions. (1) The standard deviation is \(\sqrt{2.25}=1.5\), and the precision is \(1/2.25\approx0.4444\), in the corresponding model-scale units and inverse-squared units. (2) The event covers one third of the uniform interval, so \(P(\sigma_b<1)=(1-0)/(3-0)=1/3\). (3) The variance is \(1/0.5=2\), and the standard deviation is \(\sqrt{2}\approx1.414\). This is more heterogeneity than at precision 2, which corresponds to variance \(0.5\) and standard deviation \(\sqrt{0.5}\approx0.7071\). (4) Since \(\tau_b=1/\sigma_b^2\), as the variance approaches zero from above, its reciprocal grows without bound; no finite precision has reciprocal exactly zero.

Clinical Biostats