Every test built so far in this topic asks a parametric question — is equal to some value, does a restriction on hold — always within a family the analyst has already committed to. Goodness-of-fit testing asks the more basic question underneath all of that: does the data plausibly come from the assumed family at all? This is the closing question of the unit for a good reason: every likelihood-based test built in Topics 6–7 is only as trustworthy as the parametric model it is computed inside, and a regulator, model-validation committee, or backtesting framework needs a direct, model-checking answer before any of that earlier machinery can be trusted. This note builds the two standard tools. For binned/categorical data, the generalized likelihood ratio test applied to the multinomial distribution reduces, via the same Taylor-expansion argument as Wilks' theorem, to Pearson's chi-squared statistic — the single most widely used goodness-of-fit test in applied statistics. For continuous data, the empirical CDF supplies the Kolmogorov-Smirnov test, comparing the entire fitted curve against the entire data-driven curve at once, with no arbitrary binning decision at all. The finance stakes are concrete: a bank's internal-models approach to regulatory capital lives or dies on whether its assumed P&L distribution — normal, Student-, or otherwise — actually survives one of these tests against realised trading outcomes.
Learning objectives. By the end of this note you should be able to:
- derive Pearson's chi-squared statistic as a Taylor-series approximation to the multinomial generalized likelihood ratio statistic, and state its asymptotic degrees of freedom after parameters are estimated;
- apply the chi-squared goodness-of-fit test to a binned count model, correctly accounting for estimated parameters in the degrees of freedom;
- define the Kolmogorov-Smirnov statistic from the empirical CDF and explain why its null distribution is the same for every continuous ;
- state why the Lilliefors correction is needed when the reference distribution's parameters are estimated from the same data used for the test;
- explain the regulatory-capital motivation for testing the normality (or other parametric shape) of portfolio P&L.
In this lesson
- Pearson's chi-squared test for the multinomial
- The Kolmogorov-Smirnov test
- The Lilliefors correction
- Testing normality of portfolio P&L for regulatory capital
Before you start
- Wilks' Theorem: the Asymptotic χ² Distribution
- Wald Tests and Score Tests
- The Empirical CDF, Glivenko-Cantelli, and QQ-Plots
The full lesson, with worked examples and exercise solutions, is for members.
Read the full lessonNew to SelfMadeQuant.com? See membership options or browse the Probability, Statistics and Financial Data syllabus.