MAS-II asks you to turn statistical structure into a defensible estimate or model choice. Credibility combines a group's experience with information from a wider population, with the weight determined by uncertainty and exposure. Linear mixed models separate population effects from variation among related groups and observations. Statistical learning adds prediction tools, from nearest neighbors and trees to components, clusters, and neural networks, together with ways to judge their performance. Time series methods account for dependence across dates before producing forecasts. Throughout this guide, work from the assumptions to the calculation, then ask what the result means. A numerical answer is useful only when its exposure basis, dependence structure, or prediction target matches the question.
A. Introduction to Credibility
1. The credibility-weighted estimate
A credibility estimate combines a group's observed result with a collective benchmark: Z times the group estimate plus (1 − Z) times the collective estimate. The weight Z lies between zero and one. More credible group experience moves the answer toward the group's result; less credible experience leaves it near the collective result. First put both inputs on the same basis, such as expected loss per policy-year for the same coverage and period. Otherwise, the arithmetic blends unlike quantities. The two inputs also need comparable definitions of claims and exposure. Credibility addresses uncertainty in experience, so a group result can receive a modest weight even when it differs sharply from the benchmark. The 2026 MAS-II content outline includes calculating credibility-weighted estimates across several methods; each method supplies a way to determine an appropriate weight.
Worked example: Suppose a group's estimated loss is 120 dollars per policy-year, the comparable collective estimate is 100 dollars per policy-year, and Z = 0.25. The blended estimate is 0.25(120) + 0.75(100) = 30 + 75 = 105 dollars per policy-year. The group's experience supplies one quarter of the estimate. The result lies between 100 and 120, a useful arithmetic check.
Watch the distinction: A weight of 0.25 does not mean adding 25% of the group estimate to the full collective estimate. The collective receives the complementary weight, 0.75.
Reference: [2]
2. Full credibility for claim frequency
Limited-fluctuation credibility asks whether random variation is small enough for observed frequency to meet a stated precision goal. Under a Poisson model, a claim count N has both mean and variance m, where m is its expected count. Its approximate standard deviation is √m, so the relative standard deviation is 1/√m. If a normal-approximation factor k sets the desired confidence range and r is the permitted relative error, require k√m ≤ rm. Rearranging gives m ≥ (k/r)². This is an expected claim-count requirement, not a requirement on premium or the number of policies alone. Check that frequency and exposure definitions match before applying it. The normal approximation is an assumption behind this calculation, and materially clustered claims or varying underlying rates can make the Poisson variance inadequate.
Worked example: Use a hypothetical relative tolerance of 5%, or r = 0.05, and factor k = 2. The full-credibility requirement is (2/0.05)² = 40² = 1,600 expected claims. A group expected to produce 400 claims has only one quarter of the required count. Under these assumptions it does not receive full limited-fluctuation credibility, even if its observed rate appears close to the collective rate.
Watch the distinction: Using the observed claim count as the denominator without checking the stated method confuses realized fluctuation with the expected information level. Here the requirement is expressed in expected claims.
Reference: [2]
3. Partial limited-fluctuation credibility
When experience falls below a limited-fluctuation full-credibility standard, a common partial factor is Z = √(m/m₀), capped at one. Here m is the group's expected claim count and m₀ is the count required for full credibility under the same tolerance, confidence factor, and model. The square root follows from relative sampling error shrinking with the square root of claim volume. It does not say that a group with half the required claims receives half weight. Apply the factor to compatible estimates: an observed group rate and a collective rate expressed per the same exposure unit. The blend is Z times the group rate plus (1 − Z) times the collective rate. If m exceeds m₀, use full weight rather than allowing the square-root formula to produce a weight above one.
Worked example: Suppose the stated full-credibility requirement is 1,600 expected claims and the group has 400. Then Z = √(400/1,600) = √0.25 = 0.5. If its estimated rate is 120 dollars per policy-year and the collective rate is 100, the blended rate is 0.5(120) + 0.5(100) = 110 dollars per policy-year. Half of each input contributes to the result.
Watch the distinction: The ratio 400/1,600 equals 0.25, but that is not the partial credibility factor under this rule. Taking its square root gives the required weight of 0.5.
Reference: [2]
4. Severity credibility and variation
Severity credibility measures how precisely a sample mean estimates average claim size. For independent, identically distributed severities with mean μ and standard deviation σ, the sample mean has standard error σ/√n. Its relative standard error is c/√n, where c = σ/μ is the coefficient of variation. With a stated normal factor k and relative tolerance r, require kc/√n ≤ r, giving n₀ = (kc/r)² claims for full credibility. Higher severity variation therefore requires more claims for the same precision. Below n₀, a square-root partial rule gives Z = √(n/n₀). Blend an observed average severity with a comparable collective average, keeping currency, coverage, limits, and claim definitions consistent. Heavy tails or dependence can make the simple standard-error approximation unreliable.
Worked example: Assume a hypothetical severity coefficient of variation of 1.5, factor k = 2, and tolerance r = 0.10. The full requirement is (2 × 1.5/0.10)² = 900 claims. With 100 claims, Z = √(100/900) = 1/3. An observed mean of 1,500 dollars and collective mean of 1,200 dollars blend to (1/3)(1,500) + (2/3)(1,200) = 1,300 dollars per claim.
Watch the distinction: Frequency and severity need not have the same full-credibility count. Severity's coefficient of variation enters its requirement, so volatile claim amounts can demand substantially more observations.
Reference: [2]
5. Credibility for aggregate loss
Aggregate loss S is the sum of the severities from a random number N of claims. With independent, identically distributed severities independent of N, E[S] = E[N]μ and Var(S) = E[N]σ² + Var(N)μ². If N is Poisson with mean λ, this simplifies to Var(S) = λ(σ² + μ²). To apply limited-fluctuation credibility across independent periods, compare the standard deviation of their average aggregate loss with its mean. For t identical periods, the average has variance Var(S)/t, so a relative tolerance r and factor k require t ≥ k²Var(S)/(r²E[S]²). The calculation depends on the stated period and exposure basis. It accounts for variation in both claim counts and claim amounts; using severity variance alone omits the frequency contribution.
Worked example: Let annual frequency be Poisson with mean 4; severities have mean 1,000 dollars and variance 250,000 dollars squared. Annual aggregate mean is 4,000 dollars and variance is 4(250,000 + 1,000²) = 5,000,000 dollars squared. With hypothetical r = 0.10 and k = 2, required periods equal 4(5,000,000)/(0.01 × 4,000²) = 125. For 25 periods, Z = √(25/125) ≈ 0.447; blending 5,000 with 4,000 gives about 4,447 dollars per period.
Watch the distinction: Multiplying expected frequency by severity variance gives only part of aggregate variance. Random claim counts add Var(N)μ², which equals λμ² under the Poisson assumption.
Reference: [2]
6. Process variance and risk heterogeneity
Bühlmann credibility separates two sources of variation. Expected process variance, EPV, averages the within-risk variance of observations over the population of risk types. Variance of hypothetical means, VHM, measures how much the underlying risk means differ across that population. Their ratio K = EPV/VHM has units of observations when each observation has the same precision. A large K means substantial process noise relative to useful differences among risks, so many observations are needed before a risk's own mean receives much weight. If VHM is zero, experience cannot distinguish underlying risk means through this framework. For related foundations in probability and modeling, the MAS-I study guide can support the assumed background; the credibility calculation here still hinges on correctly identifying the two variance components.
Worked example: Suppose EPV is 9 squared rate units per observation and VHM is 4 squared rate units. Then K = 9/4 = 2.25 observations. Three equally precise observations would receive factor 3/(3 + 2.25) = 4/7 ≈ 0.571. If EPV rose while VHM stayed at 4, K would rise and the same three observations would receive less weight.
Watch the distinction: EPV and VHM are not interchangeable variances. EPV represents random fluctuation around each risk's mean; VHM represents genuine differences between those risk means.
Reference: [2]
7. A Bühlmann premium
Under the Bühlmann model, the credibility factor for n equally precise observations is Z = n/(n + K), with K = EPV/VHM. The premium or next-observation estimate is Z times the risk's sample mean plus (1 − Z) times the collective mean. This is a linear least-squares prediction under the model's common variance structure. As n grows, the risk's experience receives more weight; as process variance grows relative to between-risk variation, K grows and its weight falls. Before calculating, confirm that the observations are measured in comparable units and that the risk mean and collective mean describe the same target. The collective mean is the model's expected hypothetical mean across risks. A surprising observed average alone does not justify increasing Z, because the factor reflects information volume and variance structure.
Worked example: Take n = 3 equally precise years, K = 2.25 years, a risk mean of 140 dollars per exposure unit, and a collective mean of 100 dollars. Then Z = 3/(3 + 2.25) = 3/5.25 = 4/7. The estimate is (4/7)(140) + (3/7)(100) = 80 + 42.857... ≈ 122.86 dollars per exposure unit.
Watch the distinction: Treating K as an extra observation added to the numerator overweights experience. It appears only in the denominator of n/(n + K).
Reference: [2]
8. Frequency and severity as separate estimates
An aggregate pure premium per exposure unit can be formed as estimated claims per exposure unit times estimated dollars per claim. Frequency and severity may have different amounts of information and different variance patterns, so calculate each credible estimate with its own justified weight before multiplying. This product represents expected loss per exposure under the stated frequency-severity assumptions, including a stable conditional severity mean for the claims being counted. It is generally different from applying one credibility weight directly to an observed aggregate-loss rate. The difference matters because multiplication creates cross terms between the separate frequency and severity blends. Check units at each step: claims per exposure multiplied by dollars per claim yields dollars per exposure. If severity systematically changes with frequency or risk mix, the simple product needs an appropriately conditional model.
Worked example: Suppose observed frequency is 3 claims per exposure unit and its base is 2, with Z = 0.5. The blended frequency is 0.5(3) + 0.5(2) = 2.5. Observed severity is 400 dollars per claim and its base is 300, with Z = 0.25; its blend is 0.25(400) + 0.75(300) = 325 dollars. Pure premium is 2.5 × 325 = 812.50 dollars per exposure unit.
Watch the distinction: Multiplying the observed frequency and severity first, then applying either component's weight, generally gives a different answer. Separate component estimates require separate blends before multiplication.
Reference: [2]
9. Exposure in Bühlmann-Straub credibility
Bühlmann-Straub credibility handles observations with unequal exposures. Think of each period's observed rate as an estimate whose process variance decreases as its exposure rises. Under the model, a period with three times the exposure carries three times the information for estimating its risk mean. Replace the simple observation count with total exposure w = Σwᵢ, and calculate Z = w/(w + K), where K is expressed in the same exposure units. Form the experience mean with those same weights before blending it with the collective mean. This model is useful when policy counts, insured values, or other valid exposure measures vary by period. The exposure definition must correspond to the rate's denominator and to the assumed variance relationship; a larger number printed beside a period does not automatically make it a valid precision weight.
Worked example: Suppose two periods have 10 and 30 exposure units, and the stated Bühlmann-Straub K is 20 exposure units. Their total exposure is 40, so Z = 40/(40 + 20) = 2/3. The second period supplies three quarters of the experience mean because 30/40 = 0.75. Counting the periods merely as two equal observations would lose that precision difference.
Watch the distinction: Using n = 2 in the Bühlmann formula ignores unequal period precision. Bühlmann-Straub uses 40 total exposure units here, provided K is measured on that basis.
Reference: [2]
10. The exposure-weighted risk mean
The experience input to a Bühlmann-Straub estimate is an exposure-weighted rate, not the simple average of period rates. For period rates Xᵢ and exposures wᵢ, compute X̄w = ΣwᵢXᵢ/Σwᵢ. This is equivalent to dividing total observed losses or claims by total exposure when each rate uses the corresponding exposure denominator. Then calculate Z from total exposure and K, and blend X̄w with the collective mean. Keeping the weights consistent prevents a small period's unusually high or low rate from exerting the same influence as a large period's rate. Check the target unit: if rates are dollars per policy-year, exposures must be policy-years. If the periods have different coverage or underlying risk conditions, standardize or model those differences before treating them as comparable observations.
Worked example: Rates are 100 and 160 dollars per exposure unit from periods with exposures 10 and 30. Total observed amount is 10(100) + 30(160) = 5,800 dollars, so the weighted mean is 5,800/40 = 145 dollars per exposure unit. With collective mean 120 and Z = 2/3, the estimate is (2/3)(145) + (1/3)(120) = 136.67 dollars per exposure unit.
Watch the distinction: The simple average, 130, gives the 10-unit period the same influence as the 30-unit period. That contradicts the exposure weighting used to calculate credibility.
Reference: [2]
11. Bayesian claim-frequency updating
A gamma prior pairs naturally with a Poisson claim-frequency model. Write the prior rate as Gamma(a, b), with shape a and rate b, so its mean is a/b claims per exposure unit. If n claims arise over exposure t and N conditional on the unknown claim rate λ is Poisson(tλ), the posterior is Gamma(a + n, b + t). Its mean, (a + n)/(b + t), is also the predictive mean rate for a new comparable exposure unit. Rearranging gives a credibility blend: t/(b + t) times the observed frequency n/t, plus b/(b + t) times the prior mean a/b. Exposure and prior rate parameter must use matching units. Confirm whether a problem uses a gamma rate or scale parameter, since confusing those conventions changes both the prior mean and update.
Worked example: A hypothetical prior is Gamma(shape 4, rate 2), with mean 4/2 = 2 claims per exposure unit. Three claims occur during one exposure unit. Updating gives Gamma(4 + 3, 2 + 1) = Gamma(7, 3), whose mean is 7/3 ≈ 2.33 claims per exposure unit. Equivalently, weight the observed rate 3 by 1/3 and prior mean 2 by 2/3.
Watch the distinction: Adding exposure to gamma shape and claims to its rate reverses the update. Claims add to shape; exposure adds to the rate parameter under this parameterization.
Reference: [2]
12. Bayesian predictive aggregate loss
When a risk could belong to several types, claim experience changes the probability assigned to each type. For type j, posterior probability is proportional to its prior probability multiplied by the likelihood of the observed data under that type. Normalize these products so they sum to one. Then predict future aggregate loss by averaging each type's expected future frequency times expected severity, using the posterior type probabilities. This separates learning about risk type from random future claim variation. Zero claims may favor a lower-frequency type without proving it, because a higher-frequency type can also produce zero claims. Make the observation and forecast exposure periods comparable, and use type-specific severity assumptions only where supplied. For more worked applications after this calculation, CAS MAS-II practice questions can help test the update sequence.
Worked example: Two types start equally likely. Their Poisson rates are 1 and 3 claims per period, with mean severities 100 and 200 dollars. After zero claims in one period, low-type posterior probability is e^−1/(e^−1 + e^−3) ≈ 0.8808; high-type probability is 0.1192. Next-period expected losses are 1(100) = 100 and 3(200) = 600 dollars. The predictive mean is 0.8808(100) + 0.1192(600) ≈ 159.60 dollars.
Watch the distinction: A zero-claim period does not force the low-type probability to one. Bayesian updating retains the high type because its zero-claim likelihood, e^−3, is positive.
Reference: [2]
B. Linear Mixed Models
13. Fixed and random model components
A linear mixed model writes observations as y = Xβ + Zb + ε. The term Xβ describes fixed effects: the modeled population relationship between predictors and outcome. The term Zb carries group-specific departures, commonly modeled with mean zero and a covariance structure. Residual ε accounts for variation left within groups. A random intercept shifts a group's fitted line up or down; a random slope lets its predictor effect differ from the population slope. The fixed-effect prediction is appropriate for a new group when its departure is unknown and has mean zero. For a known group, an estimated random effect gives a conditional prediction. Interpretation depends on the model's scale and on which predictors are held fixed. A conditional prediction should also reflect that estimated group departures are uncertain, especially when a group has little data.
Worked example: Suppose a fitted fixed intercept is 100 dollars and the fixed slope is 2 dollars per unit of x. At x = 3, the population fitted mean is 100 + 2(3) = 106 dollars. A known group's estimated random intercept is +10 dollars, so its conditional fitted mean is 106 + 10 = 116 dollars. A new group's population prediction remains 106 dollars.
Watch the distinction: A random intercept of +10 for one known group does not change the population intercept to 110. It changes that group's conditional fitted value.
Reference: [2]
14. Nested and crossed grouping
Grouping factors are nested when each level of one belongs to a single level of another, such as repeated claims within a policy. They are crossed when levels can combine in multiple ways, such as policies observed in several calendar years. A random intercept shared by two observations contributes its variance to their covariance. With independent policy and year random intercepts, observations sharing only a policy inherit policy variance; observations sharing only a year inherit year variance; those sharing both inherit their sum. This covariance reasoning helps choose a model from the data structure before interpreting output. The residual component can add further covariance if it is modeled as correlated. Check which identifiers actually repeat: labels called 'year' may be nested within sites in one dataset but crossed with sites in another.
Worked example: Suppose independent policy and calendar-year random intercepts have variances 4 and 9 squared loss units, and residuals are independent. Two records from the same policy in different years share only the policy effect, so covariance is 4. Records from different policies in the same year share only the year effect, so covariance is 9. Same-policy, same-year records would have covariance 4 + 9 = 13.
Watch the distinction: Calling policy and year nested merely because each record has one of each misses their repeated combinations. If policies recur across years, the factors are crossed.
Reference: [2]
15. Intraclass correlation
In a random-intercept model with independent residuals, each observation has variance τ² + σ²: between-group intercept variance τ² plus within-group residual variance σ². Two different observations from the same group share the random intercept, so their covariance is τ². Their correlation, called the intraclass correlation, is τ²/(τ² + σ²). It describes how similar observations are because they share a group, under this model. A higher value means repeated observations add less independent information than the same number drawn from unrelated groups. This affects standard errors and the value of collecting more observations per group versus more groups. The simple ratio changes if the model includes random slopes, unequal residual variances, or residual serial correlation, so identify the covariance structure before applying it.
Worked example: Suppose random-intercept variance is 9 squared units and residual variance is 16 squared units. Each observation has variance 9 + 16 = 25, and two observations in the same group have covariance 9. Their intraclass correlation is 9/25 = 0.36. Two such observations therefore share some information; treating them as independent would overstate the effective amount of evidence.
Watch the distinction: Dividing residual variance by total variance gives 16/25, the unshared fraction here. The intraclass correlation uses the variance of the effect shared within a group.
Reference: [2]
16. Random slopes and changing dispersion
A random-slope model allows groups to respond differently as a predictor changes. If the group departure is b₀ + xb₁, its variance at predictor value x is Var(b₀) + 2xCov(b₀,b₁) + x²Var(b₁). This explains why lines may fan out or converge across the predictor range even when residual variance is constant. A random intercept alone shifts parallel group lines and cannot create changing between-group spread with x. To decide whether a slope is useful, inspect repeated observations within groups across a meaningful range of x, examine estimated variance and covariance components, and check whether the added structure improves diagnostics or prediction. Centering x changes the interpretation of intercept variance and intercept-slope covariance, because the intercept then refers to a different predictor value.
Worked example: Assume random-intercept variance is 4 squared outcome units, random-slope variance is 1 squared outcome unit per squared predictor unit, and their covariance is zero. At x = 0, group-departure variance is 4. At x = 2, it is 4 + 2²(1) = 8 squared outcome units. Thus group-specific fitted lines are more dispersed at x = 2 than at x = 0.
Watch the distinction: A larger residual spread at high x does not automatically prove random slopes. Random slopes describe systematic differences between group lines; residual heteroscedasticity describes remaining within-group variation.
Reference: [2]
17. Residual covariance choices
Random effects and residual covariance can both produce correlated observations, but they encode different patterns. A random intercept creates a common group component, yielding the same shared covariance for any pair in that group when no other terms intervene. An autoregressive residual structure of order one, AR(1), instead makes residual correlation decline with occasion gap: ρ for adjacent occasions, ρ² for a gap of two, and generally ρʰ for gap h. A model may need both if groups differ persistently and nearby measurements remain more alike after accounting for that difference. Diagnose the distinction by examining residual correlations against lag and by considering how observations were collected. AR(1) requires a meaningful ordering, commonly equally spaced occasions for the simple ρʰ interpretation; a random intercept does not.
Worked example: Assume residual correlation follows AR(1) with adjacent correlation ρ = 0.5 and constant residual variance. Two observations two occasions apart have residual correlation ρ² = 0.25; three occasions apart gives ρ³ = 0.125. A random intercept alone would contribute the same covariance at both gaps. A declining empirical pattern therefore points toward a lag-dependent residual term.
Watch the distinction: Treating any within-group correlation as evidence for a random intercept can miss serial dependence. Compare correlation by lag to see whether closeness in time matters.
Reference: [2]
18. Hierarchical shrinkage
Hierarchical shrinkage estimates a group's underlying mean by combining its observed mean with the population mean. In a simple normal random-intercept model, let between-group variance be τ², residual variance be σ², and group size be n. The weight on the group mean is nτ²/(nτ² + σ²); the remaining weight goes to the population mean. A small group or noisy residuals receive more shrinkage because its sample mean is imprecise. Larger genuine differences between groups, represented by τ², reduce shrinkage. This is an estimate of a latent group mean, not an alteration of the observed data. It also explains why a group with an extreme raw mean may have a less extreme fitted random effect. The formula assumes equal residual variance and comparable independent observations within the group.
Worked example: Let between-group variance be 100 squared dollars, residual variance 400 squared dollars, and n = 2. The group-mean weight is 2(100)/[2(100) + 400] = 200/600 = 1/3. If the observed group mean is 140 dollars and the population mean is 100 dollars, the shrunken estimate is (1/3)(140) + (2/3)(100) = 113.33 dollars.
Watch the distinction: Shrinkage does not imply that the group truly experienced 113.33 dollars rather than 140. The former estimates its underlying mean; the latter remains its observed sample mean.
Reference: [2]
19. Comparing mixed-model structures
Mixed-model comparisons depend on which parts of the model differ. Maximum likelihood, ML, estimates fixed effects and covariance parameters jointly and permits likelihood-based comparison of models with different fixed-effect designs fitted to the same observations. Restricted maximum likelihood, REML, adjusts estimation for fixed effects and is useful for covariance-parameter estimation, but its restricted likelihood values are generally not comparable when fixed-effect designs differ. AIC combines fit with a penalty for parameter count, commonly −2 log likelihood + 2k; lower AIC indicates the better trade-off among the candidate models, not proof of correct structure. Compare models on the same response, observations, and likelihood basis. Also inspect residual patterns and whether variance estimates sit at boundaries, because one summary number can hide misspecification. The CAS MAS-II exam page identifies the examination; the supplied content outline specifies mixed-model interpretation as relevant study scope.
Worked example: Two candidate models use the same observations and are both fitted by ML. Their AIC values are 220 and 216, so the second has the lower AIC by 4 and the better measured fit-complexity trade-off. If the models differ in fixed predictors, comparing their REML likelihood values would use an invalid basis for that decision. Residual checks should still inform the choice.
Watch the distinction: A lower AIC does not establish that every coefficient in the selected model is meaningful or that its covariance assumptions hold. It compares specified candidates on one criterion.
20. Reading fixed-effect estimates
A fixed-effect coefficient in a linear mixed model describes a population mean change associated with a predictor, holding the other fixed predictors as specified. Its standard error reflects uncertainty under the fitted grouping and covariance structure. Dividing estimate by standard error gives a test statistic, but its p-value depends on the reference distribution and degrees-of-freedom method reported with the output. Interpret the coefficient on the response scale of the model, and check whether interactions or centering alter what a one-unit change means. Also distinguish statistical evidence from practical size: a precisely estimated small change may matter differently from a large, uncertain one. Correlated observations can make a naive independent-data standard error misleading, which is why the mixed-model covariance choices are part of the interpretation rather than a detail to ignore.
Worked example: A fitted slope is 6 dollars per predictor unit, with standard error 2 dollars per predictor unit. Its estimate-to-SE statistic is 6/2 = 3. Holding other fixed predictors as modeled, the fitted population mean rises by 6 dollars for a one-unit predictor increase. A p-value cannot be calculated from this ratio alone without the reported reference distribution and degrees of freedom.
Watch the distinction: The statistic 3 is not a three-dollar effect or automatically a p-value. It is an estimate divided by its standard error, interpreted through the reported test method.
Reference: [2]
21. Mixed-model diagnostics and predictions
Start with residuals plotted against fitted values, group, and time. A widening band suggests the residual variance changes; a repeating pattern suggests an omitted predictor or covariance structure. Then inspect estimated random effects for unusual groups and departures from the assumed distribution. These checks answer different questions: residuals describe variation left within groups, while random effects describe estimated differences among groups. For prediction, specify whether the group has appeared in the data. A known group's conditional prediction includes its estimated random effect. For a new group, the population prediction uses the random effect's mean, normally zero. The 2026 MAS-II content outline includes interpretation of mixed-model diagnostics and output; a plot is evidence to investigate, not a diagnosis by itself.
Worked example: Suppose residual standard deviations are about 2 loss units for small groups and 4 for large groups. Their variances are approximately 4 and 16 square loss units, a fourfold difference. If the fixed-effect prediction is 100 and a known group's estimated random intercept is +10, predict 110 for that group. For a new group, predict 100 before observing its experience.
Watch the distinction: Adding a known group's estimated random intercept to every prediction treats a group-specific departure as a population effect. New groups have no estimated departure from their own observations.
Reference: [2]
C. Statistical Learning
22. K-nearest-neighbor classification
K-nearest-neighbor classification predicts from nearby labeled observations. First choose predictors and a distance rule, then put predictors on comparable scales when their units or ranges would otherwise dominate distance. Estimate any scaling quantities from training data and apply those same quantities to validation and future cases. For each query, calculate distances to training records, select the K smallest, and vote on their classes. The fraction voting for a class can serve as a local score, although it need not be a well-calibrated probability. Small K responds to local structure but is sensitive to noise; large K smooths over more observations and may erase a useful boundary. Distance becomes less informative when many irrelevant predictors are included, so predictor choice matters alongside K.
Worked example: After scaling two predictors, a query's three closest policies have labels claim, no claim, and claim. With K = 3, claim wins 2 to 1, and its neighbor-vote fraction is 2/3. If one unscaled predictor ranged in thousands while the other ranged from 0 to 1, that first predictor could change which policies were selected.
Watch the distinction: Using raw distance merely because both inputs are numeric can make the variable with larger units control the vote. Scale according to the intended meaning of distance.
Reference: [2]
23. K-nearest-neighbor regression
For a numeric outcome, K-nearest-neighbor regression replaces a class vote with the mean response of the selected neighbors. Compute distances using predictors only; the unknown response of the query cannot help select neighbors. The prediction is local because a new query may have a different neighbor set. With K = 1, the fitted surface can jump sharply and follow noisy observations. Increasing K averages more responses, usually reducing variance while increasing the risk of smoothing away a genuine local pattern. The choice should reflect held-out prediction error and the cost of errors in the intended use. Earlier regression and probability foundations in the MAS-I study guide help distinguish this data-driven average from a fitted parametric mean.
Worked example: Suppose the three nearest comparable risks have annual losses of 100, 120, and 140 currency units. With equal neighbor weights and K = 3, the prediction is (100 + 120 + 140)/3 = 120 currency units per risk-year. If a fourth, less similar risk has loss 400, increasing K to 4 gives 190, illustrating the possible cost of extra smoothing.
Watch the distinction: A larger K does not automatically improve prediction because averaging more observations may introduce bias. It can mix distinct risk neighborhoods even while making estimates less variable.
Reference: [2]
24. Validation for predictive tuning
Tune a predictive method using observations that did not determine the fitted rule being evaluated. In cross-validation, split the training data into folds; for each candidate K, fit any scaling and the neighbor rule using the other folds, then score predictions on the held-out fold. Average errors on a consistent basis. Equal-sized folds can use a simple mean of fold errors; unequal folds should generally be weighted by their observation counts. Select K using the validation result, then refit the chosen procedure on the full training set. Reserve a separate test set for a final estimate of performance if one is available. When policies share a customer or time period, split by that unit if ordinary random splits would leak related information.
Worked example: For three equal-sized validation folds, K = 3 produces errors of 4, 6, and 5 loss-squared units, averaging (4 + 6 + 5)/3 = 5. K = 9 produces 4, 7, and 8, averaging 19/3 ≈ 6.33. Choose K = 3 on this comparison, then refit it. The MAS-II practice questions can help rehearse such calculations.
Watch the distinction: Choosing K because it minimizes training error rewards flexibility on observations already used for fitting. That result does not measure how well the rule predicts unseen risks.
Reference: [2]
25. Regression-tree splits
A regression tree divides predictor space into regions and predicts each region's mean response. At a candidate split, calculate the parent node's residual sum of squares using its mean, then calculate the sums for the two child nodes using their separate means. The split improvement is parent RSS minus total child RSS. Search permitted predictors and cut points for a large improvement, subject to restrictions such as minimum node size. A reduction in training RSS is guaranteed for a nonempty split because child means can fit at least as well as one shared mean. That guarantee does not establish future predictive improvement. The split can follow noise, especially in small leaves, which is why tree size is controlled by stopping rules or pruning.
Worked example: Four annual loss responses are 2, 4, 8, and 10 units. Their parent mean is 6, giving RSS = 16 + 4 + 4 + 16 = 40 square units. Splitting into {2, 4} and {8, 10} yields means 3 and 9. Each child has RSS 2, so total RSS is 4 and the reduction is 36.
Watch the distinction: The best training split is not necessarily the best forecasting decision. Small leaves can show dramatic RSS reductions simply because the tree has fitted chance variation.
Reference: [2]
26. Classification-tree impurity
A classification tree assesses how mixed the classes are within each node. For class proportions p_j, Gini impurity is 1 minus the sum of squared proportions. Entropy is minus the sum of p_j log base 2 of p_j, treating a zero-proportion term as zero. Both equal zero for a pure node and rise as classes become more balanced. To evaluate a proposed split, calculate each child's impurity and weight it by that child's share of observations. Subtract the weighted child value from parent impurity; a larger reduction indicates a cleaner partition under that measure. Class imbalance and unequal error costs can affect which split is useful in practice, so impurity reduction is a fitting criterion rather than a complete business decision.
Worked example: A node contains three claims and one nonclaim. Its Gini impurity is 1 − (3/4)^2 − (1/4)^2 = 0.375. Its entropy is −(3/4)log2(3/4) − (1/4)log2(1/4) ≈ 0.811 bits. A split into pure nodes has weighted impurity zero and removes all 0.375 Gini units; other splits need their child sizes included in the weighting.
Watch the distinction: Comparing child impurities without weighting by child size can favor a tiny pure node while leaving most records mixed. The split criterion describes the whole parent node.
Reference: [2]
27. Cost-complexity pruning
A fully grown tree often follows noise. Cost-complexity pruning evaluates each subtree with an objective equal to its fitting loss plus α times its number of terminal leaves. The nonnegative penalty α makes additional leaves more expensive. As α rises, a smaller tree can beat a larger one despite worse training fit. Candidate subtrees can be compared on validation data to choose a useful penalty rather than relying on training loss alone. For regression, a stated RSS-based objective makes the arithmetic direct; other implementations may scale the loss differently, so compare penalties only within the same definition. A pruned tree remains interpretable through its surviving splits, but pruning does not repair poor predictors or leakage.
Worked example: A three-leaf regression subtree has RSS 20, giving cost 20 + 3α. Replacing it with one leaf gives RSS 31 and cost 31 + α. At α = 5, the subtree costs 35 versus 36, so keep it. At α = 6, its cost is 38 versus 37, so prune. The costs tie when α = 5.5.
Watch the distinction: Pruning does not mean choosing the tree with the fewest leaves regardless of fit. A branch stays when its reduction in loss is worth its penalty.
Reference: [2]
28. Bagged trees
Bagging addresses a tree's sensitivity to small changes in its training sample. Draw multiple bootstrap samples, each with replacement and normally the same size as the original training set. Fit a tree to each sample, then aggregate predictions: average numeric predictions or combine class votes or probabilities according to a stated rule. Individual trees may have high variance, while their average is more stable if their errors are not perfectly correlated. A bootstrap sample can contain a record more than once and omit another record. Bagging does not automatically remove systematic bias, and highly similar trees offer less variance reduction. Trees can still capture nonlinearities and interactions without specifying them in advance.
Worked example: Three trees trained on separate bootstrap samples classify one policy as claim, no claim, and claim. Majority voting gives claim, 2 to 1. For a numeric loss outcome, suppose their predictions are 10, 14, and 12 currency units. The bagged prediction is (10 + 14 + 12)/3 = 12 currency units, assuming equal tree weights.
Watch the distinction: Averaging trees does not make their errors independent. If nearly every tree follows the same dominant pattern, bagging gains less stability than the tree count suggests.
Reference: [2]
29. Random forests
A random forest adds predictor randomness to bootstrap aggregation. At each candidate split, a tree considers only a randomly selected subset of predictors, then chooses its best split from that subset. This can prevent a powerful predictor from appearing near the top of every tree, reducing correlation among their errors and making aggregation more effective. A forest still averages regression outputs or aggregates classification outputs; the random predictor restriction changes how its trees are built. The number of candidate predictors controls a trade-off: a very small subset can diversify trees but weaken individual splits. Check predictive performance with validation or out-of-bag records. Variable importance describes reliance within the fitted forest and can be distorted by correlated predictors.
Worked example: Suppose four predictors are available and the forest samples two candidate predictors at each split. A dominant predictor may be absent from a particular pair, allowing another split to be selected. If three resulting regression trees predict 10, 14, and 12 loss units for a policy, the forest average is 12 units. The same arithmetic as bagging follows different tree construction.
Watch the distinction: Calling any collection of bootstrap trees a random forest misses its defining predictor sampling at splits. Bootstrap sampling alone describes ordinary bagging.
Reference: [2]
30. Boosting updates
Boosting builds an additive prediction sequentially. Each new weak learner targets what the current ensemble still gets wrong under a chosen loss function. In squared-error regression, fitting the next learner to residuals is the familiar case; for other losses, the target can be a gradient-based correction. The learner's output is multiplied by a learning rate before being added to the current prediction. Smaller rates make each step more cautious and typically require more learners. Tree depth controls the complexity of each correction, while the number of boosting rounds controls how long the ensemble keeps adapting. Validation helps choose these settings because continuing to reduce training loss can eventually fit noise. Unlike bagging, later learners depend on earlier fitted predictions.
Worked example: A boosted regression ensemble currently predicts 100 currency units for a risk. Its next tree proposes a residual correction of +10 units at that risk. With learning rate 0.2, the update is 100 + 0.2(10) = 102 units. The ensemble moves only 2 units toward the correction; later trees may add or subtract further adjustments.
Watch the distinction: Treating boosted trees as independent bootstrap votes misses their sequence. Each new learner responds to the current ensemble's errors, so its contribution depends on earlier learners.
Reference: [2]
31. Out-of-bag assessment and importance
A bootstrap sample omits some original records. For an omitted record, a tree's prediction is out of bag because that tree did not train on the record. Aggregate only the trees for which each record was omitted, then compare those predictions with observed outcomes to estimate predictive error. Permutation importance starts from this baseline: shuffle one predictor among the out-of-bag records and measure the change in error. A larger increase suggests the forest relied on that predictor for prediction. The result is conditional on the fitted data, the other predictors, and the permutation scheme. Correlated predictors can substitute for one another, making either one's individual importance appear small. Predictive reliance does not establish a causal effect or a suitable rating variable.
Worked example: Suppose a forest's out-of-bag mean squared error is 4 squared loss units. After permuting one predictor across the relevant out-of-bag records, error rises to 9. Its measured importance is 9 − 4 = 5 squared loss units. That indicates lost predictive accuracy when this predictor is disrupted, subject to sampling variation and correlation with other predictors.
Watch the distinction: A large permutation-importance value does not prove that changing the predictor would change claims. The calculation disrupts a statistical association, not a controlled intervention.
Reference: [2]
32. Scaling before PCA
Principal components analysis finds orthogonal directions that capture variation in centered predictors. A covariance-based PCA preserves the original measurement scales, so a variable with a large numerical variance can strongly influence the leading direction. A correlation-based PCA first standardizes each variable by its standard deviation, giving each nonconstant variable unit variance. Choose the basis according to the question: original-scale variation may be meaningful when variables share units, while standardization is often sensible for unlike units. Standardization does not make every variable equally informative; it only equalizes starting variance. Learn centering and scaling values from training data and reuse them for later observations. PCA is unsupervised, so directions with high predictor variance need not be best for predicting losses.
Worked example: Two centered predictors have variances 100 and 1 in their respective squared units. In a covariance PCA, the first can dominate simply because its spread is ten times larger in standard deviation. Dividing each predictor by its own standard deviation, 10 and 1, gives both standardized variance 1. The resulting correlation PCA then seeks directions in their common standardized scale.
Watch the distinction: Standardizing for PCA does not make large-variance variables unimportant by decree. It changes the question from variation in original units to variation measured in standard deviations.
Reference: [2]
33. PCA loadings and scores
A loading vector specifies a principal-component direction in predictor space. Its entries show how the centered, and possibly standardized, variables combine. The score for an observation is the dot product of its transformed predictor vector and that loading vector. Unit-length loadings make the score a projection onto the direction. A large positive score means the observation lies far along the chosen orientation; reversing every loading sign reverses every score sign without changing the component's information. Examine the loading pattern before naming a component: same-sign loadings represent joint movement, while opposite signs describe a contrast. A score is a coordinate, not a fitted outcome or a probability. Interpret it in the scale used to construct the PCA.
Worked example: For unit loading vector (1/√2, 1/√2), a standardized observation (2, 0) has score 2(1/√2) + 0(1/√2) = √2 ≈ 1.414. The positive score places it along the direction where both predictors increase together. Reversing the loading vector would give −1.414 but represent the same principal axis.
Watch the distinction: Reading a loading as the predicted change in losses confuses an unsupervised direction with a regression coefficient. PCA scores describe predictor positions without using the outcome.
Reference: [2]
34. Variance explained by components
Each PCA eigenvalue gives the variance of scores along its component. Divide an eigenvalue by the sum of all eigenvalues to find its share of total predictor variance. For standardized variables, that total equals the number of variables when the usual correlation matrix is used. Retaining the first few components preserves the directions with the greatest variance under the chosen scaling and gives a lower-dimensional representation. The discarded share quantifies lost variance in that representation, not necessarily lost predictive power. A low-variance direction may still be associated with an outcome. When interpreting software output, confirm whether reported proportions are individual or cumulative and whether PCA used covariance or correlation. These choices alter what a percentage means.
Worked example: Two standardized predictors yield PCA eigenvalues 3 and 1, totaling 4 variance units. Component one explains 3/4 = 75%; component two explains 1/4 = 25%. Retaining only the first component preserves 75% of the predictor variance and discards the second direction's 25%. This does not say that a downstream loss model retains 75% of its predictive accuracy.
Watch the distinction: A component explaining most predictor variance is not automatically the best predictor of claims. PCA does not use claim outcomes when choosing its directions.
Reference: [2]
35. Reading a PCA reconstruction
A PCA reconstruction maps retained component scores back into predictor coordinates. With centered data and orthonormal loadings, multiply each retained score by its loading vector and add the resulting vectors; then restore original means and scales if the data were standardized. Keeping every component reproduces the transformed observation, apart from rounding. Keeping fewer components projects it onto a lower-dimensional subspace, so differences between the original and reconstructed coordinates lie in omitted directions. This gives a concrete interpretation of information loss. A good reconstruction in squared predictor distance does not guarantee good prediction of an actuarial outcome. Check which variables were scaled before interpreting errors in original units; an apparently small standardized error can still be substantial in currency or exposure terms.
Worked example: For centered, standardized observation (2, 0), retain only loading (1/√2, 1/√2). Its score is √2, so the reconstruction is √2(1/√2, 1/√2) = (1, 1). The original minus reconstructed vector is (1, −1), the omitted contrast. Both coordinates change by one standardized unit, even though the retained component preserves the shared-increase direction.
Watch the distinction: A one-component reconstruction need not match any original variable exactly. It is the closest projection within the retained component space under the PCA distance criterion.
Reference: [2]
36. K-means assignments and centroids
K-means seeks K centers that minimize the sum of squared distances from observations to their assigned centers. Given centers, assign each observation to its nearest one under the chosen distance. Given assignments, update each center to its assigned observations' coordinate-wise mean. Repeat these steps until assignments or the objective stop changing. Each step cannot increase the within-cluster squared-error objective, but different starting centers can lead to different local solutions. Standardize variables when their units would otherwise give unintended influence. K-means works best when Euclidean distance and compact, roughly center-based groups describe the intended similarity; it can struggle with elongated groups, outliers, and categorical variables. Cluster labels are arbitrary names, not ordered risk grades.
Worked example: For one-dimensional points 1, 2, 9, and 10, assign {1, 2} to one cluster and {9, 10} to another. Updated centroids are (1 + 2)/2 = 1.5 and (9 + 10)/2 = 9.5. Squared errors are four terms of 0.25, so total within-cluster squared error is 1 squared unit.
Watch the distinction: A centroid is the mean of assigned observations, not necessarily an observed record. Replacing it with the nearest record changes the algorithm and its objective.
Reference: [2]
37. Choosing and checking K-means groups
Within-cluster squared error cannot increase when K grows because extra centers give the fit more flexibility. Therefore, choose K by judging whether the reduction remains useful relative to complexity, and inspect separation, interpretability, and stability across starts or resamples. An elbow in an error plot can suggest a practical choice, but it is not a mathematical proof of the true number of groups. Compare solutions only after holding distance and predictor scaling fixed. Repeat K-means with several initial centers because its alternating updates can settle at a local optimum. In actuarial use, examine whether proposed clusters remain coherent across samples and whether their observed outcomes are stable; a visually neat partition alone does not establish a reliable risk classification.
Worked example: For points 1, 2, 9, and 10, one centroid is 5.5. Its squared error is 4.5² + 3.5² + 3.5² + 4.5² = 65. With K = 2 and groups {1, 2} and {9, 10}, error is 1. The drop of 64 supports inspecting two groups, but K = 3 would reduce error further by construction.
Watch the distinction: Selecting the largest tested K because it has the lowest within-cluster error ignores that the objective always improves or stays level as centers are added.
Reference: [2]
38. Hierarchical linkage
Agglomerative hierarchical clustering starts with each observation as its own cluster and repeatedly merges the closest pair under a chosen linkage rule. Single linkage uses the smallest pairwise distance between points in different clusters; complete linkage uses the largest. Average linkage uses an average of cross-cluster distances. These rules can produce different merge orders from the same data. Single linkage can connect long chains through close neighbors, while complete linkage tends to favor clusters with limited diameter. A dendrogram records the sequence and distance of merges, but its heights depend on the distance measure and linkage. Scale variables deliberately before calculating distances, and interpret a merge height as a dissimilarity under the stated rule, not as a probability.
Worked example: On a number line, cluster A contains points 0 and 4, while cluster B contains 7. Cross-cluster distances are |0 − 7| = 7 and |4 − 7| = 3 units. Single-linkage distance is min(7, 3) = 3 units; complete-linkage distance is max(7, 3) = 7 units. Another nearby cluster could merge first under one rule but not the other.
Watch the distinction: The distance between cluster centers is not automatically the hierarchical linkage distance. Single and complete linkage use point-pair extremes, so both differ from centroid distance.
Reference: [2]
39. Cutting a dendrogram
A dendrogram shows each agglomerative merge at a height determined by the chosen distance and linkage. A horizontal cut forms clusters from branches already joined below the cut while leaving higher merges separate. Start with one cluster per observation; each merge reduces the count by one. The height scale matters: a large jump between successive merges may suggest a useful cut, but does not establish a unique natural grouping. A cut also preserves the earlier algorithm's irreversible decisions; it does not rerun clustering at that K. Check how the result changes with scaling, linkage, and modest data changes. Interpret the resulting groups using their predictor profiles rather than assigning meaning from dendrogram position or left-to-right order.
Worked example: Four observations begin as four singleton clusters. Merges at heights 1 and 2 reduce the count first to three, then to two. A final merge at height 8 reduces it to one. A horizontal cut at height 5 lies above the first two joins and below the last, leaving two clusters. A cut above height 8 leaves one cluster.
Watch the distinction: Counting visible branch tips below a cut without tracing their joins can misstate the cluster count. Count connected components at the chosen height.
Reference: [2]
40. Cluster separation and stability
For one observation, let a be its average distance to others in its assigned cluster and b the smallest average distance to any other cluster. Its silhouette is (b − a)/max(a, b), with values near 1 indicating better separation, near zero indicating a boundary case, and negative values suggesting a closer alternative cluster. This describes the fitted partition under its chosen distance; it does not test whether the groups will recur in new data. Assess stability by repeating the clustering after resampling or reasonable perturbations and comparing memberships, allowing for arbitrary label swaps. The PCPA study guide offers related predictive modeling context, but separation and stability should be checked directly for this unsupervised task.
Worked example: For a policy, average distance to members of its own cluster is a = 2 standardized distance units. Its nearest alternative cluster has average distance b = 6. The silhouette is (6 − 2)/max(2, 6) = 4/6 ≈ 0.667, indicating good separation in this fit. If resampled data frequently move the policy elsewhere, that favorable silhouette does not imply stable membership.
Watch the distinction: A high silhouette from one fitted dataset does not prove a durable risk segment. It measures geometric separation under the current variables, scale, distance, and clustering.
Reference: [2]
41. A neural-network forward pass
A feedforward network transforms inputs layer by layer. Each unit first forms a weighted sum of its inputs and adds a bias: z = w₁x₁ + w₂x₂ + b. An activation function then turns z into the unit’s output. With ReLU, that output is max(0, z), so a negative weighted input produces zero while a positive one passes through. The next layer uses these outputs as its inputs. To interpret a network result, follow this sequence from the supplied values rather than treating each weight as a stand-alone effect. A weight’s influence depends on the other inputs, the bias, and which units are active. The 2026 MAS-II content outline includes interpretation of neural-network results; a forward pass shows how such a result is formed.
Worked example: Suppose two dimensionless inputs are 1 and 3, their weights are 2 and −1, and the bias is 1. The unit’s weighted input is z = 2(1) − 1(3) + 1 = 0. ReLU produces max(0, 0) = 0. If a later output unit receives only this value, it receives zero from this connection; its own bias and other connections may still produce a nonzero final output.
Watch the distinction: A positive weight does not guarantee a positive activated output. The other weighted inputs and bias can offset it, and ReLU sets any negative total to zero.
Reference: [2]
42. Neural-network classification output
For binary classification, a network often produces a logit, which is a score on the log-odds scale. The sigmoid function converts it to a modeled probability: p = 1/(1 + e^(−z)). Equivalently, if z is the log of some odds, those odds divided by one plus the odds give p. This probability is distinct from the class label. A decision rule compares p with a chosen cutoff, which may reflect the relative costs of false positives and false negatives. Changing the cutoff changes labels without changing the network’s probabilities or ranking. Also check which event the model defines as positive; 0.75 could describe a claim, a nonclaim, or another outcome depending on the response coding. The log-odds interpretation builds on regression concepts covered in the MAS-I study guide.
Worked example: A binary network gives a policy a logit of ln(3). Its odds for the defined positive event are e^ln(3) = 3, so its modeled probability is 3/(1 + 3) = 0.75. Under a hypothetical cutoff of 0.50, the predicted label is positive. Under a hypothetical cutoff of 0.80, the same probability receives a negative label. Neither label changes the probability estimate.
Watch the distinction: Do not report a logit of ln(3) as a 3% or 300% probability. Convert from log-odds first, then apply the stated classification cutoff.
Reference: [2]
43. Training and regularizing a network
Training adjusts network weights and biases to reduce an objective function. A data-loss term measures the mismatch between predictions and observed outcomes; its form depends on the task, such as squared error for a regression example or cross-entropy for classification. Optimization repeatedly uses information about how the objective changes with each parameter to propose updates. A squared-weight penalty adds a cost proportional to the sum of squared weights. This discourages large weights and can reduce sensitivity to peculiarities of the training sample. The penalty coefficient controls that trade-off and should be chosen using validation data, since training loss alone favors an overly flexible fit. Biases may or may not be penalized, so read the stated objective. Standardizing inputs can also matter because a common weight penalty acts differently when predictor scales differ.
Worked example: Suppose a network has a data loss of 5, two penalized weights of 3 and 4, and a hypothetical squared-weight penalty coefficient of 0.1. The squared weights sum to 3² + 4² = 25. The penalty is 0.1(25) = 2.5, making the training objective 5 + 2.5 = 7.5. An update should be judged by its effect on this combined objective, not solely the data loss.
Watch the distinction: Regularization does not simply subtract a fixed amount from every prediction. It changes which parameter values training favors, and a stronger penalty can increase training error.
Reference: [2]
44. Confusion-matrix measures
Start by identifying the positive event and placing each observation in a confusion matrix. True positives and false negatives are actual positives; true negatives and false positives are actual negatives. Sensitivity, or recall, asks what fraction of actual positives were detected: TP/(TP + FN). Precision asks what fraction of positive predictions were correct: TP/(TP + FP). Specificity asks what fraction of actual negatives were rejected: TN/(TN + FP). These denominators answer different questions, so the same model can have high sensitivity and modest precision. When the positive event is rare, false positives can dominate predicted positives even if specificity looks strong. These measures depend on the classification cutoff; compare models at a stated cutoff or examine performance across cutoffs. The CAS MAS-II practice questions provide a place to rehearse such calculations.
Worked example: For a hypothetical claim flag, let TP = 30, FN = 10, FP = 20, and TN = 40 policies. There are 40 actual claim policies, so sensitivity is 30/40 = 0.75. There are 50 positive predictions, so precision is 30/50 = 0.60. There are 60 actual nonclaim policies, so specificity is 40/60 ≈ 0.667. The denominators identify the question each measure answers.
Watch the distinction: Do not divide true positives by all positive predictions when asked for sensitivity. That denominator gives precision; sensitivity uses every actual positive, including missed cases.
Reference: [2]
45. Lift in a ranked segment
Lift evaluates how strongly a model concentrates an outcome near the top of a ranking. Sort policies by predicted risk, select a stated share of comparable exposure, and calculate the selected group’s share of actual outcomes. Divide outcome share by exposure share. A lift of 1 means the segment has the portfolio-average concentration; a value above 1 means greater concentration. For claim counts, policies must have equal exposure or the calculation must use exposure units rather than raw policy counts. For loss amounts, the outcome share is the segment’s actual loss divided by total actual loss. Lift describes ranking in the evaluated data; it does not establish probability calibration or causal effects. Validation data are preferable because a segment chosen and assessed on the training sample can look unusually strong. Always name the segment size and outcome being measured.
Worked example: Suppose 1,000 policies each have one year of exposure, and the portfolio records 200 claims. The 100 highest-ranked policies represent 100/1,000 = 10% of exposure and have 60 claims, or 60/200 = 30% of claims. Lift is 30%/10% = 3. Their observed claim concentration is three times the portfolio average; this says nothing by itself about whether predicted claim probabilities were calibrated.
Watch the distinction: A top-decile lift of 3 does not mean each selected policy has a 300% claim probability. Lift compares outcome concentration with exposure concentration.
Reference: [2]
46. Area under the ROC curve
The area under the receiver operating characteristic curve summarizes how well a score ranks positive cases above negative cases. Its pairwise interpretation is especially useful: select one positive and one negative at random, then ask whether the positive has the higher score. AUROC is the fraction of correctly ordered pairs, with half credit for tied scores. It evaluates discrimination across possible classification cutoffs, so no particular cutoff is required. A value of 0.5 corresponds to chance-level ranking under this interpretation, while 1 represents perfect separation in the evaluated sample. AUROC does not tell you whether predicted probabilities match observed frequencies or whether a chosen operating cutoff is economically sensible. In an actuarial application, verify that the score increases with the event designated positive and assess ranking on data separate from model fitting.
Worked example: Two actual positives have scores 0.9 and 0.4; two actual negatives have scores 0.6 and 0.2. The 0.9 positive outranks both negatives, giving two correct pairs. The 0.4 positive outranks 0.2 but not 0.6, giving one more. There are 2 × 2 = 4 positive-negative pairs and no ties, so AUROC is 3/4 = 0.75.
Watch the distinction: AUROC of 0.75 does not mean 75% of policies were classified correctly. It describes positive-negative pair ranking across cutoffs, while accuracy requires one chosen cutoff.
Reference: [2]
47. Two different Gini measures
Two statistics called Gini serve different purposes. A classification tree uses node Gini impurity, 1 − Σpₖ², where pₖ is the share in class k. It measures class mixing within a node, so lower impurity means a purer node. A split is assessed through the observation-weighted impurity of its children. Predictive Gini, in common binary-ranking use, equals 2 × AUROC − 1. It describes how well a score orders positive and negative cases across a data set. These values cannot be substituted for one another: they have different inputs, scales, and interpretations. When a question says “Gini,” inspect its context. Class counts within a node point to impurity; ROC results or model-ranking comparisons point to predictive Gini. In either case, calculate the underlying proportions before applying the formula.
Worked example: If a model’s AUROC is 0.75, predictive Gini is 2(0.75) − 1 = 0.50, indicating ranking above the chance benchmark of zero. Separately, a tree node with three positives and one negative has class shares 3/4 and 1/4. Its Gini impurity is 1 − (3/4)² − (1/4)² = 1 − 10/16 = 0.375. The numbers summarize different objects.
Watch the distinction: Do not use 2 × AUROC − 1 to score a proposed tree split. Split assessment needs parent and weighted child node impurities, not a whole-model ranking statistic.
Reference: [2]
48. Comparing models with double lift
A double lift comparison shows where two models disagree and which model better matches observed outcomes in those regions. For each observation, form the ratio of model A’s prediction to model B’s prediction, assuming the predictions are positive and on the same exposure and outcome basis. Sort by that ratio, then divide the ordered observations into groups of comparable exposure. Within each group, aggregate actual outcomes and both sets of predictions. Low ratios identify cases where A predicts less than B; high ratios identify the reverse. If actual results track B in low-ratio groups and A in high-ratio groups, each model captures a different part of the pattern. Examine totals as well as group shapes: a model could match relative variation while systematically overpredicting. Grouped comparisons diagnose performance but can conceal differences within groups.
Worked example: Consider two equal-exposure groups formed from the A/B prediction ratio. In the low-ratio group, A predicts 80 loss units, B predicts 100, and actual loss is 100; B has zero aggregate error there, versus A’s −20. In the high-ratio group, A predicts 120, B predicts 100, and actual loss is 120; A has zero error, versus B’s −20. The pattern identifies where each model fits better.
Watch the distinction: Do not sort by observed loss when constructing double lift groups. Sort by the models’ prediction ratio; otherwise the grouping uses the outcome it is meant to evaluate.
Reference: [2]
D. Time Series with Constant Variance
49. A deterministic time trend
A deterministic trend represents the fitted mean as a specified function of time, often E[yₜ] = β₀ + β₁t. Here β₁ is the change in fitted mean for a one-period increase in the time index, with the index’s starting point determining the intercept’s meaning. Observed values can differ from this mean through residual variation. To forecast, substitute the future time index into the fitted equation; distinguish that point forecast from an interval that also reflects residual uncertainty. A time regression does not automatically remove serial correlation: residuals may remain related across periods, which affects standard errors and forecast intervals. Plot the series and inspect residual dependence before treating ordinary regression inference as adequate. A linear fitted trend also extends indefinitely when extrapolated, so long-horizon use requires judgment about whether the underlying pattern can persist.
Worked example: Suppose a hypothetical quarterly metric, measured in units per quarter, has fitted mean ŷₜ = 100 + 3t, with t = 0 at the reference quarter. At t = 4, the fitted mean is 100 + 3(4) = 112 units. Relative to t = 3, the fitted mean rises by 3 units. An observed value of 109 at t = 4 would have residual 109 − 112 = −3 units.
Watch the distinction: Do not interpret the trend coefficient as a guaranteed change in every observed period. It changes the fitted mean; random deviations can make individual observations rise or fall.
Reference: [2]
50. Seasonal regression indicators
Seasonal indicators let a regression assign recurring differences to positions within a cycle, such as quarters. With an intercept and four quarters, include indicators for only three quarters; the omitted quarter is the reference. A coefficient on the third-quarter indicator is the fitted difference from that reference quarter at the same time index and with other included predictors held fixed. Add the relevant seasonal coefficient to the baseline and trend when calculating a fitted value. The time index and seasonal positions must be aligned: changing where t begins can alter the intercept but not the underlying fitted values if the model is reparameterized consistently. Seasonal indicators describe a fixed repeating pattern. If seasonal effects evolve over time, interactions, changing coefficients, or a different time-series structure may be needed. Check residual patterns before assuming the indicators captured all dependence.
Worked example: Suppose the fitted quarterly mean is 100 + 2t + 20I(Q3), measured in loss units, and other seasonal adjustments are zero for this example. At t = 7 in quarter three, I(Q3) = 1, so the fitted mean is 100 + 2(7) + 20 = 134. At the same time index in the reference quarter, the fitted mean would be 114; the seasonal difference is 20 units.
Watch the distinction: Do not add every quarter’s indicator coefficient to one forecast. Only the indicator for the observation’s quarter is active, and the omitted reference quarter has coefficient zero.
Reference: [2]
51. Deterministic and stochastic trends
A deterministic trend and a stochastic trend respond differently to shocks. In a fixed linear trend with independent zero-mean errors, a shock changes one observation but does not shift later fitted means. A random walk with drift follows yₜ = yₜ₋₁ + d + εₜ. Each innovation becomes part of the next period’s starting level, so its effect persists. After h periods, the conditional mean is the current value plus hd. If innovations are independent with variance σ², forecast-error variance is hσ² because h future shocks accumulate. This distinction shapes both forecasting and uncertainty: the random walk’s forecast interval widens with horizon even when innovation variance stays constant. A trending plot alone does not identify which mechanism generated the data. Examine differences, dependence, and whether deviations appear to return toward a fixed path.
Worked example: Start at 100 units. A hypothetical random walk has drift 2 units per period and independent innovation variance 9 squared units. Its two-step conditional mean is 100 + 2(2) = 104 units; two future shocks give forecast-error variance 9 + 9 = 18 squared units. A fixed trend predicting 104 after two periods with independent observation-error variance 9 would have variance 9 for that future observation.
Watch the distinction: Constant innovation variance does not imply constant multi-step forecast variance for a random walk. Each future innovation remains in the level, so their variances accumulate.
Reference: [2]
52. Stationary dependence and mean reversion
An AR(1) model can be written yₜ − μ = φ(yₜ₋₁ − μ) + εₜ, where μ is the long-run mean and εₜ is a zero-mean innovation. With |φ| < 1 and stable innovation variance, the process is stationary under the usual assumptions: its mean and variance do not change with time, and dependence depends on lag. The one-step conditional forecast retains the fraction φ of today’s deviation from μ. Repeated forecasts multiply that deviation by further powers of φ, so it decays when |φ| < 1. A negative φ alternates the sign of successive forecast deviations; a positive φ moves toward μ from the same side. Stationarity does not mean observations are independent or constant. Before applying mean reversion, check that the model includes the appropriate mean and that the estimated coefficient supports a stable process.
Worked example: Suppose μ = 10 units, φ = 0.6, and the latest observed value is 16. The current deviation is 16 − 10 = 6 units. The one-step conditional mean is 10 + 0.6(6) = 13.6 units, leaving a 3.6-unit deviation. A second step would give 10 + 0.6(3.6) = 12.16 units, showing continued movement toward 10.
Watch the distinction: Mean reversion does not require the next observed value to be closer to the mean. The conditional expectation moves inward, but the next innovation can push the observation outward.
Reference: [2]
53. Autoregressive lag terms
An autoregressive model predicts the current value from previous observed values. In an AR(2), yₜ = c + φ₁yₜ₋₁ + φ₂yₜ₋₂ + εₜ, the one-step conditional mean sets the unknown future innovation to its assumed mean of zero and uses both known lags. Each coefficient measures the contribution of its lag while the other lag is held fixed. For forecasts beyond one step, replace unavailable lagged observations with forecasts already calculated. This recursion differs from adding the coefficients and applying their sum to a single last observation. An intercept may be zero in a stated example, but should not be silently omitted in general. Whether an AR model has a stable long-run distribution depends on its coefficients jointly, not merely on each coefficient being less than one in absolute value.
Worked example: Take the hypothetical zero-intercept model yₜ = 0.5yₜ₋₁ + 0.2yₜ₋₂ + εₜ, with zero-mean future innovation. If yₜ₋₁ = 10 units and yₜ₋₂ = 5 units, the one-step conditional forecast is 0.5(10) + 0.2(5) = 5 + 1 = 6 units. The first lag contributes 5 units and the second contributes 1, conditional on the supplied history.
Watch the distinction: Do not treat an AR(2) as an MA(2): its terms use past observations, while moving-average terms use past innovations. Those are different inputs for forecasting.
Reference: [2]
54. Moving-average shocks
A moving-average model uses current and past innovations rather than past observed values as direct predictors. In the zero-mean MA(1) form yₜ = εₜ + θεₜ₋₁, a shock affects the current observation and, through θ, the next one. It then drops out of later observations. Given information through time t, the one-step conditional forecast is θεₜ because the next innovation has mean zero. At two or more steps ahead, the conditional forecast returns to zero in this centered model because no known innovation remains in the equation. In practice, innovations are unobserved and must be inferred from a fitted model; a worked calculation may supply them explicitly. Add a nonzero mean when the model includes one. The sign of θ determines whether a shock’s next-period contribution reinforces or offsets it.
Worked example: For the hypothetical zero-mean model yₜ = εₜ + 0.4εₜ₋₁, let the current innovation be 2 units and the previous innovation 5 units. The current value is 2 + 0.4(5) = 4 units. At the next period, the known contribution is 0.4(2) = 0.8 units, while the new innovation has conditional mean zero. The one-step forecast is therefore 0.8 units.
Watch the distinction: Do not insert today’s observed value of 4 in place of today’s innovation of 2. An MA forecast uses the innovation identified by the model.
Reference: [2]
55. ACF and PACF identification
The autocorrelation function, or ACF, measures correlation between observations separated by each lag. The partial autocorrelation function, or PACF, measures the remaining association at a lag after accounting for shorter intervening lags. For an ideal stationary AR(1), theoretical ACF correlations decay geometrically as φ, φ², and so on, while the PACF is zero after lag one. For an ideal MA(1), the theoretical ACF is zero after lag one, while the PACF generally tails off. These are identification clues, not rigid rules for a finite sample. Estimated correlations fluctuate, and trend or seasonality can distort the patterns if left untreated. Inspect plots alongside the series itself, propose a small set of plausible models, and check whether fitted residuals still show dependence. A single prominent sample spike rarely settles the model choice.
Worked example: For a hypothetical stationary AR(1) with φ = 0.6, the theoretical lag-one ACF is 0.6 and lag-two ACF is 0.6² = 0.36. Its theoretical PACF has its only nonzero lag at lag one. By contrast, an MA(1) has theoretical ACF values of zero from lag two onward. A sample ACF may show small nonzero values there because it estimates the theoretical pattern from finite data.
Watch the distinction: Do not declare an MA(1) whenever the sample ACF has one large spike. Sampling noise, trend, and seasonal dependence can produce misleading apparent cutoffs.
Reference: [2]
56. Differencing and ARIMA order
First differencing replaces a series level with its period-to-period change: Δyₜ = yₜ − yₜ₋₁. It can remove a stochastic level trend when the changes behave more like a stationary series. In ARIMA(p,d,q), d counts how many ordinary differences are applied before the autoregressive and moving-average terms model the transformed series. An ARIMA(0,1,0) with drift treats the first difference as a constant drift plus an innovation, so the next level forecast adds that drift to the latest level. Check the meaning of software-reported constants because ARIMA parameterizations differ. Differencing a series that was already stationary can create unnecessary dependence and discard useful level information. Conversely, a deterministic trend with stationary errors may be modeled directly by regression. Examine both the series and its differences before choosing an integrated order.
Worked example: A hypothetical series records 100, 105, and 111 units in successive periods. First differences are 105 − 100 = 5 and 111 − 105 = 6 units per period. Suppose an ARIMA(0,1,0) model specifies drift of 5.5 units per period and a zero-mean innovation. Its next difference forecast is 5.5, so the next level point forecast is 111 + 5.5 = 116.5 units.
Watch the distinction: The integrated order d = 1 does not mean the original levels are stationary. It means the model applies one difference and models the resulting changes.
Reference: [2]
57. Seasonal differencing
Seasonal differencing compares an observation with the one at the same position in the previous cycle. For quarterly data, the lag-four seasonal difference is yₜ − yₜ₋₄; for monthly data with an annual cycle, it is yₜ − yₜ₋₁₂. This can remove a repeating seasonal level pattern, and it answers a different question from ordinary first differencing, yₜ − yₜ₋₁. A value of 8 in a quarterly seasonal difference means the current quarter is 8 units above the same quarter last year, even if it fell from the preceding quarter. Seasonal differencing may still leave trend or short-lag dependence, so inspect the transformed series and its ACF. Applying both ordinary and seasonal differences without need can amplify noise. Choose the lag from the actual observation frequency and hypothesized cycle.
Worked example: Suppose quarterly values are 100, 110, 120, 130, and 108 units. The fifth value is the same calendar quarter as the first, so its lag-four seasonal difference is 108 − 100 = 8 units. Its ordinary first difference is 108 − 130 = −22 units. Both are correct: the series rose 8 year over year for that quarter while falling 22 from the preceding quarter.
Watch the distinction: Do not use the preceding quarter as the seasonal comparison in quarterly annual data. That gives an ordinary adjacent-period difference, which answers a different question.
Reference: [2]
58. Checking ARIMA residuals
After fitting an ARIMA model, inspect residuals as estimates of innovations. A useful model should leave little systematic time dependence: the residual ACF should not display a clear pattern, and a suitable joint test can assess several lags together. A residual autocorrelation at lag one suggests that adjacent periods retain a relationship the model did not capture. A reported p-value evaluates a specified test under its null hypothesis and assumptions; it cannot be inferred from an autocorrelation value alone without information such as sample size and test design. Also inspect residual level and spread over time, since a model aimed at constant-variance behavior may fit the mean dependence yet miss changing variance. If diagnostics raise a concern, revisit differencing, lag terms, seasonality, or model assumptions, then evaluate the revised fit and forecasts.
Worked example: A fitted model reports residual lag-one autocorrelation of 0.45 and a supplied test p-value of 0.02 for remaining dependence. At a hypothetical significance level of 0.05, 0.02 < 0.05, so the test flags evidence against its no-dependence null. The positive lag-one value indicates the direction of the leftover association. Reconsider the model’s time structure; these numbers alone do not identify the correct replacement order.
Watch the distinction: Do not read p = 0.02 as a 2% probability that the fitted ARIMA model is correct. It is a test result conditional on a specified null and assumptions.
Reference: [2]
59. Multi-step point forecasts
A multi-step autoregressive forecast must be built in sequence. For an AR(1) centered at mean μ, the first forecast is μ + φ(yₜ − μ). The second uses the first forecast as its input, giving μ + φ²(yₜ − μ); at horizon h, the deviation is φʰ times the current deviation. This assumes future innovations have conditional mean zero. With |φ| < 1, forecasts approach μ as the horizon increases. The point forecasts do not reveal uncertainty: additional future innovations affect longer horizons, so intervals usually widen. If the model has a nonzero mean, recentering avoids confusing an intercept with the long-run level. For models with several autoregressive lags, each new forecast uses the appropriate combination of observed values and forecasts from earlier steps.
Worked example: Suppose an AR(1) has long-run mean 10 units, coefficient 0.5, and latest observation 18 units. The one-step forecast is 10 + 0.5(18 − 10) = 14 units. The two-step forecast substitutes 14 for the unavailable next observation: 10 + 0.5(14 − 10) = 12 units. Equivalently, 10 + 0.5²(8) = 12. The forecasts move toward 10.
Watch the distinction: Do not reuse the last observed value of 18 at every horizon. After the first step, the recursion uses earlier forecasts where future observations are unavailable.
Reference: [2]
60. Forecast intervals under constant variance
A forecast interval adds uncertainty around a conditional point forecast. For an AR(1) with innovation variance σ² and coefficient φ, the h-step forecast error combines future innovations with weights 1, φ, through φ^(h−1). Under independent, constant-variance innovations, its variance is σ²Σⱼ₌₀^(h−1)φ^(2j). At two steps, this becomes σ²(1 + φ²): the next shock affects the final value through φ, and the second shock enters directly. If innovations are Gaussian and parameters are treated as known, a central 95% interval uses forecast ± 1.96 times the forecast-error standard deviation. Estimated parameters add uncertainty that this simple calculation omits. The interval describes a future observation under the model, not certainty that the model’s assumptions hold. For broader credential context, see the ACAS study guide.
Worked example: Take a hypothetical AR(1) with φ = 0.5, innovation variance 4 squared loss units, and two-step point forecast 12 loss units. Forecast-error variance is 4(1 + 0.5²) = 4(1.25) = 5 squared units, so standard deviation is √5 ≈ 2.236 units. Under Gaussian, known-parameter assumptions, the central 95% interval is 12 ± 1.96√5 = 12 ± 4.383, or approximately [7.62, 16.38] loss units.
Watch the distinction: Do not use the one-step innovation standard deviation of 2 for every horizon. At two steps, both future innovations contribute to forecast error.
Reference: [2]