Tutorials › Exam ASTAM - Advanced Short-Term Actuarial Mathematics › A Grouped Loss Data Chi-Square Case

Exam ASTAM · Empirical Goodness-of-Fit Tests · Tutorial 413 of 979

A Grouped Loss Data Chi-Square Case

Work through grouped-loss Pearson chi-square tests, including grouped parameter fitting and the conditions needed for the degrees-of-freedom adjustment.

Intermediate 11 min read

What You'll Learn

  • Convert severity-model probabilities into expected counts for specified loss intervals.
  • Fit an exponential severity model from grouped counts using grouped maximum likelihood.
  • Calculate the Pearson chi-square statistic from observed and expected frequencies.
  • Determine degrees of freedom when parameters are fitted from grouped data.
  • Distinguish grouped-data fitting from estimating parameters using individual losses.
  • Make and explain a goodness-of-fit decision at a stated significance level.

Why Grouped Loss Data Need Careful Testing

Severity data are sometimes available only as counts in loss bands rather than as individual losses. A Pearson chi-square goodness-of-fit test can compare those counts with the frequencies predicted by a severity model. The calculation is straightforward once the categories and model are specified, but two details matter: the model probability for each category and how its parameters were estimated.

This tutorial uses exponential severity examples to show the complete process. The method applies more broadly to fitted severity models when category probabilities can be calculated and the conditions for the chi-square approximation are met. The treatment is aligned with the SOA Exam ASTAM (Advanced Short-Term Actuarial Mathematics) syllabus.

Definition: Let \(X\) be a loss and let \(C_1,\ldots,C_k\) be mutually exclusive categories that cover every possible observed loss. If \(n_j\) losses fall in category \(C_j\), then the observed count is \(O_j=n_j\). Under a specified model with category probability \(p_j=P(X\in C_j)\), the expected count is \(E_j=np_j\), where \(n=\sum_{j=1}^k O_j\). The Pearson statistic is $$ \chi^2=\sum_{j=1}^k\frac{(O_j-E_j)^2}{E_j}. $$

Category Probabilities and the Pearson Statistic

For a continuous severity model with cumulative distribution function \(F_X\), a finite interval \([a,b)\) has probability \(F_X(b)-F_X(a)\). A right-tail category \([a,\infty)\) has probability \(1-F_X(a)\). Endpoints can be assigned consistently to adjacent categories; for a continuous model, an endpoint has probability zero. Categories must be exhaustive and nonoverlapping so that their probabilities sum to one.

For an exponential loss with mean parameter \(\theta>0\), the survival function is \(S_X(x)=e^{-x/\theta}\) for \(x\geq 0\). If the categories are \([0,1),[1,2),[2,\infty)\), for example, their probabilities are \(1-q,\ q(1-q),\ q^2\), where \(q=e^{-1/\theta}\). The expected counts are obtained by multiplying each probability by the total number of observations.

Theorem: If there are \(k\) categories and \(m\) unknown parameters are estimated from the grouped multinomial counts using an appropriate grouped-data method, such as grouped maximum likelihood or minimum chi-square, the usual asymptotic reference distribution for the Pearson statistic has \(k-1-m\) degrees of freedom. This result requires regularity conditions, including identifiable parameters in the interior of the parameter space, positive model probabilities in the categories used, and adequate expected counts. If parameters were instead estimated from the individual losses, the degrees-of-freedom formula does not automatically apply; the reference distribution must be justified for that estimator or calibrated, for example by simulation.

The subtraction of one reflects the constraint that the counts sum to \(n\), so only \(k-1\) category proportions vary freely. Estimating \(m\) model parameters from those grouped proportions uses a further \(m\) degrees of freedom. This is why the method used to estimate the parameters is part of the test, not a detail to ignore.

Grouped Maximum Likelihood for an Exponential Model

A grouped-data likelihood uses the probability of each category, not the unobserved losses within that category. For three unit-width categories \([0,1),[1,2),[2,\infty)\), write \(q=e^{-1/\theta}\). The probabilities are \(1-q,\ q(1-q),\ q^2\). If the respective counts are \(n_1,n_2,n_3\), the multinomial likelihood, apart from a factor that does not depend on \(q\), is

$$ L(q)\ \propto\ (1-q)^{n_1}\{q(1-q)\}^{n_2}(q^2)^{n_3} =q^{n_2+2n_3}(1-q)^{n_1+n_2}. $$

Taking logarithms and differentiating gives the grouped maximum-likelihood estimator. If \(A=n_2+2n_3\) and \(B=n_1+n_2\), then the log-likelihood is \(A\log q+B\log(1-q)\). Setting its derivative \(A/q-B/(1-q)\) equal to zero yields the result below.

$$ \widehat q=\frac{A}{A+B} =\frac{n_2+2n_3}{n_1+2n_2+2n_3}, \qquad \widehat\theta=-\frac{1}{\log\widehat q}. $$

This derivation illustrates why a grouped fit can differ from fitting the exponential mean to individual losses: the grouped likelihood contains category counts and their model probabilities, not the exact loss values.

Worked Tests

Worked Example: Fitting and Testing Three Exponential Loss Bands

A hypothetical insurer records 100 complete losses in the bands \([0,1),[1,2),[2,\infty)\), with counts 50, 30, and 20. Fit an exponential severity model by grouped maximum likelihood, then test fit at the 5% significance level. Losses are measured in thousands of dollars, and no deductible, limit, truncation, or censoring applies.

Method and fit. For these unit-width bands, \(n_1=50,n_2=30,n_3=20\). Thus \(A=n_2+2n_3=30+40=70\) and \(B=n_1+n_2=50+30=80\). The grouped estimate is

$$ \widehat q=\frac{70}{70+80}=\frac{7}{15}=0.4667, \qquad \widehat\theta=-\frac{1}{\log(7/15)}\approx 1.312. $$

The fitted category probabilities are \(1-\widehat q=0.5333\), \(\widehat q(1-\widehat q)=0.2489\), and \(\widehat q^2=0.2178\). They sum to 1.0000. Multiplying by 100 gives expected counts 53.333, 24.889, and 21.778.

Test statistic. The three contributions, using the unrounded expected counts, are

$$ \frac{(50-53.333)^2}{53.333}=0.2083,\qquad \frac{(30-24.889)^2}{24.889}=1.0494,\qquad \frac{(20-21.778)^2}{21.778}=0.1451. $$

Therefore, \(\chi^2=0.2083+1.0494+0.1451=1.4028\). One parameter was estimated from the grouped counts, so the degrees of freedom are \(k-1-m=3-1-1=1\). At the 5% level the critical value is 3.841. Since \(1.4028<3.841\), do not reject the exponential model. This is not proof that the model is true; the observed grouped counts do not provide sufficient evidence against it at this level.

Check. The fitted probabilities total 1, the expected counts total 100, and all expected counts exceed 5. The degrees-of-freedom adjustment is appropriate here because the parameter was estimated from these grouped counts.

Worked Example: Four Bands and One Fitted Parameter

For a hypothetical portfolio, 100 complete losses, measured in thousands of dollars, are grouped into \([0,1),[1,2),[2,3),[3,\infty)\). The counts are 40, 30, 18, and 12. Fit an exponential model by grouped maximum likelihood and perform a 5% Pearson test. Assume no policy modification or incomplete observation.

Method and fit. Set \(q=e^{-1/\theta}\). The band probabilities are \(1-q,\ q(1-q),\ q^2(1-q),\ q^3\). The grouped likelihood is proportional to \(q^{n_2+2n_3+3n_4}(1-q)^{n_1+n_2+n_3}\). Here, \(A=30+2(18)+3(12)=102\) and \(B=40+30+18=88\). Therefore,

$$ \widehat q=\frac{102}{102+88}=\frac{51}{95}=0.5368, \qquad \widehat\theta=-\frac{1}{\log(51/95)}\approx 1.608. $$

The fitted probabilities are approximately \(0.4632,\ 0.2486,\ 0.1335,\ 0.1547\), respectively. They sum to 1.0000, and the expected counts are 46.316, 24.864, 13.348, and 15.472. Each is above 5.

Test statistic and decision. Using those expected counts, the contributions are

$$ \frac{(40-46.316)^2}{46.316}=0.861,\quad \frac{(30-24.864)^2}{24.864}=1.061,\quad \frac{(18-13.348)^2}{13.348}=1.621,\quad \frac{(12-15.472)^2}{15.472}=0.779. $$

Their sum is approximately \(\chi^2=4.322\). With \(k=4\) categories and \(m=1\) grouped-fitted parameter, the degrees of freedom are \(4-1-1=2\). The 5% critical value is 5.991. Since \(4.322<5.991\), do not reject the fitted exponential model at the 5% level.

Check. The observed counts sum to 100, as do the expected counts up to rounding. The fit uses all four grouped frequencies, so using the grouped-data degrees-of-freedom result is justified under the stated regularity and expected-count conditions.

Worked Example: Testing a Fully Specified Exponential Model

A hypothetical study records 200 complete losses in thousands of dollars, with counts 85, 43, 30, and 42 in \([0,1),[1,2),[2,3),[3,\infty)\). Test the fully specified exponential model with mean \(\theta=2\) at the 5% level. No parameter is estimated from these observations, and there are no coverage modifications or incomplete losses.

Category probabilities. For \(\theta=2\), the survival function is \(e^{-x/2}\). The four probabilities are \(1-e^{-0.5}=0.393469\), \(e^{-0.5}-e^{-1}=0.238651\), \(e^{-1}-e^{-1.5}=0.144749\), and \(e^{-1.5}=0.223130\). They sum to 1.000000. Multiplying by 200 gives expected counts 78.694, 47.730, 28.950, and 44.626.

Statistic and decision. The four contributions are approximately

$$ \frac{(85-78.694)^2}{78.694}=0.505,\quad \frac{(43-47.730)^2}{47.730}=0.469,\quad \frac{(30-28.950)^2}{28.950}=0.038,\quad \frac{(42-44.626)^2}{44.626}=0.155. $$

Thus \(\chi^2\approx1.167\). Since no parameters were estimated, the degrees of freedom are \(k-1=4-1=3\), not \(k-1-m\) with a positive fitted-parameter count. The 5% critical value is 7.815, so \(1.167<7.815\): do not reject this fully specified model at the 5% level.

Check. The expected counts total 200, and the model has no estimated parameter to subtract from the degrees of freedom.

Assumptions, Interpretation, and Exam Traps

The test treats the observations as independent draws from the specified severity distribution and the categories as a fixed, exhaustive partition. If losses are subject to a deductible, policy limit, truncation, or censoring, probabilities must describe the observed data mechanism. For example, a loss recorded only when it exceeds a threshold is not distributed as an unmodified severity over all nonnegative amounts. Use the probability model for the actual observation process rather than silently applying unconditional category probabilities.

The chi-square approximation also depends on expected counts being adequate. A commonly used practical guideline is to avoid very small expected counts, often by combining adjacent categories when justified. Combining categories changes \(k\) and can change the statistic and degrees of freedom, so do it before making the final test calculation. Categories should not be combined selectively after inspecting which ones create the largest contributions.

Common trap: subtracting parameters without checking how they were estimated. The calculation \(k-1-m\) is not automatically valid just because a model has \(m\) parameters and those parameters were estimated from the same study. In particular, estimating an exponential mean from the individual losses and then applying the grouped Pearson statistic does not, by itself, establish a chi-square reference distribution with \(k-2\) degrees of freedom. That estimator uses more information than the grouped counts, and the resulting statistic may have a different limiting distribution. Justify its reference distribution or calibrate the test, for example by simulation under the fitted model.

A related arithmetic trap is to use \(k-m\) degrees of freedom, forgetting the one constraint among the category counts. For the four-category grouped fit above, that incorrect calculation gives \(4-1=3\); the correction is \(4-1-1=2\). Conversely, a fully specified model has \(m=0\), so its degrees of freedom are \(k-1\).

Key takeaway: First calculate probabilities for the categories that describe the observed losses; next obtain expected counts and the Pearson statistic; then choose degrees of freedom consistent with the actual parameter-fitting method. A test decision is reliable only when its model assumptions and chi-square approximation are appropriate.

Check Your Understanding

For each problem, identify the fitting method and use the stated test level where relevant. Answers are given at the end of each item.

  1. A fully specified exponential model has mean 4 thousand dollars. In 100 complete losses, 38 fall in \([0,2)\) and 62 in \([2,\infty)\). Calculate expected counts and the Pearson statistic, then decide at 5%. (Answer: Expected counts 39.35 and 60.65; \(\chi^2\approx0.076\), 1 degree of freedom, do not reject at 5%.)
  2. An exponential model is fitted by grouped maximum likelihood to 100 losses in \([0,1)\) and \([1,\infty)\), with counts 36 and 64. Find \(\widehat q=e^{-1/\widehat\theta}\) and state whether the resulting two-category test has positive degrees of freedom. (Answer: \(\widehat q=0.64\), \(\widehat\theta\approx2.238\) thousand dollars; \(k-1-m=0\), so this grouping does not provide a positive-degree-of-freedom goodness-of-fit test.)
  3. Counts in \([0,1),[1,2),[2,\infty)\) are 45, 35, and 20. Fit an exponential model by grouped maximum likelihood and test at 5%. (Answer: \(\widehat q=75/155=15/31\), \(\widehat\theta\approx1.377\); expected counts approximately 51.61, 24.97, and 23.41; \(\chi^2\approx5.37\), 1 degree of freedom, reject at 5%.)
  4. A severity analyst estimates the exponential mean from every individual loss, then groups the same data into four categories and proposes using \(4-1-1=2\) degrees of freedom for the Pearson statistic. Is that adjustment justified solely by the number of estimated parameters? (Answer: No. The \(k-1-m\) result is not automatic for a parameter estimated from individual losses; justify the reference distribution for that estimator or calibrate it, for example by simulation.)
  5. A fully specified severity model assigns category probabilities 0.02, 0.18, 0.35, and 0.45 to four bands in a sample of 100. What are the expected counts and degrees of freedom before any categories are combined? (Answer: Expected counts 2, 18, 35, and 45; \(k-1=3\) degrees of freedom, although the expected count of 2 raises an adequacy concern that should be addressed before relying on the approximation.)
Clinical Biostats