All exam versions

SRM Statistics for Risk Modeling Study Guide

60 concepts · 61 minute read

An actuarial model is useful only when its output answers the decision at hand. A method that explains how a risk factor relates to claims may be a poor choice for forecasting next quarter's claims, while a strong predictor may be difficult to interpret. This guide develops both kinds of judgment. You will estimate and interpret regression models, check their assumptions, compare predictions on held-out data, and work with binary, count, and positive continuous outcomes. You will also forecast time series, evaluate trees and ensembles, and use principal components and clustering to explore unlabeled data. The examples use hypothetical risk data so that each calculation leads to a practical interpretation.

Statistical learning foundations and predictive assessment

1. Labels and learning tasks

In supervised learning, each training record contains predictors and an observed outcome. The fitting procedure uses that outcome to learn a mapping from policy characteristics to a claim amount, claim indicator, or another target. In unsupervised learning, the procedure examines patterns among observations without using an outcome to guide fitting. Clustering might group policies with similar ages and exposures; principal components might summarize correlated characteristics. Neither result has a risk meaning until you compare it with outcomes or another relevant measure. A useful first question is, “What information tells the method it made a good prediction?” If observed outcomes provide that feedback, the task is supervised. For candidates studying with the Society of Actuaries, this distinction helps frame modeling questions before any algorithm is chosen.

Worked example: A hypothetical file records vehicle age, annual mileage, and claim amount for each policy. Fitting a model that uses age and mileage to predict claim amount is supervised: recorded amounts guide its estimates. Running a clustering method on age and mileage alone is unsupervised. If the clusters later have mean claim amounts of 400 and 700 currency units, that comparison describes the groups after fitting; it did not guide their formation.

Watch the distinction: A cluster with high historical claims is not automatically a high-risk class for new policies. Check whether the difference persists on fresh data and reflects comparable exposure.

2. Amounts versus events

Choose the task from the quantity needed for a decision. Regression predicts a numerical outcome, such as annual claim cost or the number of days until settlement. Classification predicts a category or, often more usefully, a probability of belonging to one, such as whether any claim occurs. A classification probability still needs a decision rule if the action is binary. The cutoff should reflect the consequences of missed events and unnecessary flags, as well as how well predicted probabilities are calibrated. An amount prediction and an event probability answer different questions: a policy can have a low chance of a claim but a high expected cost if claims are severe. State the prediction period and exposure basis before comparing policies, since unequal observation windows change the meaning of both outcomes.

Worked example: Suppose a hypothetical regression predicts 1,200 currency units of annual claim cost for a policy. Separately, a classifier estimates a 0.30 probability of at least one claim during that year. Under a stated rule that flags probabilities above 0.25, the policy is flagged because 0.30 exceeds 0.25. The 1,200 cost estimate alone cannot establish whether the event probability crosses that cutoff.

Watch the distinction: Do not label a numerical forecast as classification because its value influences a yes-or-no action. The model predicts an amount; the later decision rule creates the category.

3. Prediction and explanation

A model chosen for prediction should work well on observations that did not influence its development. Judge it with an error measure suited to the business loss, using a validation procedure that respects the data structure. A model chosen for explanation must support a defensible account of how a predictor relates to the response while other included predictors are held fixed. Flexible models can improve accuracy while making a single coefficient unavailable or unstable. Simpler regression can make conditional associations easier to describe, but clarity does not establish causation: omitted variables, selection, and timing can create misleading associations. If both goals matter, evaluate prediction and interpretation separately. Work on communicating modeling results can continue in the related PA study guide.

Worked example: On held-out policies, a flexible model lowers mean absolute claim-cost error from 110 to 90 currency units, a reduction of 20. An interpretable regression instead estimates a mileage coefficient of 6 currency units per specified mileage unit, conditional on its other predictors. Use the flexible model when that predictive gain matters. Use the regression to describe the conditional association, while checking uncertainty and possible confounding before drawing stronger conclusions.

Watch the distinction: A smaller test error does not make every model feature an explanatory effect. Predictors may help forecasting through interactions or correlated information without identifying a causal relationship.

4. Bias, variance, and noise

At a fixed predictor value, expected squared prediction error can be separated into squared bias, prediction variance, and irreducible outcome variance. Bias measures how far the model’s average fitted prediction lies from the true conditional mean. Variance measures how much its fitted prediction changes across possible training samples. Irreducible error is the variation in outcomes that remains even if the conditional mean were known. Increasing flexibility often reduces bias but can raise variance, especially with limited data. The best complexity therefore depends on their sum, not on either component alone. Training error commonly falls as flexibility rises because the model can adapt more closely to the sample; that does not settle performance on new policies. This decomposition uses squared error and a stable data-generating setting, so it should not be applied unchanged to every loss measure.

Worked example: At one risk profile, suppose model A has squared bias 16, prediction variance 9, and irreducible variance 36, all in squared cost units. Its expected squared error is 16 + 9 + 36 = 61. Model B has squared bias 4 and prediction variance 25, giving 4 + 25 + 36 = 65. B has less bias, but A has the lower expected squared error here.

Watch the distinction: Lower bias alone does not guarantee lower prediction error. A flexible fit can move so much between samples that its added variance outweighs the bias reduction.

5. Reading learning curves

Compare training and validation error across model complexity, preferably using the same loss measure and comparable observations. A model with high error on both sets may underfit: it misses structure that even the training sample displays. As complexity increases, training error usually decreases. Validation error may decrease at first, then flatten or rise when the model begins fitting sample-specific noise. A large training-validation gap is a warning, but judge it alongside the absolute validation error and the uncertainty in that estimate. Curves based on tiny validation sets can fluctuate. Leakage, repeated tuning on one holdout, or changes in the underlying risk mix can also distort the pattern. Choose complexity near a reliably low validation error, then assess the selected procedure on a separate final test set if one is available.

Worked example: Using the same hypothetical error scale, a shallow model has training error 20 and validation error 21. A deeper model scores 5 and 18: its training improvement of 15 yields only 3 points of validation improvement. An even deeper model scores 2 and 24. Its training fit improves again, but its validation error rises by 6, which is evidence of overfitting in this comparison.

Watch the distinction: A large training-validation gap is not itself the selection rule. If validation error still falls materially, extra complexity may help despite a growing gap.

6. Validation and the final test

Split data by purpose before model development. Training observations estimate coefficients or other fitted quantities. Validation observations guide choices such as predictor sets, complexity, or tuning parameters. A final test set estimates performance only after those choices are fixed. If you repeatedly inspect test results and revise the model, the test set becomes another validation set and its reported error can be optimistic. Preprocessing that learns from data, including scaling or imputation, must also be fitted within the training portion of each development split. For policies observed over time, split chronologically when the goal is forecasting future experience; a random split could allow later information into an earlier prediction. Report the loss measure, population, and prediction horizon with the final result, since an error number without those details has little practical meaning.

Worked example: Suppose two candidate models have validation mean squared errors of 120 and 100 squared currency units. Select the second because 100 is smaller. Once its specification is fixed, evaluate it on untouched test policies; suppose its test MSE is 135 squared currency units. Report 135 as the final held-out estimate. The validation value of 100 helped choose the model and may be optimistic.

Watch the distinction: Do not pick the lower test error after comparing many models on the test set. That repeated comparison uses test outcomes for selection and weakens the final assessment.

7. Cross-validation designs

Cross-validation repeatedly fits a method on one part of the development data and scores predictions on omitted observations. In leave-one-out cross-validation, each observation is omitted once, so a dataset of n records requires n fits. In k-fold cross-validation, partition records into k folds, omit one fold at a time, and average their held-out losses. When folds differ in size, average losses by observation count rather than giving each fold equal weight. Every fitting step, including variable selection and scaling, must be repeated inside each training fold; otherwise information leaks into the omitted fold. Leave-one-out uses nearly all records per fit but can be computationally costly. A moderate k reduces fitting cost and changes the training-set size and variability of the estimate. Neither procedure replaces a separate final assessment after model selection.

Worked example: For four policies, leave-one-out squared errors are 1, 4, 9, and 16 squared cost units. Their average is (1 + 4 + 9 + 16)/4 = 7.5, requiring four fits. In two-fold validation with equally sized folds, suppose fold mean errors are 6 and 10. The combined estimate is (6 + 10)/2 = 8, requiring two fits.

Watch the distinction: Do not average unequal fold means without accounting for fold sizes. A two-record fold and a ten-record fold should contribute according to their numbers of predictions.

8. Regression loss measures

Define each prediction error as observed outcome minus prediction; its sign identifies direction, while the loss measure determines how errors are combined. Mean absolute error, or MAE, averages absolute values and remains in the outcome’s units. Mean squared error, or MSE, averages squared values and gives large misses more influence; its units are squared outcome units. Root mean squared error, or RMSE, is the square root of MSE and returns to the original units while retaining the stronger penalty for large misses. A few unusually large claims can therefore make RMSE much larger than MAE. When choosing a measure, consider whether large errors truly have disproportionate cost, and compare models using the same outcome, horizon, and evaluation sample. An average error alone does not reveal systematic underprediction in an important subgroup.

Worked example: Suppose three annual cost errors, in currency units, are 1, -2, and 6. MAE is (1 + 2 + 6)/3 = 3 currency units. MSE is (1 + 4 + 36)/3 = 41/3 ≈ 13.67 squared currency units. RMSE is √(41/3) ≈ 3.70 currency units. The error of 6 contributes 36 of the 41 squared-error units.

Watch the distinction: MSE and RMSE are not interchangeable labels. Both use squared errors, but MSE has squared units and RMSE has the same units as the outcome.

9. Classification thresholds

A probability becomes a positive classification when it crosses a chosen threshold. The resulting confusion matrix separates true positives, false negatives, false positives, and true negatives. Sensitivity is the fraction of actual events detected; specificity is the fraction of nonevents correctly left unflagged. Precision is the fraction of flags that are actual events and therefore depends partly on event prevalence. Lowering a threshold usually increases sensitivity while reducing specificity, because more observations receive positive classifications. Choose a threshold with the consequences of each mistake in view, then check its behavior on data representative of use. A threshold does not improve probability calibration by itself. For calculation practice, SRM practice questions can be used alongside hand-built confusion matrices.

Worked example: At a hypothetical threshold, suppose TP = 30, FN = 10, FP = 20, and TN = 40 policies. Sensitivity is 30/(30 + 10) = 0.75. Specificity is 40/(40 + 20) ≈ 0.67. Precision is 30/(30 + 20) = 0.60. Lowering the cutoff may detect more of the 10 missed claims, but it may also flag additional nonclaim policies.

Watch the distinction: Precision and sensitivity use different denominators. Precision asks what fraction of flags are correct; sensitivity asks what fraction of actual events were flagged.

Linear regression estimation and interpretation

10. A line's two coefficients

A simple linear regression writes the conditional mean of an outcome as an intercept plus a slope times one predictor. The slope is the fitted change in mean outcome for a one-unit increase in the predictor, within the range where the fitted line is credible. Its units are outcome units per predictor unit. The intercept is the fitted mean at predictor value zero; it can be useful algebraically even if zero is outside the observed range. A fitted value describes an expected level under the model, not a guaranteed individual outcome. When interpreting a slope, specify the predictor’s scale: one vehicle year, one thousand miles, and one mile imply very different numerical coefficients. Examine residuals and the observed predictor range before extending a straight-line relationship to much older or younger risks.

Worked example: In a hypothetical model, predicted annual cost in currency units is 200 + 15 × vehicle age in years. For age five, the fitted cost is 200 + 15 × 5 = 275. Within the model, each additional vehicle year raises fitted annual cost by 15 currency units. The intercept of 200 applies at age zero and may be less useful if no nearly new vehicles were observed.

Watch the distinction: Do not read the slope as the change in every policy’s realized cost. Individual outcomes vary around the fitted mean, sometimes substantially, even at the same predictor value.

11. Least-squares fitting

Least squares chooses the line that minimizes the sum of squared vertical residuals. With an intercept, the fitted line passes through the sample means of x and y. Its slope equals the sum of centered x-y cross-products divided by the sum of squared centered x values; the intercept then equals mean y minus slope times mean x. This calculation requires variation in x, since a zero denominator means the slope cannot be identified. A prediction substitutes a specified x value into the fitted line. Squaring residuals makes large errors influential, so inspect unusual observations before treating the line as a stable summary. Also distinguish a fitted prediction inside the observed x range from an extrapolation, where the same arithmetic may have weak empirical support. These formulas describe an association, not a causal effect.

Worked example: Suppose x is vehicle age in years and y is annual cost in currency units. Given mean x = 2, mean y = 7, centered cross-product sum 8, and centered x-square sum 4, the slope is 8/4 = 2 currency units per year. The intercept is 7 - 2 × 2 = 3. At age four, fitted cost is 3 + 2 × 4 = 11.

Watch the distinction: Dividing the cross-product sum by the number of records does not produce the least-squares slope. Divide by the centered sum of squares for x.

12. Holding other predictors fixed

In multiple regression, a coefficient compares two predictor profiles that differ by one unit in that predictor while the other included predictors are fixed. This conditional comparison can differ from a raw group average because groups may have different distributions of the other predictors. For an indicator variable, its coefficient compares the indicated group with the reference group at the same values of the remaining predictors. Before interpreting such a comparison, check whether both groups actually occur across the relevant predictor range; otherwise the model may be extrapolating. A coefficient can also change when another predictor is added because the model now allocates shared variation differently. The fitted relationship is still observational unless a design and assumptions support a causal claim. State both the outcome units and the variables being held fixed.

Worked example: Suppose fitted annual cost is 100 + 20 × vehicle age in years + 50 × urban indicator, in currency units. At age five, rural fitted cost is 100 + 100 = 200, while urban fitted cost is 250. The conditional urban difference is 50. If observed urban and rural averages differ by 90, different age distributions could explain part of that raw difference.

Watch the distinction: A group coefficient is not necessarily the difference between the groups’ overall sample averages. It compares fitted outcomes at equal values of the model’s other predictors.

13. Coefficient uncertainty

A coefficient estimate varies from sample to sample. Its standard error estimates that sampling uncertainty under the fitted model and the chosen error assumptions. To test a zero coefficient, divide the estimate by its standard error; then compare the statistic with an appropriate reference distribution and degrees of freedom. An interval can be formed as estimate plus or minus a critical value times the standard error. If the interval excludes zero, the corresponding two-sided test generally rejects zero at the matching level, subject to the stated assumptions. Statistical evidence about a nonzero conditional association does not tell you whether its magnitude matters operationally. Correlated predictors, dependence, unequal error variance, or model misspecification can alter the reliability of conventional standard errors. Report the predictor’s units so the coefficient and interval have a clear practical meaning.

Worked example: Suppose a mileage coefficient is -4 currency units per stated mileage unit, with standard error 1.5 in the same coefficient units. The zero-coefficient test statistic is -4/1.5 ≈ -2.67. Using a hypothetical critical value of 2, the interval is -4 ± 2(1.5), or [-7, -1]. It excludes zero and indicates a negative conditional association under the model assumptions.

Watch the distinction: An interval excluding zero does not prove mileage causes cost to fall. It describes uncertainty around a fitted conditional coefficient under assumptions that may be challenged.

14. The overall regression test

The overall F test compares a regression containing several predictors with an intercept-only model. Its null hypothesis sets all nonintercept slopes to zero together. The numerator measures the reduction in residual sum of squares per added predictor; the denominator measures remaining residual variation per residual degree of freedom in the larger model. A large ratio means the predictors jointly explain substantially more sample variation than expected under the null model’s error assumptions. This is a joint test: one strong predictor can drive rejection even when another adds little after adjustment. The test also does not establish causal relationships or good performance on future observations. Use the correct degrees of freedom, with p numerator degrees for p added slopes and n - p - 1 denominator degrees when an intercept is included.

Worked example: Suppose 20 observations give residual sum of squares 120 for an intercept-only fit and 60 for a fit with two predictors. The added degrees of freedom are 2, and the larger model has 20 - 2 - 1 = 17 residual degrees. F = ((120 - 60)/2)/(60/17) = 30/(60/17) = 8.5. This measures joint improvement, not separate significance for both slopes.

Watch the distinction: A significant overall F test does not mean every predictor is significant on its own. Individual coefficients can be uncertain even when the model improves fit jointly.

15. Mean versus individual intervals

At a specified predictor profile, a confidence interval for the conditional mean addresses uncertainty in the average outcome predicted by the fitted model. A prediction interval addresses one future outcome at that profile. It combines uncertainty in the fitted mean with the variation of individual outcomes around that mean, so it is ordinarily wider at the same stated coverage level. Both intervals depend on assumptions about the model and error behavior; predictions far from the observed predictor range may be especially uncertain. Neither interval says that a fixed proportion of already observed policies must lie inside it. Before interpreting one, identify the target: an average for a risk class or a single future policy. In claim-cost work, the latter can be much more variable because individual losses fluctuate even when their conditional mean is well estimated.

Worked example: For a hypothetical risk profile, fitted annual cost is 500 currency units. A supplied 95% confidence interval for mean cost is [470, 530], with width 60. A supplied 95% prediction interval for one future policy is [300, 700], with width 400. The additional 340 currency units of width reflects individual-outcome variation as well as uncertainty in the mean.

Watch the distinction: Do not use the mean-response interval to describe a single policy’s likely cost. It omits the policy-level variation included in a prediction interval.

16. Reference categories

A categorical predictor with three levels can be represented by two indicator variables when the regression also has an intercept. Choose one level as the reference; both indicators equal zero there. Each indicator coefficient is the fitted difference between its level and the reference, holding other model predictors fixed. To compare two nonreference levels, subtract their coefficients. The intercept gives the fitted reference-group outcome when any other numeric predictors equal zero, which may or may not be a useful profile. Changing the reference category changes the intercept and displayed coefficients, but it does not change fitted values for the observed categories. Including indicators for all three levels plus an intercept creates an exact linear dependency, so the individual coefficients cannot be uniquely estimated without another constraint.

Worked example: Let rural be the reference and fitted annual cost, in currency units, equal 300 + 40 × suburban indicator + 90 × urban indicator. Rural has indicators (0, 0), giving 300; suburban has (1, 0), giving 340; urban has (0, 1), giving 390. Urban exceeds suburban by 90 - 40 = 50. The coefficient 90 compares urban with rural.

Watch the distinction: The urban coefficient is not the urban-versus-suburban difference. Both indicators use rural as their reference, so subtract 40 from 90 to make that comparison.

17. Interactions and curvature

An interaction lets one predictor’s slope depend on another predictor. In a model with x, a binary indicator z, and their product xz, the slope for x is its main coefficient when z = 0 and the sum of its main and interaction coefficients when z = 1. The indicator’s fitted difference also changes with x. A polynomial term, such as x squared, gives the mean curve a changing slope even without a second predictor; the marginal slope of β₁x + β₂x² is β₁ + 2β₂x. Interpret changes over a stated interval rather than assuming one fixed effect everywhere. Centering x can make the indicator coefficient refer to a useful x value and reduce numerical difficulty, while leaving fitted values unchanged when terms are handled consistently. Check whether the extra flexibility improves validation performance and makes sense over the observed range.

Worked example: Suppose fitted cost is 100 + 10x + 20z + 5xz currency units. For z = 0, increasing x by one adds 10; for z = 1, it adds 10 + 5 = 15. Separately, a curved fit of 100 + 10x + 2x² gives 112 at x = 1 and 128 at x = 2. That second unit adds 16, compared with 12 from zero to one.

Watch the distinction: Do not interpret the x coefficient as the slope for every group when xz is present. It is the slope at z = 0; the other group adds the interaction coefficient.

18. Transforming variables

Transformations change the scale on which a model is linear and therefore change coefficient interpretation. Replacing x with log x makes a one-unit change in log x, rather than a one-unit change in x, the direct comparison. Modeling log of a conditional mean with a log link makes a coefficient’s exponential a multiplier on that mean. Fitting ordinary least squares to the logarithm of individual outcomes is different: the fitted value describes mean log outcome, and its exponential generally does not equal mean outcome on the original scale. The gap arises from variation around the fitted log value; a suitable retransformation adjustment may be needed for mean prediction. Transformations can help represent curvature or changing spread, but verify predictions after returning to the decision’s units. Related actuarial modeling interpretation appears in the ATPA study guide.

Worked example: Suppose a hypothetical log-link mean model has log(mean annual cost) = 5 + 0.04 × vehicle age in years. At age five, fitted mean cost is exp(5.2) ≈ 181.27 currency units. At age six it is exp(5.24) ≈ 188.67. Their ratio is exp(0.04) ≈ 1.041, so one extra year multiplies fitted mean cost by about 1.041, or raises it about 4.1%.

Watch the distinction: Exponentiating a fitted ordinary least-squares value for log observed cost does not generally recover mean cost. Variation on the log scale creates a retransformation gap.

Regression diagnostics, model selection, and regularization

19. Residual curvature

A residual is observed outcome minus fitted outcome. If a straight-line mean function is adequate, residuals plotted against a predictor or fitted value should not show a persistent curve. A U-shaped pattern, with positive residuals at low and high predictor values and negative residuals in the middle, suggests the line underpredicts at the ends and overpredicts centrally. Check that the pattern is not driven by a few influential cases or by changing data composition across the predictor range. A polynomial, spline, or suitable transformation may represent the mean more accurately, but added terms must be assessed on held-out data. Residual curvature concerns the shape of the conditional mean; it differs from a funnel-shaped spread, which concerns changing error variance. Plotting binned averages can reveal a pattern hidden by noisy individual residuals.

Worked example: Suppose mean residuals across low, middle, and high mileage bands are +20, -40, and +25 currency units. Because residual equals actual minus fitted, positive values mean underprediction and the negative value means overprediction. The sign sequence forms a U shape. A curved mileage term is a plausible candidate, but compare its held-out cost error with the straight-line model before adopting it.

Watch the distinction: A curved residual pattern is not evidence that all predictions are poor. It identifies systematic bias across predictor values, which may coexist with a low overall average error.

20. Unequal residual spread

Heteroskedasticity means conditional error variance changes across predictor values or fitted means. A residual-versus-fitted plot may widen like a funnel, and spread can be compared across sensible risk groups. Ordinary least-squares coefficients can still describe a useful mean relationship under suitable exogeneity conditions, but conventional constant-variance standard errors may misstate coefficient uncertainty. Prediction intervals based on one common residual spread can be too wide for low-variance profiles and too narrow for high-variance profiles. Possible responses depend on the objective: use standard errors robust to unequal variance for coefficient inference, or model the variance and perhaps transform the response when profile-specific predictions are needed. Investigate whether the widening reflects claim size, omitted groups, or a misspecified mean before choosing a remedy. Robust standard errors alone do not repair biased mean predictions.

Worked example: Suppose hypothetical residual standard deviations are 20 currency units for low fitted costs and 80 for high fitted costs. The high-cost group has four times the standard deviation and 80²/20² = 16 times the variance. This challenges a common-variance assumption. A single-width prediction interval would ignore the difference; assess separate variance behavior and use an uncertainty method suited to the model’s purpose.

Watch the distinction: Unequal spread does not automatically invalidate the fitted mean line. It chiefly challenges constant-variance uncertainty calculations, though a poor mean specification may also contribute to the pattern.

21. Residual dependence and tails

Residuals should be examined in the order observations occurred as well as against fitted values. Long runs of the same sign suggest that neighboring errors move together. Positive serial correlation can make a model appear to contain more independent information than it does, so standard errors and intervals based on independent errors may be too narrow. A plot of residuals over time and their sample autocorrelations can help identify the lag pattern. Tail behavior is a different question: a normal-probability plot with departures at both ends suggests more extreme errors than a normal model expects. That matters especially for tail probabilities and prediction intervals. First check whether omitted trend, seasonality, or changing variance explains the pattern. Then choose a mean model and uncertainty method suited to what remains.

Worked example: Six successive monthly residuals have signs +,+,+,-,-,-. The two runs suggest persistence, although six signs alone cannot establish serial correlation; inspect more months and lagged residual correlations. Separately, a normal-probability plot bends away from its reference line at both ends. That points toward heavy tails. Time-aware modeling addresses the first pattern, while tail-sensitive interval calculations need reassessment for the second.

Watch the distinction: A normal-probability plot does not test whether neighboring months are independent. Heavy tails concern the distribution of error sizes; serial correlation concerns how errors at different times relate.

22. Unusual and influential cases

An outcome outlier has a large residual relative to the fitted model. A high-leverage case has an unusual combination of predictor values, whether or not its residual is large. Influence describes what happens to the fitted result when a case is included or removed. These properties can overlap, but none implies either of the others. In linear regression, leverage depends on the predictor matrix; influence also depends on the residual and the precision of the fitted coefficients. Compare fits with and without a suspect observation, including coefficients and predictions where decisions will be made. Check for data errors before changing the analysis, and retain genuine extreme risks when they represent the population of interest. A deletion comparison diagnoses sensitivity; it does not automatically justify deleting a valid policy.

Worked example: Policy A has ordinary mileage but an observed annual cost $500 above its fitted cost: it is an outcome outlier. Policy B has extreme mileage and a residual of only $2: it has high leverage. Removing B changes the mileage slope from $4 to $7 per mileage unit, a $3 change per unit. B is influential despite fitting its own outcome closely.

Watch the distinction: A small residual does not prove a case is harmless. An extreme predictor value can pull the fitted line toward itself and change coefficients or predictions elsewhere.

23. Correlated predictors

When two predictors carry nearly the same information, the model can have difficulty assigning their shared effect to one coefficient or the other. This is multicollinearity. It inflates uncertainty for individual coefficient estimates and can make their values or even signs change when a predictor is added, removed, or measured differently. The fitted combination may nevertheless predict well where future predictor combinations resemble the training data. Inspect correlations, coefficient standard errors, and sensitivity to nearby model specifications; a variance inflation factor can quantify how much a predictor is explained by the others. Decide whether the task needs separate conditional effects or accurate prediction. Combining related measures, using subject knowledge to choose one, or applying shrinkage may help, but none creates information that the data lack.

Worked example: Vehicle age and mileage correlate at 0.95. With age alone, the mileage slope in a different specification is $6 per unit; including both gives $1, and the mileage standard error doubles. Validation error stays near $100 in the stated error units. The predictors' joint signal still forecasts cost, but a precise separate mileage effect is unsupported by this fit.

Watch the distinction: A high correlation between predictors does not necessarily make all predictions poor. The main immediate problem is unstable interpretation of their separate coefficients, especially when holding one fixed is rare in the data.

24. Search paths for predictors

Predictor search changes which candidate models are examined, so the search path matters. Best-subset selection fits every allowed combination and identifies the best model at each size under the chosen training criterion. It becomes costly as the number of predictors grows. Forward stepwise selection starts with an intercept and adds the predictor giving the best immediate improvement; backward stepwise starts with the full model and removes one at a time. Stepwise methods make local choices and cannot revisit all discarded alternatives. Backward selection also requires a workable full fit. After generating candidates, assess the chosen size using a criterion aligned with the objective, preferably validation error for prediction. Keep preprocessing and variable search inside each validation fold, or the estimated future error will benefit from information it should not have seen.

Worked example: With age, mileage, and region, best-subset selection can inspect 2³ = 8 subsets, including the empty set. Forward selection might add age, then mileage. Backward selection might start with all three and remove region. Both paths then yield {age, mileage}, but another dataset could make the best two-predictor subset {mileage, region}; exhaustive search would inspect it directly.

Watch the distinction: A stepwise path is not an exhaustive search. Its best candidate at a given size can differ from the best subset of that size because earlier local choices constrain later steps.

25. Adjusted R-squared

Ordinary R-squared measures the fraction of sample outcome variation explained by a least-squares model with an intercept. Adding a predictor cannot reduce it on the fitting data, even if that predictor adds little useful information. Adjusted R-squared offsets this tendency by comparing residual variance with total variance after accounting for fitted predictor count. For n observations and p nonintercept predictors, it equals 1 − (1 − R²)(n − 1)/(n − p − 1). It can fall when an extra variable yields too small a reduction in residual sum of squares. Compare models fitted to the same response observations and check that n exceeds p + 1. A higher adjusted value is an in-sample summary with a complexity adjustment; use held-out or cross-validated error when future prediction is the main objective.

Worked example: With n = 20, p = 2, and R² = 0.60, adjusted R² = 1 − 0.40(19/17) ≈ 0.553. Adding a third predictor raises R² to 0.61, but adjusted R² becomes 1 − 0.39(19/16) ≈ 0.537. The extra predictor improves raw fit while worsening this adjusted measure.

Watch the distinction: Adjusted R-squared does not measure test-set accuracy. Its penalty accounts for fitted predictors within the same sample, while validation directly checks predictions on omitted observations.

26. Criteria and predictive error

Choose a model comparison measure by the question it answers. AIC compares likelihood fit with a penalty of two units per estimated parameter; BIC uses a penalty involving log sample size and can favor a smaller model. Within a comparable likelihood framework, lower values are preferred. Neither score is an error measured in claim dollars. Cross-validated RMSE estimates prediction error for the specified validation design and is expressed in the outcome's units. Compare AIC or BIC only for fits to the same response data under compatible likelihood definitions. For forecasting, validation must respect time order. If variable selection or tuning occurs, repeat that work inside each fold. SOA SRM practice questions can help rehearse the decision: identify the objective before ranking scores.

Worked example: Model A has AIC 210, BIC 220, and cross-validated RMSE $12. Model B has AIC 205, BIC 225, and RMSE $11 on the same response and validation design. Lower AIC and RMSE favor B; lower BIC favors A. For the stated goal of predicting new costs, B has the stronger reported predictive result, subject to validation uncertainty.

Watch the distinction: AIC, BIC, and RMSE are not interchangeable scales. A five-point AIC advantage cannot be subtracted from a one-dollar RMSE advantage to form a combined score.

27. Ridge and lasso penalties

Ridge and lasso both fit coefficients while penalizing their size. For squared-error regression, ridge adds λ times the sum of squared slopes; lasso adds λ times the sum of their absolute values. The intercept is ordinarily left unpenalized. As λ grows, both methods shrink slopes, trading some fitting bias for potentially lower prediction variance. Ridge generally leaves nonzero slopes, while lasso's absolute-value penalty can set some exactly to zero, yielding variable selection. Standardize predictors before applying a common penalty so measurement units do not determine who is penalized most; transform coefficients back for interpretation. Choose λ using validation or cross-validation that includes standardization within each training fold. Correlated predictors can produce especially different selections under lasso, so a selected zero should not be mistaken for proof of no underlying association.

Worked example: After standardizing two predictors, unpenalized slopes are 3 and 2 outcome units per standard deviation. At a validation-selected λ, ridge gives 2.4 and 1.3; lasso gives 2.1 and 0. Both shrink the fitted effects, but lasso excludes the second predictor from this fit. Compare their validation errors before choosing a predictive model.

Watch the distinction: A zero lasso coefficient is a result of the fitted penalty and data, not a hypothesis test proving the predictor has no effect. Selection can change with correlated inputs.

Generalized linear models

28. The parts of a GLM

A generalized linear model specifies a response distribution, a conditional mean, and a link connecting that mean to a linear predictor. Write g(μᵢ) = β₀ + β₁xᵢ + ···, where μᵢ is the expected response at the stated predictor values. The link determines which scale has an additive coefficient interpretation. With Poisson counts and a log link, exponentiating the linear predictor produces a positive expected count, while a coefficient's exponential gives a mean ratio. The distribution also supplies a mean-variance relationship used in estimation and diagnostics. Identify the response unit before interpreting output: a claim count per policy period differs from a rate per policy-year. If exposure varies, a log-exposure offset can represent observation time. A useful check is to move through distribution, link, linear predictor, then inverse link to the requested mean.

Worked example: Suppose claim count Y is modeled as Poisson with log(μ) = 0.2 + 0.5x for equal exposure. At x = 0, μ = exp(0.2) ≈ 1.22 claims; at x = 1, μ = exp(0.7) ≈ 2.01 claims. The fitted mean ratio is exp(0.5) ≈ 1.65, not a 0.5-claim difference.

Watch the distinction: The linear predictor is not the expected count when the link is logarithmic. A value of 0.7 on the log scale corresponds to exp(0.7), about 2.01 expected claims.

29. Matching outcome and family

Start with the outcome's support and the quantity the decision needs. An indicator of whether any claim occurred takes values zero or one, so a binomial model with a logit link can estimate its probability. A claim count takes nonnegative integer values; a Poisson model with a log link is one starting point, with exposure handled explicitly when observation periods differ. A positive continuous claim severity needs a continuous distribution; Gamma with a log link is a plausible choice when variance grows with the mean. These are modeling choices, not guarantees of fit. Check residuals, dispersion, excess zeros, and whether the recorded severity can actually equal zero. Frequency and severity answer different questions and may be combined to model aggregate expected loss. The Society of Actuaries is the issuer of the ASA credential.

Worked example: A file records claim occurrence, number of claims, and the amount of each positive claim. Model occurrence with binomial-logit, count with a log-link count model, and positive severity with Gamma-log. Applying Poisson directly to a $2,400 severity treats a continuous monetary amount as an integer event count, so its support and variance assumptions are mismatched.

Watch the distinction: A log link alone does not make two GLMs equivalent. Distribution choice also controls the response support and variance pattern, which must fit the outcome being modeled.

30. From logit to probability

A logistic model adds predictors on the log-odds scale. If η = log[p/(1 − p)], exponentiating gives odds exp(η), and converting odds o to probability gives p = o/(1 + o). Equivalently, p = 1/(1 + exp(−η)). Odds compare the probability of an event with the probability of its complement; they are not percentages. A one-unit increase in a predictor adds its coefficient to η and multiplies the odds by the coefficient's exponential, holding other predictors fixed. To interpret a decision, convert back to probability before comparing with a probability threshold. Predictions remain between zero and one for any finite η. Calibration still matters: an algebraically valid probability is not necessarily reliable for a new group or period.

Worked example: A fitted logit of log(3) gives odds exp[log(3)] = 3 to 1. Thus p = 3/(1 + 3) = 0.75. A logit of zero gives odds 1 to 1 and p = 1/2 = 0.50. If a hypothetical review rule flags probabilities above 0.70, the first case is flagged and the second is not.

Watch the distinction: Odds of 3 do not mean a probability of 3 or 30%. Divide odds by one plus odds to obtain the event probability, here 0.75.

31. Logistic coefficient effects

A logistic coefficient β changes log odds by β for a one-unit predictor increase, so the conditional odds ratio is exp(β). This ratio is constant under the stated additive logit model, but the change in probability depends on where the policy starts. Convert its baseline probability to odds, multiply by exp(β), and convert back. This sequence avoids treating a coefficient as a fixed percentage-point increase. The interpretation holds other predictors fixed and assumes the same fitted relationship applies to the profiles compared. Interactions make the odds ratio depend on other predictor values. For a decision threshold, calculate the resulting probabilities rather than ranking odds ratios alone. The related ASA ATPA study guide offers further predictive modeling context.

Worked example: Let β = log(2), so a one-unit increase doubles odds. From p = 0.20, odds are 0.20/0.80 = 0.25; new odds are 0.50 and new p is 0.50/1.50 ≈ 0.333, an increase of 0.133. From p = 0.50, odds rise from 1 to 2 and p becomes 2/3 ≈ 0.667, an increase of 0.167.

Watch the distinction: An odds ratio of two is not a doubling of probability. Probability has an upper bound of one, so the same odds multiplier produces different probability changes at different baselines.

32. Count-model mean ratios

With a log link, a count model writes log μ = β₀ + β₁x + terms for other predictors. Increasing x by one raises log mean count by β₁ and multiplies mean count by exp(β₁), provided the other inputs and exposure are held fixed. This is a relative effect on the conditional mean, not necessarily a fixed increase in the number of claims. Multiply the baseline mean by the ratio to obtain the second mean, then subtract if an absolute difference is wanted. For an indicator, specify its reference category before interpreting the ratio. Check whether exposure differs, because twice the time at risk can produce twice the expected count without any difference in claim rate. The fitted ratio is a model-based comparison, not proof that changing x would cause claims to change.

Worked example: A log-link model has urban coefficient log(1.5). For equally exposed policies with identical other predictors, rural mean count is 4 claims and urban mean count is 4 × exp[log(1.5)] = 6 claims. The absolute difference is 2 claims at this baseline; the conditional mean ratio is 6/4 = 1.5.

Watch the distinction: The coefficient log(1.5) is not an addition of 1.5 claims. It acts on log mean count, giving a 1.5 multiplier after exponentiation.

33. Exposure as an offset

A count reflects both the underlying event rate and how long or how much a group was exposed. In a log-link count model, write log μᵢ = log Eᵢ + ηᵢ, where Eᵢ is positive exposure and ηᵢ models log events per exposure unit. The log-exposure term is an offset: its coefficient is fixed at one rather than estimated. Taking exponentials gives μᵢ = Eᵢ exp(ηᵢ). This lets predictor coefficients compare rates while fitted means remain expected counts. State the exposure unit, such as policy-years, and use a consistent unit throughout. An offset assumes expected count scales proportionally with exposure under otherwise equal conditions. If that proportionality is implausible, inspect the data and model design. Zero exposure cannot enter through a logarithmic offset.

Worked example: Two otherwise identical groups have 100 and 200 policy-years of exposure. With fitted rate 0.03 claims per policy-year, expected counts are 100 × 0.03 = 3 and 200 × 0.03 = 6 claims. Their rates are equal: 3/100 = 6/200 = 0.03. The count doubles solely because exposure doubles.

Watch the distinction: Six expected claims versus three does not by itself show higher risk. Compare claims per exposure unit; the offset separates amount of exposure from the modeled event rate.

34. Positive severity models

Severity describes the amount of a claim, usually among claims with a positive recorded amount. A Gamma GLM with log link models its positive conditional mean while allowing variance to increase with the mean. If log μ = η, then μ = exp(η), and a coefficient β for a group indicator produces a conditional mean ratio exp(β), holding other inputs fixed. That coefficient says nothing directly about how often claims occur. Expected aggregate loss may involve both frequency and severity, but combining their fitted means requires consistent definitions and attention to dependence or selection. Verify whether zeros, policy limits, deductibles, and censoring change what the recorded amount represents. A good fit to observed positive payments need not describe latent uncapped loss. State the currency and the claim population when interpreting a fitted severity.

Worked example: For positive claims, a Gamma log-link model predicts mean severity $2,000 in a reference group. Another group's coefficient is log(1.25), giving $2,000 × exp[log(1.25)] = $2,500. The modeled difference is $500 per positive claim at that baseline. Nothing in this severity result implies that the second group has 25% more claims.

Watch the distinction: A 25% increase in mean severity is not a 25% increase in claim frequency. The former concerns amount conditional on the modeled claim population; the latter concerns events per exposure.

35. Likelihood and deviance

Likelihood compares how well fitted models account for the observed responses under their specified distributions. For nested GLMs, a deviance reduction measures improvement when the larger model adds terms. Under suitable regularity assumptions, with compatible fits to the same observations and an appropriate treatment of dispersion, the difference can be compared with a chi-square reference using degrees of freedom equal to the added parameter count. A smaller deviance indicates better fit to the training data, but extra parameters usually improve that fit even if they do not improve future predictions. Check residual patterns and validation error as separate evidence. Do not use a simple deviance-difference test when models are nonnested, fitted to different records, or have incompatible likelihood definitions. Statistical evidence for an added term also does not establish a causal effect.

Worked example: A reduced GLM has deviance 120 and an expanded nested GLM has deviance 108 on the same data. The reduction is 120 − 108 = 12 for two added parameters, so the reference degrees of freedom are 2 if the stated likelihood assumptions hold. This is evidence of improved in-sample fit; held-out predictions are still needed to assess predictive gain.

Watch the distinction: Lower deviance does not guarantee lower test error. The expanded model has more flexibility, so judge prediction with data omitted from fitting and tuning.

36. Overdispersion signals

A Poisson model assumes conditional variance equals conditional mean, after accounting for predictors and exposure. Overdispersion means remaining variability exceeds that relationship. It can arise from unmodeled differences among policies, clustering, excess zeros, or dependence, so an overall sample variance larger than the overall mean is a clue rather than a complete diagnosis. Compare variation within comparable predictor and exposure groups, and inspect Pearson or deviance residuals for systematic structure. If dispersion is substantial, Poisson-based standard errors can be too small even when estimated mean effects are useful. Depending on the cause, options include better predictors, a suitable count distribution with extra variation, or an inference method that accounts for clustering. Do not treat a change of family as a substitute for checking exposure or data definition.

Worked example: Among policies with comparable predictors and exposure, suppose the observed mean count is 2 claims and variance is 9 claims squared. The variance-to-mean ratio is 9/2 = 4.5, well above the Poisson conditional ratio of 1. This suggests overdispersion. Recheck comparability and residual patterns before deciding whether a more flexible count model is appropriate.

Watch the distinction: A marginal variance above the marginal mean does not alone refute a conditional Poisson model. Different policy risk levels can inflate pooled variance even if each conditional count follows Poisson assumptions.

Time series models and forecasting

37. Time-series components

A time series is indexed by when observations occur, so ordering carries information. Trend is a sustained change in level; seasonality is a pattern repeating at a known calendar period; serial dependence means nearby values remain related after systematic patterns are accounted for. Irregular variation is what remains unpredictable under the chosen model, although that label must be checked rather than assumed. Plot the series first, then compare months or seasons at similar positions in different years. A rising seasonal series can have both a changing baseline and stable recurring peaks. Diagnose dependence using residual plots and autocorrelation after fitting trend and seasonality; otherwise repeated peaks can be mistaken for short-lag dependence. For forecasting, model only information available by the forecast origin and validate on later periods in sequence.

Worked example: Monthly claim counts rise from about 80 to 100 over two years, and each December is about 20 claims above nearby months. The 20-claim baseline rise suggests trend; repeated December peaks suggest annual seasonality. If adjacent residual months still tend to be high together after accounting for both, that remaining pattern suggests serial dependence.

Watch the distinction: A repeated December spike is not automatically random noise or proof of serial correlation. Its calendar recurrence is seasonal; check residual dependence after modeling the seasonal pattern.

38. Weak stationarity

Weak stationarity asks whether a series has a constant mean, constant finite variance, and covariance between two observations that depends on their separation rather than their calendar dates. These are properties of the data-generating process, not a claim that every observed window has identical sample statistics. A visible trend challenges a stable mean; widening fluctuations challenge stable variance; changing dependence across regimes challenges lag-only covariance. Compare plots and summary statistics across time windows, then consider whether detrending, differencing, or a variance-stabilizing transformation addresses the mechanism. A transformation that stabilizes variance does not automatically remove a changing mean. Conversely, subtracting a fitted trend does not guarantee stable variance or dependence. The ASA PA study guide provides related context for interpreting predictive model behavior.

Worked example: Suppose the first half of a series averages 10 units and the second half averages 20, with similar spread. Its changing mean conflicts with weak stationarity. Another series averages 10 in both halves but has variances 4 and 25 units squared. Its changing variance also conflicts with weak stationarity; examine a suitable variance transformation and the source of the change.

Watch the distinction: Stable mean alone is insufficient for weak stationarity. Variance must also be stable, and covariance at a given lag must be the same across calendar time.

39. Detrending and differencing

A rising series can come from a deterministic time trend or from accumulated random shocks. If yₜ = a + bt + eₜ with stationary errors, subtracting the fitted time path can leave a stationary residual series; a temporary shock does not permanently shift its long-run path. If yₜ = yₜ₋₁ + d + eₜ, the level contains a stochastic trend. First differencing gives Δyₜ = yₜ − yₜ₋₁ = d + eₜ, while each shock remains embedded in later levels. Choose between detrending and differencing by examining persistence, residual behavior, and the forecasting meaning of shocks. Unnecessary differencing can introduce avoidable dependence and discard level information. A deterministic trend fit to a random walk can leave strongly persistent residuals. State the time unit when interpreting drift or trend slope.

Worked example: If yₜ = 5 + 2t + eₜ, subtracting 5 + 2t leaves eₜ; the deterministic slope is 2 units per period. If yₜ = yₜ₋₁ + 2 + eₜ, then Δyₜ = 2 + eₜ. Both series can rise by about 2 units per period, but a shock eₜ permanently shifts the second series' subsequent level.

Watch the distinction: Differencing and detrending are not interchangeable just because both can flatten a plot. The choice reflects whether shocks fade around a fixed path or accumulate in the level.

40. Lagged covariance

Autocovariance γ(k) measures how observations k periods apart vary together after accounting for the mean. Autocorrelation ρ(k) divides γ(k) by γ(0), the variance, producing a unitless value between −1 and 1. Partial autocorrelation at lag k measures the direct linear association between observations k apart after accounting for intervening lags. It helps separate a direct lag-two relation from one transmitted through lag one. For lag two, the standard stationary three-variable relation gives partial autocorrelation [ρ(2) − ρ(1)²]/[1 − ρ(1)²], provided the denominator is positive. A pattern of autocorrelations declining gradually with partial autocorrelations cutting off can inform autoregressive model choice, but short samples make sample plots noisy. Interpret these summaries alongside trend and seasonal checks because nonstationarity can create misleading lag correlations.

Worked example: Suppose γ(0) = 16 units squared and γ(1) = 8 units squared. Then ρ(1) = 8/16 = 0.5. If ρ(2) = 0.25, lag-two partial autocorrelation is (0.25 − 0.5²)/(1 − 0.5²) = 0/0.75 = 0. Lag-two correlation is fully accounted for by lag one in this linear calculation.

Watch the distinction: An autocorrelation of 0.25 at lag two does not imply a direct lag-two effect. Partial autocorrelation removes the linear association carried through intermediate lags.

41. Noise and random walks

White noise consists of innovations with a constant mean, constant variance, and zero covariance across distinct times. If that mean is zero, past observations offer no linear improvement over a zero forecast. A random walk instead adds each new innovation to the previous level. Its best forecast, given the current level and zero-mean future innovations, stays at that level, but each additional forecast step introduces another unknown shock. With independent innovations of variance σ², the h-step forecast error variance is hσ². Thus a flat point forecast does not imply stable uncertainty. For a Society of Actuaries candidate analyzing claim totals, the diagnostic distinction is persistence: a shock to white noise disappears after its period, while a shock to a random walk permanently changes the expected future level. A random walk's level is not weakly stationary.

Worked example: Suppose monthly deviations are white noise with mean zero and variance 4 claims squared. Every future deviation has forecast zero and forecast error variance 4. Now suppose a claim index follows a random walk, currently at 100, with independent zero-mean innovations of variance 4 index-points squared. Its two-month forecast is 100, and its error variance is 4 + 4 = 8 index-points squared.

Watch the distinction: A constant random-walk forecast is sometimes mistaken for a stable series. Its forecast variance grows with the horizon, even though the conditional mean stays at today's level.

42. Autoregressive forecasts

An autoregressive model predicts the next value partly from the current value. For an AR(1) model written as y_t = μ + φ(y_(t−1) − μ) + e_t, the innovation e_t has conditional mean zero. The one-step forecast is μ + φ(y_t − μ); to forecast again, feed that forecast back into the same equation. Consequently, the h-step forecast is μ + φ^h(y_t − μ). When |φ| < 1, deviations decay and μ is the long-run mean. A positive φ gives gradual movement toward μ, while a negative φ produces alternating deviations. If innovation variance is σ², the h-step forecast error variance is σ²(1 + φ² + ... + φ^(2h−2)), assuming independent innovations. Check both the forecast path and its widening uncertainty before interpreting a distant projection.

Worked example: Assume a monthly risk index follows y_t = 10 + 0.5(y_(t−1) − 10) + e_t, with zero-mean innovations. Its latest value is 18. The next forecast is 10 + 0.5(18 − 10) = 14; the following forecast is 10 + 0.5(14 − 10) = 12. Both remain above 10, but each retains only half the preceding deviation.

Watch the distinction: Forecasting two periods ahead by applying 0.5 to the observed value twice ignores the model's mean of 10. Apply the coefficient to each deviation from that mean.

43. Moving-average memory

A moving-average model uses current and earlier innovations, not earlier observed values, as its direct inputs. For MA(1), y_t = μ + e_t + θe_(t−1), a shock e_t influences y_t and y_(t+1), then drops out. Once an innovation estimate is available, the one-step forecast includes θ times that latest estimate. At horizons of two or more steps, all remaining innovations are future, zero-mean unknowns, so forecasts equal μ. This finite shock memory contrasts with a stationary AR(1), where a shock usually leaves a geometrically declining effect over many periods. MA(1) observations can still be correlated at lag one; the absence of direct lagged y terms does not make them white noise. In practice, innovation estimates depend on the fitted model and should be treated as estimates, not directly observed data.

Worked example: Suppose monthly cost is modeled in thousands of dollars as y_t = 5 + e_t + 0.4e_(t−1). The latest estimated innovation is 10 thousand dollars, and future innovations have conditional mean zero. Next month's forecast is 5 + 0.4(10) = 9 thousand dollars. The two-month forecast is 5 thousand dollars because that shock no longer enters the equation.

Watch the distinction: An MA(1) coefficient does not multiply the last observed cost. It multiplies the last innovation, which is the unexpected part of that observation under the fitted model.

44. Forecast validation

Forecast evaluation must recreate the information available when each forecast would have been issued. Fit a model through a chosen date, predict the next period, advance the cutoff, and repeat. This rolling-origin design permits refitting while keeping future outcomes out of earlier forecasts. Calculate an error measure over those genuinely later observations and compare models at the same horizons; one-step and twelve-step errors answer different questions. Inspect forecast errors over time as well as their average size. Persistent runs of positive errors suggest bias, while residual autocorrelation suggests information remains in the series. A small mean error can conceal large offsetting misses. SOA SRM practice questions can reinforce the arithmetic, but the key decision is preserving time order whenever the intended use is forecasting.

Worked example: Fit through month 12 and forecast month 13 at 100 claims. After observing 104, refit through month 13 and forecast month 14 at 110; month 14 yields 102. The absolute errors are |104 − 100| = 4 and |102 − 110| = 8 claims, so MAE is (4 + 8)/2 = 6 claims. Check further errors for repeated direction or lag dependence.

Watch the distinction: Randomly mixing later months into the training set can make a forecast evaluation look strong by giving the model future information. Keep each evaluation outcome after its fitting cutoff.

Decision trees and ensemble methods

45. Regression-tree splits

A regression tree divides predictor space into regions and predicts the mean response in each terminal region. At a candidate split, calculate residual sum of squares, or RSS, within the two proposed child nodes: sum each squared difference between an outcome and its child's mean. Subtract the combined child RSS from the parent RSS. A larger reduction means the split explains more variation in the training responses. Search candidate predictors and cut points, then repeat the procedure within each child if the tree-building rules permit it. This is a local, greedy choice: the best immediate split need not produce the best small tree overall. RSS favors partitions with homogeneous outcomes, but a tiny child can achieve an impressive training fit through chance. Validate tree size separately, especially when predicting volatile actuarial costs.

Worked example: Four policies have hypothetical costs of 2, 4, 10, and 12 thousand dollars, ordered by vehicle age. Their parent mean is 7, giving RSS (2−7)² + (4−7)² + (10−7)² + (12−7)² = 68 squared thousand dollars. A split after policy two creates means 3 and 11. Child RSS is 1 + 1 + 1 + 1 = 4, a reduction of 64.

Watch the distinction: A large RSS reduction is a training-data result, not proof of a reliable split. Small leaves can capture accidental extremes that disappear in later policies.

46. Classification impurity

Classification trees assess how mixed the classes are within a node. With class proportions p and 1−p, classification error is 1−max(p,1−p), Gini impurity is 1−p²−(1−p)², and entropy is −p log₂p−(1−p) log₂(1−p), treating 0 log 0 as zero. All vanish in a pure node. To evaluate a split, weight each child's impurity by its share of observations and compare the sum with the parent's impurity. Gini and entropy respond smoothly to changing class proportions, so they often distinguish candidate splits that classification error treats alike. The choice of impurity governs tree construction; the eventual flagging threshold and the cost of false positives versus false negatives remain separate decision issues. Related classification practice appears in the MAS-I study guide.

Worked example: A hypothetical node contains 8 policies with claims and 2 without. Claim is the majority prediction, so classification error is 2/10 = 0.20. Gini impurity is 1−0.8²−0.2² = 0.32. Entropy is −0.8 log₂(0.8)−0.2 log₂(0.2) ≈ 0.722 bits. A candidate split is useful under a chosen measure only if its observation-weighted child impurity is lower.

Watch the distinction: Choosing the child with the lowest impurity alone can reward a tiny pure node while ignoring a large mixed one. Weight both children by their observation counts.

47. Recursive leaves

Recursive binary splitting applies a yes-or-no predictor rule at each internal node, then repeats within the resulting groups. To predict for a new policy, follow its predictor values from the root until no further split applies. In a regression tree, the terminal prediction is usually the training response mean in that leaf; in a classification tree, it may be a class proportion or the majority class. Every additional split can lower or preserve training loss, since it gives the tree more ways to separate observations. Yet narrow leaves contain fewer examples, so their estimated means or proportions may vary sharply across samples. This is the tree's variance problem. Minimum leaf sizes, maximum depth, and pruning limit that instability. Record the complete path as well as the final leaf when explaining a prediction to a stakeholder.

Worked example: A hypothetical tree first asks whether vehicle age exceeds 5 years. A policy aged 7 takes the yes branch; mileage of 8 thousand miles then enters the at-most-10-thousand leaf. Its training costs are 100, 130, and 160 dollars, so the predicted cost is (100 + 130 + 160)/3 = 130 dollars. A one-policy leaf at 160 dollars would have a less stable estimate.

Watch the distinction: The final split rule alone does not determine a tree prediction. Earlier branches restrict which policies reach that leaf, and the leaf's training outcomes determine its fitted value.

48. Pruning a tree

A fully grown tree often captures details that will not repeat. Cost-complexity pruning compares subtrees using training loss plus a penalty for the number of terminal leaves, commonly written RSS(T) + α|T| for regression trees. Increasing α makes extra leaves more expensive and favors simpler subtrees. The score explains the pruning path, but α should be chosen using validation or cross-validation when prediction is the goal. Evaluate each candidate subtree on observations withheld from its fitting, select the tree size with suitable predictive error, and then assess the chosen procedure on a separate final test set if one is available. A large tree may improve training RSS while worsening future error. Also compare practical interpretability: a slight validation difference may not justify many extra rules when stakeholders need a clear risk explanation.

Worked example: For hypothetical costs measured in dollars, take α = 5 squared dollars per leaf. A four-leaf tree has RSS 40 squared dollars and scores 40 + 5(4) = 60. A two-leaf subtree has RSS 48 and scores 48 + 5(2) = 58. The two-leaf tree wins under this penalty. If its validation error is also lower, pruning supports prediction.

Watch the distinction: Pruning cannot be judged by RSS alone: removing leaves generally raises training RSS. The relevant question is whether simpler predictions improve validation performance enough to justify that increase.

49. Bootstrap aggregation

Bootstrap aggregation, or bagging, fits many versions of an unstable model to bootstrap samples drawn with replacement from the training observations. Some policies appear more than once in a sample and others are omitted. A regression bag averages the trees' predictions; a classification bag commonly aggregates votes or class probabilities. Averaging reduces variance because an unusually high prediction from one tree can be moderated by others. Its benefit depends on the trees' errors not moving perfectly together. Deep trees are often used because their individual high variance gives averaging something to reduce, although their bias and the data's noise remain. Bagging does not automatically fix an unsuitable outcome definition or leakage in predictor construction. Interpret an aggregate prediction as the ensemble's estimate, with individual trees serving as components rather than competing final answers.

Worked example: Three bootstrap-fitted trees predict annual cost of 90, 120, and 150 dollars for the same policy. Their bagged prediction is (90 + 120 + 150)/3 = 120 dollars. Relative to the first tree's 90-dollar prediction, averaging reduces the effect of its particular resampled training set. This simple three-tree illustration does not establish the ensemble's future error; that requires validation.

Watch the distinction: Bootstrap samples are drawn with replacement, so they are not three disjoint partitions. Treating them as partitions misstates both how trees vary and which observations are omitted.

50. Random-forest diversity

A random forest adds predictor subsampling to bagging. Each tree uses a bootstrap sample, and at each proposed split it considers only a random subset of available predictors. If one strong predictor wins nearly every split in ordinary bagging, many trees may look alike and make correlated errors. Temporarily excluding that predictor lets other useful variables shape some trees, increasing diversity. Lower prediction correlation can make averaging more effective, though restricting predictors too severely can weaken individual trees. The number of candidate predictors per split is therefore a tuning choice to assess with out-of-bag or validation error. Predictor subsampling occurs at each split, not just once per tree. For actuarial use, a forest can improve predictive accuracy while making any single path less representative of the full model's decision.

Worked example: Suppose a hypothetical forest has five candidate predictors, including vehicle age, which dominates most ordinary bagged-tree splits. If each forest split considers a random two of the five, age is unavailable whenever it misses that pair. Some trees then split on mileage or region. Their errors may become less correlated, so averaging can outperform bagging, subject to validation.

Watch the distinction: A forest does not permanently assign two predictors to each tree in this design. The random candidate set is drawn again at each split, allowing different signals within one tree.

51. Out-of-bag assessment

Each bootstrap sample omits some training observations. For a particular policy, its out-of-bag prediction uses only trees whose bootstrap samples omitted that policy. This creates a prediction from models that did not fit on that policy's observed response. Aggregate such predictions across policies to estimate error or compare forest settings without setting aside a dedicated validation sample. For regression, average eligible tree predictions before calculating the policy's loss; for classification, aggregate their class predictions or probabilities consistently. Different policies can have different numbers of eligible trees, especially in a small forest. Out-of-bag assessment is useful for tuning, but repeated tuning on the same out-of-bag errors can make the selected error estimate optimistic. A separate final test set provides a cleaner assessment of the entire selected procedure when available.

Worked example: Policy P is absent from bootstrap samples for trees 2, 5, and 8. Those trees predict 100, 120, and 140 dollars of annual cost, so P's out-of-bag prediction is (100 + 120 + 140)/3 = 120 dollars. Its observed cost is 150 dollars. The squared out-of-bag error is (150 − 120)² = 900 squared dollars.

Watch the distinction: Using predictions from every tree for an out-of-bag error lets trees that trained on the policy influence its assessment. Include only trees whose samples omitted that policy.

52. Sequential boosting

Boosting builds an additive predictor sequentially. Each new tree targets what the current ensemble has not captured, with the exact target depending on the loss function. Under squared-error loss, fitting a tree to current residuals is a useful description. The tree's contribution is multiplied by a learning rate before addition, so a small rate makes each update cautious. Shallow trees usually represent simple effects or interactions; deeper trees can capture more complex structure but may fit noise. More iterations can improve training fit, yet validation error may eventually rise. Tune depth, learning rate, and iteration count together using withheld observations, since a smaller learning rate often needs more trees. Unlike bagging, trees are dependent stages: later trees respond to the ensemble formed by earlier ones.

Worked example: For a policy whose observed cost is 130 dollars, a hypothetical boosting model currently predicts 100 dollars, leaving a 30-dollar residual. The next tree predicts a 20-dollar correction at that policy. With learning rate 0.1, add 0.1(20) = 2 dollars, giving a new prediction of 102 dollars. Further trees may reduce error, but validation determines when to stop.

Watch the distinction: Adding the new tree's full 20-dollar output would ignore the specified learning rate. Boosting updates the ensemble by the scaled tree contribution, not its unscaled prediction.

Unsupervised learning: principal components and clustering

53. Principal-component directions

Principal component analysis finds directions through centered predictor data that capture variance. The first component is the unit-length linear combination with the largest sample variance. Each later component maximizes remaining variance while staying orthogonal to earlier components. Orthogonality makes component scores uncorrelated in the analyzed sample, though it does not imply that the original predictors are independent or that components predict an outcome well. Eigenvectors of the sample covariance matrix give the directions; their eigenvalues give component variances. A direction's sign can be reversed without changing the analysis. When two risk characteristics move together, one component often captures their shared movement and another captures their difference. Decide whether to standardize before PCA because the covariance scale determines which variations dominate.

Worked example: Suppose centered, equally scaled predictors x and y rise together. One hypothetical component direction is (x + y)/√2, and its orthogonal partner is (x − y)/√2. If their component variances are 9 and 1 squared standardized units, total variance is 10. The first direction explains 9/10 = 90% of observed predictor variance, mainly representing shared movement.

Watch the distinction: A high-variance component is not automatically a strong risk predictor. PCA orders directions by predictor variation, without using claim outcomes to judge predictive relevance.

54. Loadings and scores

A loading is a weight assigned to an original variable when defining a component direction. A score is the value of that weighted combination for one observation after the same centering and scaling used to fit PCA. For standardized inputs z, a component score is the dot product of z and its loading vector. Large positive or negative scores place observations at opposite ends of the direction; the arbitrary sign of an eigenvector means those labels can reverse together. Compare loading magnitudes only after accounting for variable scale. Scores can reveal patterns or serve as inputs to another model, but the component itself is defined without claim outcomes. The ASA PA study guide provides a related setting for explaining model inputs and results to decision makers.

Worked example: A hypothetical component uses standardized mileage and age loadings of 0.6 and 0.8. A policy is one standard deviation above mean mileage and two above mean age. Its score is 0.6(1) + 0.8(2) = 2.2, a unitless position along that component. The weights describe the direction; the score describes this policy's location on it.

Watch the distinction: The value 0.8 is not the policy's age score or an effect on claims. It is a direction weight; the policy score combines all its standardized predictor values.

55. Variance explained

Each principal component has a variance equal to its covariance-matrix eigenvalue. Add all component variances to obtain total sample variance on the chosen predictor scale, then divide a selected component's variance by that total. For several retained components, add their variances first. This quantifies how much predictor variation a lower-dimensional representation preserves. It is useful for compression, plotting, and reducing redundancy, but variance retention alone does not establish a suitable number of components for predicting claims. A low-variance direction could still contain a meaningful outcome signal, while a high-variance direction could reflect an irrelevant measurement. If PCA feeds a supervised model, fit the centering, scaling, and component directions within each training fold before scoring held-out observations; otherwise, the assessment leaks information from validation data.

Worked example: Suppose three component variances are 6, 3, and 1 standardized-units squared. Total predictor variance is 6 + 3 + 1 = 10. The first component explains 6/10 = 60%; retaining the first two explains (6 + 3)/10 = 90%. This establishes 90% retention of sample predictor variance, not 90% of explainable claim variation.

Watch the distinction: The percentage of predictor variance explained is not a regression R-squared for claims. It contains no claim outcome information and cannot alone validate a predictive model.

56. Centering and scaling

Centering subtracts each variable's training mean, placing its origin at zero. Scaling often divides by its training standard deviation, making a one-unit change represent one standard deviation. PCA based on unscaled covariance favors variables with larger numerical variance, while Euclidean distance in clustering gives variables with larger numeric differences more influence. Standardization can prevent units such as dollars from overwhelming years, but it also assigns similar initial weight to variables whose business relevance may differ. Choose scaling to reflect the intended similarity notion, not as an automatic ritual. Fit means and standard deviations on training data and apply those same values to later observations. For distance-based methods, check outliers and skew as well: standard deviation scaling does not remove the influence of an extreme monetary observation.

Worked example: Suppose ages span 20 to 80 years and annual costs span 0 to 100,000 dollars. Two policies differ by 10 years and 10,000 dollars. Their unscaled squared Euclidean distance includes 10² + 10,000² = 100,000,100 in mixed numeric units, almost entirely from cost. If training standard deviations are 10 years and 10,000 dollars, the standardized differences are 1 and 1, giving squared distance 2.

Watch the distinction: Centering alone does not equalize variable influence. It changes each variable's origin but leaves its spread and numerical units intact, so large-scale variables can still dominate.

57. A k-means update

K-means alternates two operations for a chosen number of clusters. First, assign each observation to the nearest current centroid under the selected distance, usually squared Euclidean distance. Second, replace each centroid with the mean of observations assigned to it. Each completed assignment or update cannot increase the within-cluster sum of squares when its counterpart is held fixed, so the algorithm settles at a local solution. It need not find the best possible clustering, and different starting centroids can lead to different results. The mean update is why ordinary k-means is sensitive to extreme observations. In several dimensions, compute distances using the full predictor vector, after deciding how the variables should be scaled. Interpret a centroid as a representative average profile, not as an observed policy or a claim-risk category.

Worked example: Take one-dimensional observations 1, 2, 8, and 10, with starting centroids 1 and 8. The nearest-centroid assignments are {1, 2} and {8, 10}: for example, 2 is distance 1 from 1 and 6 from 8. Update the means to (1 + 2)/2 = 1.5 and (8 + 10)/2 = 9. Reassignment then leaves both groups unchanged.

Watch the distinction: The starting centroid 1 does not remain the first cluster's center after assignment. K-means recomputes each center from its assigned observations before the next assignment step.

58. Within-cluster variation

Within-cluster sum of squares, or WCSS, adds squared distances from each observation to its assigned centroid. K-means seeks a small WCSS for a specified number of clusters, so the measure describes compactness under the chosen scale and distance. Increasing the cluster count cannot worsen the best attainable WCSS because more centroids can reproduce an existing solution or divide a group. At one cluster per distinct observation, WCSS becomes zero, making raw improvement an inadequate reason to keep adding clusters. Examine how much WCSS falls, whether assignments are stable across starts or resamples, and whether the groups have a useful interpretation. If claim outcomes were excluded from fitting, differences in later claim experience can describe the clusters, but they do not retroactively make the clustering supervised.

Worked example: For hypothetical one-dimensional profiles, let clusters be {1, 2} and {8, 10}. Their centroids are 1.5 and 9. The first cluster contributes (1−1.5)² + (2−1.5)² = 0.5; the second contributes (8−9)² + (10−9)² = 2. WCSS is 2.5 squared profile units. Four singleton clusters would give zero, but would provide no grouping.

Watch the distinction: A lower WCSS after increasing k does not by itself mean better clusters. Extra centers mechanically improve or preserve this fitting measure, even when the groups become unhelpful.

59. Hierarchical linkage

Agglomerative hierarchical clustering begins with each observation as its own cluster and repeatedly merges the closest pair of clusters. A dissimilarity measure defines distances between observations; a linkage rule defines distances between clusters. Single linkage uses the nearest cross-cluster pair and can form chains. Complete linkage uses the farthest pair and tends to favor compact groups. Average linkage uses an average of cross-cluster distances. A dendrogram records merge heights, and a horizontal cut determines the resulting groups. Those heights reflect the chosen distance and linkage, so they are not probabilities or evidence of a natural number of risk classes. Scaling matters before calculating distances. Unlike k-means, a completed agglomerative merge is not revisited, which makes early linkage decisions consequential.

Worked example: For points 1, 2, and 8 on a line, the closest initial pair is 1 and 2, merged at distance 1. From {1, 2} to {8}, single linkage gives min(|1−8|, |2−8|) = min(7, 6) = 6. Complete linkage gives max(7, 6) = 7. A cut above height 1 but below 6 yields {1, 2} and {8} under either rule.

Watch the distinction: A dendrogram cut is a distance threshold on the displayed merge heights, not a claim-probability threshold. Changing the linkage rule can change those heights and group membership.

60. Judging cluster stability

An unsupervised partition can look tidy yet depend heavily on arbitrary choices. Assess k-means across several initial centroids, since its algorithm may stop at different local solutions. Repeat the analysis after defensible scaling choices, inspect whether an outlier pulls a centroid, and compare plausible cluster counts. For the same data, scale, and k, lower WCSS means a better fit to the k-means objective; it says nothing by itself about stability or business usefulness. Comparing raw WCSS across different k is especially misleading because it tends to fall as k rises. To judge stability, compare whether similar observations remain together under new starts or modest data perturbations. Finally, describe each cluster through its predictor profile and any separately observed outcomes, while avoiding unsupported claims that the groups are intrinsic risk types.

Worked example: Two hypothetical k-means runs use the same standardized data and k = 3. Their WCSS values are 40 and 52 squared standardized units, so 40 fits that objective better. An extreme cost value may still determine one centroid. Repeat starts, inspect memberships with and without that value, and compare k = 2 or 4 for stable, interpretable groups; raw WCSS alone cannot settle the choice.

Watch the distinction: Selecting the smallest WCSS across every tested k will favor ever more clusters. Compare solutions using stability and purpose as well as fit, with consistent scaling and data.

Official references and further reading

  1. Society of Actuaries home page
All study guides