← Back to Blog
Exam Guides2027-02-186 min read

Mixed Effects Models for Actuarial Applications

Apply mixed effects models with random and fixed effects for actuarial data analysis on Exam MAS-I.

Why Mixed Effects Models Matter

Insurance data often has a natural hierarchical structure. Claims are nested within policies, policies within agents, agents within regions. Observations from the same group are correlated because they share unobserved characteristics. Standard regression ignores this correlation, leading to incorrect standard errors and misleading inference. Mixed effects models explicitly account for this hierarchical structure by including both fixed effects (population-level parameters) and random effects (group-level deviations).

Mixed models also handle repeated measures data, where multiple observations come from the same unit over time. A policyholder observed over five years generates five correlated observations. A standard regression treating these as independent would overstate the effective sample size. Mixed models model the correlation through random effects, producing valid inference.

Fixed Effects vs. Random Effects

Fixed effects represent systematic, reproducible influences that apply to the entire population. These are the effects you want to estimate precisely and report, such as the effect of driver age on claim frequency or the effect of deductible level on claim severity. Fixed effects are the same for every group in the population.

Random effects represent random variation across groups. They capture the heterogeneity among individual policyholders, territories, or agents that is not explained by the fixed effects. Random effects are not fixed quantities to be estimated but random variables drawn from a distribution (usually normal with mean zero). You estimate the parameters of this distribution (the variance components) rather than individual group effects.

The Mixed Model Equation

The linear mixed model is Y_{ij} = X_{ij} * beta + Z_{ij} * b_i + epsilon_{ij}, where Y_{ij} is the response for observation j in group i, X_{ij} * beta is the fixed effects component, Z_{ij} * b_i is the random effects component, b_i ~ N(0, D) is the random effect vector for group i, and epsilon_{ij} ~ N(0, sigma^2) is the residual error. The fixed effects beta and the variance components (D and sigma^2) are the parameters to be estimated.

The simplest case is the random intercept model: Y_{ij} = beta_0 + beta_1 * x_{ij} + b_i + epsilon_{ij}. Here b_i ~ N(0, sigma_b^2) shifts the intercept for each group. The total variance of Y is sigma_b^2 + sigma^2. The intraclass correlation (ICC) = sigma_b^2 / (sigma_b^2 + sigma^2) measures the proportion of total variance attributable to between-group differences. A high ICC indicates that groups are quite different from each other.

Random Intercepts and Random Slopes

The random intercept model allows each group's baseline to differ, but assumes the effect of covariates is the same across groups. This is appropriate when groups differ in their overall level but respond similarly to changes in covariates. For example, different territories might have different baseline claim frequencies, but the effect of driver age on frequency might be similar across territories.

The random slope model extends this by allowing covariate effects to vary by group: Y_{ij} = (beta_0 + b_{0i}) + (beta_1 + b_{1i}) * x_{ij} + epsilon_{ij}. Now both the intercept and the slope of x vary across groups. The random effects (b_{0i}, b_{1i}) are jointly normal with a 2x2 covariance matrix D. This model is more flexible but requires more data per group to estimate the additional variance components reliably.

Estimation Methods

Maximum likelihood (ML) estimation of mixed models simultaneously estimates fixed effects and variance components. However, ML estimates of variance components are biased downward because they do not account for the degrees of freedom used in estimating fixed effects. Restricted maximum likelihood (REML) corrects this bias by maximizing the likelihood of a set of error contrasts that do not depend on the fixed effects, analogous to using n-1 instead of n in the sample variance formula.

Best linear unbiased prediction (BLUP) provides estimates of the random effects for each group. The BLUP of b_i is a shrinkage estimator: it pulls each group's estimate toward the overall mean, with the amount of shrinkage depending on the group's sample size and the ratio of within-group to between-group variance. Groups with more data are shrunk less, while groups with little data are shrunk heavily toward the overall mean.

Connection to Credibility Theory

The BLUP has a direct connection to Buhlmann credibility. For a random intercept model, the BLUP of the group mean for group i is Z_i * y_bar_i + (1 - Z_i) * mu, where Z_i = n_i / (n_i + k), k = sigma^2 / sigma_b^2, y_bar_i is the group mean, mu is the overall mean, and n_i is the number of observations in group i. This is exactly the Buhlmann credibility formula with v = sigma^2 and a = sigma_b^2.

This connection means that credibility theory and mixed models are not competing frameworks but two perspectives on the same problem. Credibility theory provides the actuarial intuition (blending individual and group experience), while mixed models provide the statistical machinery (likelihood-based estimation, hypothesis testing, model diagnostics). Understanding both perspectives strengthens your ability to apply either one.

Common Pitfalls

A common mistake is treating a random effect as a fixed effect. If you have 200 territories and include a fixed effect for each, you use 199 degrees of freedom and cannot generalize to new territories. Treating territory as a random effect uses only 1 degree of freedom (estimating sigma_b^2) and allows prediction for territories not in the sample. The rule of thumb: use fixed effects for a small number of levels that are of specific interest, and random effects for a large number of exchangeable levels.

Another pitfall is ignoring the correlation structure when comparing models. Models with different fixed effects structures can be compared using ML (not REML), while models with different random effects structures should be compared using REML (with the same fixed effects).

Study Tips

Exam MAS-I covers mixed model setup, interpretation of fixed and random effects, the BLUP as a credibility estimator, and the connection between mixed models and Buhlmann credibility. Practice writing out the model equation for random intercept and random slope specifications. Know how to compute the ICC and interpret its value. Be prepared to explain when random effects are preferred over fixed effects and how the BLUP shrinks group estimates toward the overall mean. The credibility connection is frequently tested, so make sure you can derive the Buhlmann formula from the mixed model framework.

Ready to practice?

Put this knowledge to work with flashcards and practice exams.

Start Studying Free