Understand the idea
Many statistical tools quietly assume your data follows a particular shape, usually the familiar bell curve (normal). But real measurements often do not: reaction times and costs tend to have a long right tail, time-to-failure data often follows a Weibull shape, and so on. Distribution fitting answers the question directly: of several well-known candidate shapes, which one actually describes THIS data best?
Each candidate distribution gets fit to your data using maximum likelihood: finding the version of that distribution's parameters that makes your observed data as probable as possible. But a distribution with more adjustable knobs (parameters) can always bend itself to fit the data a little better, which would unfairly reward complexity if you just picked whichever fit the numbers best. AIC and BIC are the referees here: they reward a good fit but PENALIZE extra parameters, so the 'winner' is the best trade-off between fitting well and staying simple, not just whichever distribution has the most flexibility.
One thing worth remembering: this only ever tells you the best fit AMONG the candidates you tried. If the true shape of your data is something not on the list, the 'winner' here is still just the best of the options offered; always sanity-check the winner visually (the histogram overlay, the Q-Q plot) rather than trusting the ranking number alone.
Each candidate is a maximum likelihood fit, meaning its settings are the ones that make your data most probable. AIC model selection ranks the candidates by fit while penalizing extra parameters, so a more complicated distribution has to earn its place. The Anderson-Darling test is a goodness of fit check that pays extra attention to the tails, where a poor fit matters most for predictions of rare values.
Practitioner explanation
KernelStats fits normal, lognormal, exponential, Weibull, and gamma candidates by MLE, with the positive-support families (lognormal, exponential, Weibull, gamma) automatically excluded when the data contain non-positive values, stated explicitly as an info-level warning naming which candidates were skipped and why, rather than silently omitting them. Ranking is by AIC = 2k - 2*ln(L-hat) (k = free parameters), with BIC reported alongside for the more complexity-averse comparison; both are reported, but AIC decides the winner.
The Anderson-Darling statistic (A^2) is reported as a COMPLEMENTARY diagnostic, not a replacement for AIC: it weights the tails more heavily than the center, which matters for capability and reliability work where tail behavior is exactly what is being modeled. The verdict attached to A^2 is a formal test at the 5% level, not a heuristic label: because the parameters were estimated from the same data, KernelStats applies the small-sample modification A* and compares it with the published estimated-parameter critical value for that family (D'Agostino & Stephens, 1986: about 0.752 for the normal and for the lognormal tested on ln x, 1.321 for the exponential, 0.757 for the Weibull, 0.752-0.786 for the gamma depending on its shape), reporting 'Rejected at 5%' or 'Not rejected at 5%' for every candidate. When even the AIC winner is rejected, the headline says that no candidate fits the data well rather than announcing a best fit; 'not rejected' only means no departure was detected, not that the distribution is correct.
Two honesty notes are built into the product's own framing rather than left as textbook caveats: AIC-based ranking only compares the candidates actually supplied (a distribution outside the panel could fit better, and the winner is only 'best among the candidates tried'); and normal winning the AIC race (or failing to be rejected) is explicitly NOT proof the data are exactly normal, only that a normal distribution is a reasonable, parsimonious description: absence of evidence against a model is not evidence the model is exactly true.
When to use it
Consider it when
You have one continuous variable and need to know which named probability distribution best describes it, to choose a model for simulation, capability analysis, reliability work, or to check (or challenge) a normality assumption before another analysis.
Use caution when
Fewer than about 20 observations (MLE parameter estimates and goodness-of-fit statistics are both unstable and low-power at small n; the card warns explicitly below this threshold), when the true shape of the data is expected to be something outside the five-candidate panel offered here, or when you intend to treat the AIC-declared winner as proof the data truly follow that distribution rather than the best-supported description among the options tried.
Formulas and symbols
Akaike Information Criterion
k the number of free parameters in the candidate distribution; L-hat the maximized likelihood. Lower AIC is better; used to rank candidates.
Bayesian Information Criterion
Penalizes extra parameters more heavily than AIC as sample size n grows. Reported alongside AIC, not used for ranking.
Anderson-Darling statistic
F the fitted candidate's CDF; x_(i) the sorted data. Weights the tails more heavily than the center; smaller is a closer fit.
Assumptions and checks
- Independence of observations. If the observations are not independent draws from one common distribution (time-ordered data with a trend, or values from more than one underlying population mixed together), the fitted distribution describes a blend that may not represent any real single process well.
In KernelStats: Not checked by KernelStats: assumed from the study design; reported directly on the card as a standing 'Independent, identically distributed observations' reminder.
- Fitting a continuous distribution family (normal, lognormal, Weibull, etc.) to heavily rounded, discrete, or bounded data can produce a technically-best-AIC fit that still misrepresents the data's true discrete or bounded nature.
In KernelStats: Not checked by KernelStats: assumed; stated directly as a 'Continuous measurement' reminder.
- With small samples (n < 20), both the maximum-likelihood parameter estimates and the Anderson-Darling goodness-of-fit verdict are unstable, and the 'winning' distribution by AIC can easily be an artifact of sampling noise rather than a genuinely better model.
In KernelStats: Checked directly: the card flags n < 20 as an 'Adequate sample size for fitting' warning.
- A large Anderson-Darling statistic for the winning (best-AIC) distribution means even the best of the candidates fits poorly, especially in the tails; treating its parameters as a good description of the data anyway can mislead any downstream calculation (e.g. a tail probability) that depends on the fit.
In KernelStats: Checked directly: the Anderson-Darling statistic is computed for every candidate and judged against its family's estimated-parameter 5% critical value ('Rejected at 5%' / 'Not rejected at 5%'), with the winner's verdict in the assumption row alongside a Q-Q plot to inspect visually.
Alternatives
- Normality Test (Battery). The specific question is narrowly whether data are consistent with normality, rather than which of several named distributions fits best overall.
- Descriptive Summary. A quick look at skewness and kurtosis is enough to get oriented, without committing to formally fitting and ranking named distribution families.
- Non-normal Capability (Percentile Method). The goal of the distribution fit is specifically to compute a percentile-method process capability index, not to report the fit itself.
Worked example
Scenario
Fitting all five candidate distributions to 85 time-to-failure measurements (strictly positive) from a reliability study.
Result
Weibull wins by AIC (AIC = 612.3 vs. lognormal's 615.1 and gamma's 616.8) and is not rejected by Anderson-Darling at 5%; the normal distribution is excluded from ranking consideration in practice by its poor tail fit (AIC = 641.2, rejected by Anderson-Darling at 5%).
Interpretation
Weibull is the best-supported description among the candidates tried, consistent with the engineering expectation for time-to-failure data, and its close AIC margin over lognormal means both should be checked against the Q-Q plot before committing to Weibull-based reliability calculations downstream.
Common misconceptions
Misconception
The distribution with the lowest AIC in this panel is proven to be the true distribution the data came from.
Correction
AIC only ranks the CANDIDATES you actually supplied against each other: it never validates that the winner fits well in any absolute sense, and a distribution outside the panel could fit far better. Always check the winner against the Q-Q plot and the Anderson-Darling statistic before trusting the ranking, and remember the winner is only 'best among the candidates tried.'
Misconception
If a normal distribution wins the AIC comparison (or a normality test fails to reject it), the data are confirmed to be normally distributed.
Correction
Winning an AIC comparison, or failing to reject normality, only means a normal distribution is a reasonable, parsimonious description: it is not proof the data are EXACTLY normal. Absence of evidence against a model is not evidence the model is precisely true, especially with small samples where the tests have limited power to detect real departures.
Read more: Misconception: the normality assumption applies to the raw data, not the residuals
References
- A new look at the statistical model identification, Akaike, H. (1974), IEEE Transactions on Automatic Control, 19(6), 716-723.
- Asymptotic theory of certain 'goodness of fit' criteria based on stochastic processes, Anderson, T. W. and Darling, D. A. (1952), Annals of Mathematical Statistics, 23(2), 193-212.
