Two Different Questions About Model Fit
A goodness-of-fit test and an information criterion can be applied to the same candidate severity models, but they answer different questions. A goodness-of-fit test asks whether the observed data provide sufficient evidence against a specified null model at a chosen significance level. AIC and BIC compare candidate models by balancing fit against model complexity; they identify a relative ranking, not a null-hypothesis conclusion.
This distinction matters in actuarial work. A model may not be rejected by a test but still rank behind another model under AIC or BIC. Conversely, a criterion may rank one model first even though a goodness-of-fit test indicates that its fit is inadequate for the intended use. The methods are complementary, not interchangeable.
The Three Goodness-of-Fit Tests
Let \(X_1,\ldots,X_n\) be independent observations from a continuous null distribution with cumulative distribution function \(F_0\). If the null distribution is fully specified, the probability integral transform gives \(U_j=F_0(X_j)\), which is uniform on \((0,1)\) under the null. The tests below measure different features of departure from that null.
The Kolmogorov–Smirnov statistic measures the single largest discrepancy, whereas Anderson–Darling accumulates discrepancies with extra weight in the tails. The chi-square test instead compares counts in chosen categories. Consequently, bin choice affects the chi-square statistic, while the KS and AD statistics use the ordered observations. In all three cases, the statistic alone is not a complete test conclusion: a critical value or p-value from the correct null distribution is needed.
Why the Statistics Measure Departures
For the KS statistic, the empirical distribution function just before \(X_{(i)}\) has value \((i-1)/n\), and just after it has value \(i/n\). At the observation itself, the null distribution function is \(F_0(X_{(i)})=U_{(i)}\). The discrepancies on the two sides of that jump are therefore \(U_{(i)}-(i-1)/n\) and \(i/n-U_{(i)}\). Taking the largest of both kinds of discrepancies over all observations gives exactly \(D\).
Anderson–Darling's tail emphasis can also be understood from the variance of the empirical distribution function. At a point where the null probability is \(t\), its approximate variance is \(t(1-t)/n\). This variance is small near 0 and 1. Weighting squared discrepancies by a quantity proportional to \(1/[t(1-t)]\) therefore gives tail departures more influence than an unweighted comparison would. The formula's logarithmic terms produce this emphasis while yielding a statistic that can be calibrated under the null.
Worked Example: Applying the Kolmogorov–Smirnov Test
A hypothetical insurer examines five independent claim amounts under a fully specified continuous candidate severity model. The ordered probability integral transforms are \(0.10, 0.28, 0.51, 0.72, 0.90\). For this fully specified null, use the supplied 5% critical value \(0.565\). Calculate the statistic and make the test decision.
Method. Apply the KS statistic to the ordered transforms. Because the null distribution is fully specified and continuous, the transforms are compared with the uniform distribution on \((0,1)\).
Calculate \(D^+\). The values \(i/5-U_{(i)}\), for \(i=1,\ldots,5\), are:
Thus, \(D^+=0.12\).
Calculate \(D^-\). The values \(U_{(i)}-(i-1)/5\) are:
Thus, \(D^-=0.12\), so \(D=\max(0.12,0.12)=0.12\). Since \(0.12<0.565\), fail to reject the null hypothesis at the 5% level. This is not proof that the candidate model is correct; with only five observations, the test may have limited ability to detect departures.
Common mistake avoided: Using only \(D^+\) could miss the largest discrepancy on the other side of the empirical distribution. Both \(D^+\) and \(D^-\) must be calculated before taking their maximum.
Worked Example: Calculating an Anderson–Darling Statistic
For a hypothetical sample of four independent losses, the ordered probability integral transforms under a fully specified continuous model are \(0.20,0.40,0.60,0.80\). Calculate \(A^2\), rounding the final result to four decimal places.
Method. Substitute the ordered transforms into the Anderson–Darling formula. The values are symmetric: \(1-U_{(5-i)}=U_{(i)}\) for each \(i\). Thus, each bracketed pair of logarithms is twice the logarithm of the corresponding lower-half value.
Calculate the weighted log sum. The sum in the formula is:
Now \(n=4\), so:
The statistic is nonnegative, as expected. A formal reject-or-fail-to-reject conclusion still requires a critical value or p-value calibrated to this null and sample size. The calculation alone does not supply one; using a critical value for a different test setup would not justify a decision.
Common mistake avoided: The raw weighted log sum is negative, but the AD statistic is not that sum. The formula includes both the leading \(-n\) and division of the sum by \(n\); omitting either can produce an impossible negative statistic.
Worked Example: A Chi-Square Decision for Grouped Losses
A hypothetical model assigns probabilities \(1/3\) to each of three claim-size categories. In a sample of 30 independent claims, the observed counts are \(6,12,12\). The category probabilities are fixed in advance, not estimated from these data. At the 5% level, use the chi-square critical value \(5.991\) with 2 degrees of freedom.
Expected counts. Each category has expected count \(30(1/3)=10\). All expected counts are at least 5, so the usual approximation is reasonable for this example.
Calculate the statistic.
There are \(k=3\) categories and no estimated parameters, so the degrees of freedom are \(k-1=2\). Because \(2.4<5.991\), fail to reject the null at the 5% level. The data do not show sufficient evidence against the specified category probabilities at this significance level; they do not establish that those probabilities are true.
Common mistake avoided: Subtracting an additional degree of freedom for a fitted parameter would be incorrect here: no parameter was estimated from the grouped observations.
Information Criteria Rank Rather Than Test
For fitted models based on the same data and likelihood convention, let \(\ell\) denote the maximized log-likelihood, \(k\) the number of free estimated parameters, and \(n\) the sample size. The standard criteria are:
These comparisons require consistent likelihood calculations and comparable data, including the same observations and compatible treatment of censoring or truncation. AIC and BIC values calculated on different data sets or under inconsistent likelihood conventions do not provide a fair ranking. Earlier material on information criteria establishes the formulas and their penalties; the key point here is how their conclusions differ from those of goodness-of-fit tests.
Worked Example: AIC and BIC Can Rank Models Differently
Two hypothetical severity models are fitted by maximum likelihood to the same \(n=80\) complete losses. Model \(M_1\) has maximized log-likelihood \(-100\) and \(k_1=1\) free parameter. Model \(M_2\) has maximized log-likelihood \(-97.5\) and \(k_2=3\). Calculate both criteria, to three decimal places, and state the relative rankings.
AIC calculations. For \(M_1\), \(-2\ell_1=200\), so \(\operatorname{AIC}_1=200+2(1)=202\). For \(M_2\), \(-2\ell_2=195\), so \(\operatorname{AIC}_2=195+2(3)=201\). AIC ranks \(M_2\) first because \(201<202\).
BIC calculations. Since \(\ln(80)\approx4.382026635\),
BIC ranks \(M_1\) first because \(204.382<208.146\). Thus, AIC and BIC disagree on the relative preference in this comparison. Neither result is a hypothesis-test decision, and neither establishes that its preferred model is adequate.
Common mistake avoided: It would be incorrect to say that AIC rejects \(M_1\) or that BIC accepts \(M_1\). The criteria rank models; they do not return reject-or-fail-to-reject conclusions.
Interpreting the Evidence Correctly
A non-rejection from a KS, AD, or chi-square test means only that the test did not find sufficient evidence against its null at the chosen significance level. It does not show that the null is true. The outcome depends on sample size, the type of departure, and the test's calibration. For example, the KS statistic is driven by the largest absolute discrepancy, while AD puts relatively more emphasis on the tails; a test can therefore be more sensitive to some departures than to others.
AIC and BIC answer a different, comparative question. The lowest value is preferred among the models evaluated under consistent conditions, but the magnitude of the score alone does not establish absolute fit. A model can rank first in a candidate set even if every candidate is a poor description of the data. This is why an actuarial assessment should distinguish absolute evidence against a specified model from relative preference among candidates.
The calibration details matter. The standard KS null distribution assumes a fully specified continuous distribution; estimating parameters from the same data changes the reference distribution. The same caution applies to AD. For chi-square tests, estimating parameters affects degrees of freedom, and small expected counts can invalidate the usual approximation. Always match the reference distribution to the test actually performed.
Decide whether the goal is to test a specified null model or rank candidate models relative to one another.
For a goodness-of-fit test, identify the null distribution, whether parameters were estimated, and whether the test's assumptions and calibration apply.
Compare a test statistic with its appropriate reference value, or compare AIC/BIC scores computed on consistent data. Do not turn a relative ranking into a null-hypothesis conclusion.
Check Your Understanding
For each problem, distinguish the calculation from the conclusion the method supports.
- Four ordered probability integral transforms under a fully specified continuous null are \(0.15,0.30,0.55,0.80\). Calculate \(D^+\), \(D^-\), and \(D\). (Answer: \(D^+=0.20,\ D^-=0.15,\ D=0.20\).)
- Three ordered transforms for a fully specified continuous null are \(0.25,0.50,0.75\). Calculate the AD statistic to four decimal places. (Answer: \(A^2\approx0.2694\); a test decision additionally requires an appropriate calibrated critical value or p-value.)
- For three fixed categories, observed counts are \(8,14,8\), and the null probabilities are \(1/3\) each. At the 5% level, use the critical value \(5.991\) with 2 degrees of freedom. Calculate the statistic and conclusion. (Answer: \(X^2=2.4\); fail to reject the null.)
- Two models are fitted to the same 50 observations. Model A has \(\ell=-60,k=1\); Model B has \(\ell=-57,k=3\). Calculate AIC and BIC to three decimals, using \(\ln(50)\approx3.912023\), and identify each criterion's preferred model. (Answer: AIC\(_A=122\), AIC\(_B=120\), so AIC prefers B; BIC\(_A\approx123.912\), BIC\(_B\approx125.736\), so BIC prefers A.)
- A candidate model is not rejected by a goodness-of-fit test, but another model has the lower AIC on the same data. Does either result prove which model is true? (Answer: No. Non-rejection is not proof of the null, and lower AIC is only a relative ranking within the candidate set.)