Tutorials › Regression Analysis (Undergraduate) › AIC and Expected Predictive Information Loss

Information Criteria and Model Comparison · Tutorial 622 of 991

AIC and Expected Predictive Information Loss

Learn to calculate and interpret AIC, understand the predictive information loss it approximates, and recognize when comparisons are meaningful.

Advanced 11 min read

What You'll Learn

  • Define Akaike’s Information Criterion and identify the quantities in its formula.
  • Explain how AIC connects model fit with expected out-of-sample information loss.
  • Calculate and compare AIC values for candidate models fitted to the same data.
  • Interpret AIC differences without treating them as probabilities or hypothesis tests.
  • Identify the assumptions and comparison conditions needed for AIC to be useful.

Why Compare Models by More Than Fit?

A more flexible regression model can often fit the observed data at least as well as a simpler one. That improved fit does not guarantee better predictions for new observations: extra flexibility can capture chance features of the sample. Model comparison therefore needs to balance how well a model fits with the optimism created by estimating its parameters from the same data.

Akaike’s Information Criterion, usually abbreviated AIC, is one way to make this comparison. It starts with the maximized likelihood, which measures fit, and adds a penalty for the number of estimated parameters. Its purpose is not to identify a model that is certainly true. Under suitable conditions, it estimates which candidate model has the smaller expected out-of-sample information loss.

Likelihood and Information Loss

Suppose a candidate model \(M\) assigns a probability density or probability mass function \(f(y\mid x;\theta)\) to a response \(Y\) given predictors \(x\). The parameter vector \(\theta\) contains the model’s unknown parameters. For observed data, the likelihood is the probability model viewed as a function of \(\theta\), with the observed responses held fixed. Its maximized log-likelihood is written \(\hat{\ell}\). Larger values of \(\hat{\ell}\) indicate better fit to those observations, when the models use the same likelihood basis.

To describe predictive information loss, imagine that the actual distribution of responses given predictors is \(g(y\mid x)\). If a candidate model assigns very low probability to outcomes that occur under \(g\), it incurs a large log loss. The Kullback–Leibler divergence from \(g\) to a candidate distribution \(f\), for a fixed predictor value \(x\), is

$$ D_{\mathrm{KL}}(g\|f) = \operatorname{E}_{Y\sim g(\cdot\mid x)} \left[ \log\frac{g(Y\mid x)}{f(Y\mid x)} \right]. $$

This quantity is nonnegative and is zero only when the two distributions agree, subject to the usual conditions for defining the divergence. In model comparison, the candidate parameters are estimated from a training sample, and the fitted model is judged by its expected log loss on new observations. The expectation therefore concerns both the new response and the variation in the training sample that produced the fitted parameters.

Definition: For a candidate model \(M\), let \(\hat{\ell}\) be its maximized log-likelihood and let \(k\) be the number of free parameters estimated by that likelihood. Akaike’s Information Criterion is $$ \mathrm{AIC}=-2\hat{\ell}+2k. $$ For a set of comparable candidate models, a smaller AIC indicates a smaller estimated expected out-of-sample information loss, on the criterion’s scale.

The first term rewards fit: a larger maximized log-likelihood makes \(-2\hat{\ell}\) smaller. The second term penalizes complexity: estimating more parameters increases \(2k\). The penalty is not an arbitrary preference for simple models. It is intended to correct, approximately, for the fact that a fitted model tends to look better on the data used to estimate it than it will on new data.

AIC is an estimate of relative predictive information loss. The true distribution \(g\) is not known, and the criterion generally omits a term shared by all candidate models that depends on \(g\). Thus, an AIC value by itself is not an absolute measure of predictive quality. Its useful information comes from comparing values calculated on a suitable common basis.

Calculating and Comparing AIC

The following examples use hypothetical data and likelihood summaries. In each valid comparison, candidate models are fitted to the same response observations using comparable likelihoods. The reported parameter count \(k\) includes every free parameter estimated as part of that likelihood, not just the regression coefficients.

Worked Example: A Better Fit With a Slightly Lower AIC

Suppose two candidate regression models are fitted to the same hypothetical data from 80 clinics. Model A has maximized log-likelihood \(\hat{\ell}_A=-112.4\) and \(k_A=3\) estimated parameters. Model B has \(\hat{\ell}_B=-109.8\) and \(k_B=5\). Calculate and compare their AIC values.

For Model A,

$$ \mathrm{AIC}_A=-2(-112.4)+2(3)=224.8+6=230.8. $$

For Model B,

$$ \mathrm{AIC}_B=-2(-109.8)+2(5)=219.6+10=229.6. $$

Model B fits the observed data better because its maximized log-likelihood is larger. It also has two more estimated parameters, which adds 4 AIC units to its penalty relative to Model A. Its fit term improves by 5.2 units, so the net AIC is \(230.8-229.6=1.2\) units lower. Among these two candidates, Model B has the lower estimated information loss, but a difference of 1.2 does not establish that it is the true model or guarantee better performance on every future sample.

The arithmetic also shows a useful general comparison formula. For candidate models \(M_1\) and \(M_2\), subtract the first AIC from the second:

$$ \begin{aligned} \mathrm{AIC}_2-\mathrm{AIC}_1 &=(-2\hat{\ell}_2+2k_2)-(-2\hat{\ell}_1+2k_1)\\ &=-2(\hat{\ell}_2-\hat{\ell}_1)+2(k_2-k_1). \end{aligned} $$

The first difference records the change in fit, and the second records the change in the complexity penalty. If model 2 has \(q\) more parameters, its AIC is lower only when its log-likelihood improvement exceeds \(q\): the condition is \(\hat{\ell}_2-\hat{\ell}_1>q\). This is an algebraic consequence of the AIC formula, not a significance test.

Worked Example: When the Fit Improvement Does Not Offset the Penalty

In another hypothetical comparison using the same 60 response observations and likelihood basis, Model C has \(\hat{\ell}_C=-50.0\) and \(k_C=4\). Model D has \(\hat{\ell}_D=-48.9\) and \(k_D=6\). Model D fits better, but calculate whether its AIC is lower.

The two criteria are

$$ \begin{aligned} \mathrm{AIC}_C&=-2(-50.0)+2(4)=100.0+8=108.0,\\ \mathrm{AIC}_D&=-2(-48.9)+2(6)=97.8+12=109.8. \end{aligned} $$

Model D’s log-likelihood improves by \(-48.9-(-50.0)=1.1\), but it adds two parameters. The required improvement to offset those parameters is greater than 2 log-likelihood units. Since \(1.1<2\), its fit gain does not cover the penalty, and its AIC is 1.8 units higher. Model C has the lower AIC in this comparison.

What AIC Does and Does Not Say

AIC ranks a specified set of candidate models by estimated predictive information loss. A lower value is preferred by this criterion; it is not a proof that the model is correct. AIC does not report the probability that a model is true, the probability that its predictions will be accurate, or the probability that a particular coefficient is nonzero. It is also not a hypothesis test: it does not supply an \(H_0\), an \(H_a\), or a p-value.

AIC values are relative, so the numerical size of a single value has no universal interpretation. For instance, an AIC of 230 does not mean that a model is twice as informative as one with AIC 460. What matters is the difference among candidates assessed on the same basis. Even then, a smaller value is a ranking, not a promise about realized prediction error in a particular future sample.

Worked Example: Interpreting a Three-Model Ranking

Three hypothetical models are fitted to the same 100 response observations, with comparable likelihoods and the same intended prediction task. Their reported summaries are:

ModelMaximized log-likelihoodEstimated parameters \(k\)
E-74.24
F-72.76
G-76.03

Calculate each value:

$$ \begin{aligned} \mathrm{AIC}_E&=-2(-74.2)+2(4)=148.4+8=156.4,\\ \mathrm{AIC}_F&=-2(-72.7)+2(6)=145.4+12=157.4,\\ \mathrm{AIC}_G&=-2(-76.0)+2(3)=152.0+6=158.0. \end{aligned} $$

Model E ranks first because it has the smallest AIC, 156.4. Model F has the largest maximized log-likelihood, but its additional parameters lead to an AIC 1.0 unit higher than E’s. Model G is 1.6 units above E. These differences summarize the ranking within this candidate set; they are not percentages, probabilities, or p-values. A substantive choice may also consider whether each model is scientifically sensible and whether its predictors will be available when predictions are made.

Conditions for a Useful Comparison

The interpretation of AIC depends on the comparison being well formed and on the approximation behind the criterion being reasonable. In particular:

  • Use a common data basis. Candidate models should ordinarily be fitted to the same response observations with comparable likelihoods. A change in the data or likelihood constants can make raw AIC values incomparable.
  • Compare models aimed at the same prediction task. The response and intended target of prediction should match. A numerical ranking cannot make a scientifically irrelevant candidate useful.
  • Use a defensible likelihood model. The likelihood must represent the assumed distribution of the observations appropriately. AIC cannot correct a misspecified response distribution or an invalid dependence assumption.
  • Count the parameters estimated by the likelihood. The penalty uses \(k\), the number of free parameters, including nuisance parameters estimated as part of the model. It is not automatically equal to the number of named predictors.
  • Recognize the approximation’s setting. The usual AIC justification relies on regularity conditions for likelihood estimation, such as identifiable, interior parameters and suitable large-sample behavior. Its estimate is not an exact finite-sample guarantee.

AIC can still rank candidates when none is exactly the true data-generating model. In that setting, the goal is to select the candidate with the least estimated information loss among those considered, not to certify any candidate as correct. The ranking is conditional on the candidate set: an omitted model might have lower expected loss.

Why the Penalty Matters

The maximized log-likelihood is measured on the training observations. Since the model parameters were chosen to fit those observations, its in-sample fit is optimistically favorable. More flexible candidates can exploit random variation as well as genuine structure. The complexity term \(2k\) adjusts the fit score to estimate expected performance on new observations.

This explains why simply choosing the largest maximized log-likelihood is not the same as minimizing expected predictive information loss. It also explains the tradeoff in AIC: a more complex model can be preferred, but only when its improvement in fit is large enough to compensate for the penalty. The precise form and derivation of that penalty require additional likelihood theory; for using AIC here, its role is to provide an approximate optimism correction.

Common Mistakes

  • Choosing the largest log-likelihood alone. That rewards fit but ignores the parameters used to achieve it. Compare AIC values, which combine fit and a complexity penalty.
  • Treating a low AIC as proof. AIC estimates relative predictive information loss within the candidates; it does not show that a model is true or that its assumptions hold.
  • Interpreting an AIC difference as a probability. A difference of 2 units does not mean a 2% chance, nor does it give the probability that either model is correct.
  • Comparing values from incompatible analyses. If models use different observations or noncomparable likelihoods, a difference in AIC may reflect the changed basis rather than the models’ relative predictive performance.
Key takeaway: AIC combines lack of fit, measured by \(-2\hat{\ell}\), with a parameter penalty, \(2k\). For appropriately comparable models, smaller AIC indicates smaller estimated expected out-of-sample information loss. It is a relative selection criterion, not a probability, hypothesis test, or guarantee of predictive success.

Check Your Understanding

Answer each question using the definition and comparison principles above.

  1. A candidate model has maximized log-likelihood \(-36.5\) and \(k=3\). Calculate its AIC.
  2. Two models have the same maximized log-likelihood, but one estimates more parameters. Which has the smaller AIC, and why?
  3. Model 2 adds two parameters to Model 1. How large must its log-likelihood improvement be for Model 2 to have a lower AIC?
  4. What does a lower AIC estimate, and why is it not the probability that a model is true?
  5. Why can raw AIC values be misleading when candidate models are fitted to different response observations?