Introduction: Finding the "Best" Model

In previous chapters, we looked at the building blocks of Generalised Linear Models (GLMs): the exponential family, link functions, and linear predictors. Now, we reach the "decision-making" part of the process. How do we actually calculate the parameters for our model? And once we have a model, how do we know if it’s actually any good, or if a different model would be better?

Think of this chapter as the quality control phase of actuarial modelling. We will learn how to estimate the "best" values for our parameters and use a powerful tool called Deviance to compare different models. Don't worry if the math looks heavy at first; we will break it down into logical steps that even the most math-shy student can follow.


1. Estimating Parameters: Maximum Likelihood

In simple linear regression, we often use "Least Squares" to find the best-fitting line. In GLMs, we use a more general method called Maximum Likelihood Estimation (MLE).

The Core Idea

The goal of MLE is to find the parameter values (the \(\beta\) coefficients in our linear predictor) that make the data we actually observed the most likely to have happened.

Imagine you are looking at a bucket of red and blue balls. If you pull out 10 balls and 9 are red, your "maximum likelihood estimate" for the proportion of red balls is 0.9. In GLMs, we do the same thing, just with more complex formulas and distributions (like Poisson or Gamma).

How it's done:

  1. We write down the Likelihood Function, \(L\), which represents the joint probability of our data given the parameters.
  2. Because the math is easier, we take the natural log to get the Log-likelihood, \(\ell = \ln(L)\).
  3. We find the values of \(\beta\) that maximize \(\ell\). In practice, this is done by computer software (like R) using an iterative process because there usually isn't a simple "one-step" formula.

Quick Review: You don't usually need to perform these iterations by hand in the exam, but you must understand that the parameters \(\beta\) are chosen to maximize the log-likelihood of the observed data.


2. Understanding Deviance: The "Badness of Fit"

In standard regression, we talk about the "Residual Sum of Squares" to see how far our model is from the data. In GLMs, we use Deviance.

Important Concept: Deviance is a measure of distance. Specifically, it measures the distance between our fitted model and a "perfect" model.

The Saturated Model vs. Our Model

To understand deviance, we compare two models:

  • The Saturated Model (\(S\)): A theoretical model that fits the data perfectly. It has as many parameters as there are data points. It explains 100% of the variation but is useless for prediction because it just "memorizes" the noise.
  • The Fitted Model (\(M\)): The model we are actually testing, which uses fewer parameters to try and capture the underlying trend.

The Formulas

The Deviance (\(D\)) is defined as:

\(D = 2(\ell(S) - \ell(M))\)

Where:

  • \(\ell(S)\) is the log-likelihood of the Saturated Model.
  • \(\ell(M)\) is the log-likelihood of our Fitted Model.

Scaled Deviance (\(D^*\)): Sometimes we need to account for the "scale parameter" (\(\phi\)) of the distribution (like the variance in a Normal distribution). The formula is:

\(D^* = \frac{D}{\phi}\)

Key Takeaway: Because we want our model to be as close to "perfect" as possible, a lower deviance indicates a better fit.


3. Model Selection: Analysis of Deviance

Actuaries often have to choose between a simple model (few variables) and a complex model (many variables). We use a process called Analysis of Deviance to decide if the extra complexity is worth it.

Nested Models

This method works when models are nested. This means Model 1 is a simpler version of Model 2 (e.g., Model 2 has all the variables of Model 1, plus one extra).

The Likelihood Ratio Test (LRT)

To see if the extra variables in Model 2 are actually helpful, we calculate the difference in their deviances:

\(\text{Test Statistic} = D_1 - D_2\)

(Or \(D_1^* - D_2^*\) if using scaled deviance)

The Rule: If the models are a good fit, this difference approximately follows a Chi-square (\(\chi^2\)) distribution.
\(\text{Degrees of Freedom (df)} = \text{number of extra parameters in Model 2}\)

Step-by-Step Decision:

  1. Calculate the reduction in deviance: \(D_1 - D_2\).
  2. Check the \(\chi^2\) tables using the difference in the number of parameters as your \(df\).
  3. If the reduction is larger than the critical value (or if the p-value is small, typically \(< 0.05\)), then the extra variables are statistically significant. Keep the complex model!
  4. If the reduction is small, the extra variables aren't adding much value. Stick with the simpler model (Parsimony).

Analogy: Imagine adding a fancy spoiler to a car. If the car doesn't go any faster (reduction in deviance is small), the spoiler is just extra weight. Keep the car simple!


4. Testing Parameter Significance

Even before comparing two big models, we often want to look at individual parameters. When you look at software output (like in Paper B), you will see a p-value for each coefficient (\(\beta\)).

  • Null Hypothesis (\(H_0\)): The parameter \(\beta_i = 0\) (meaning the variable has no effect).
  • Alternative Hypothesis (\(H_1\)): The parameter \(\beta_i \neq 0\).

If the p-value is very small (usually \(p < 0.05\)), we reject \(H_0\). This tells us that the variable is a significant predictor and should stay in the model.


5. Practical Interpretation (Paper B Focus)

In the exam, you might be given a table of results for a GLM fitting a "Number of Claims" (Poisson) or "Claim Size" (Gamma). Here is what to look for:

1. Null Deviance: The deviance of a model with no explanatory variables (only an intercept). This is your starting point.

2. Residual Deviance: The deviance of your model after adding variables. You want this to be significantly lower than the Null Deviance.

3. AIC (Akaike Information Criterion): You might see this in software output. It's like deviance but it "penalizes" you for adding too many variables. Lower AIC is better.

Did you know? The term "Parsimony" is used frequently in actuarial science. It comes from the principle of "Occam's Razor" — if two models explain the data equally well, the simpler one is usually the better choice for the future.


Quick Review Box

Maximum Likelihood: The method used to find the best \(\beta\) values.

Deviance: Measures "badness of fit." Lower = Better fit.

Saturated Model: The "perfect" but overfitted model used as a benchmark.

Likelihood Ratio Test: Use \(D_1 - D_2 \sim \chi^2_k\) to compare nested models.

Significant Variables: Look for small p-values (\(< 0.05\)) to justify keeping a variable.

Don't worry if this seems tricky at first! The key is remembering that we are always trying to find a balance between a model that fits well (low deviance) and a model that is simple (few parameters).