Likelihood Ratio Test Form
Enter the restricted and unrestricted model details. The calculator evaluates fit improvement using the likelihood ratio test statistic.
Formula Used
The likelihood ratio test compares a restricted model against a less restricted nested model.
Λ = L(H₀) / L(H₁)
D = -2 ln(Λ) = 2(ℓ₁ - ℓ₀)
df = k₁ - k₀
p-value = P(Χ²df ≥ D)
AIC = 2k - 2ℓ
BIC = k ln(n) - 2ℓ
- ℓ₀ is the null model log-likelihood.
- ℓ₁ is the alternative model log-likelihood.
- k₀ and k₁ are model parameter counts.
- D is asymptotically chi-square distributed when regularity conditions hold.
- The alternative model should be a nested expansion of the null model.
How to Use This Calculator
- Enter a label for the null and alternative models.
- Add the log-likelihood for the restricted null model.
- Add the log-likelihood for the larger alternative model.
- Enter the number of estimated parameters in both models.
- Choose a significance level such as 0.05 or 0.01.
- Optionally add sample size to calculate BIC values.
- Click Calculate LRT to see the statistic, p-value, and decision.
- Use CSV or PDF export buttons to save the summary.
Example Data Table
| Scenario | Null Log-Likelihood | Alt Log-Likelihood | Null Params | Alt Params | Sample Size | α | LRT Statistic | df | Decision |
|---|---|---|---|---|---|---|---|---|---|
| Logistic model comparison | -128.44 | -121.10 | 3 | 5 | 240 | 0.05 | 14.68 | 2 | Reject H₀ |
| Poisson model comparison | -96.22 | -95.58 | 4 | 5 | 180 | 0.05 | 1.28 | 1 | Fail to reject H₀ |
| Survival model comparison | -210.00 | -203.50 | 6 | 8 | 520 | 0.01 | 13.00 | 2 | Reject H₀ |
FAQs
1. What does the likelihood ratio test measure?
It measures whether a larger nested model fits the data significantly better than a smaller restricted model using their log-likelihood difference.
2. When should I use this test?
Use it when one model is nested inside another and both are estimated on the same dataset under comparable assumptions.
3. Why must the alternative model have more parameters?
The usual likelihood ratio test compares a restricted specification with a less restricted nested one, so the larger model needs extra free parameters.
4. What if the alternative log-likelihood is lower?
That usually signals estimation issues, rounding differences, or models that are not properly nested. This calculator warns you and clamps the test statistic to zero.
5. How is the p-value found?
The calculator compares the LRT statistic to a chi-square distribution with degrees of freedom equal to the difference in parameter counts.
6. What do AIC and BIC add here?
They provide extra model selection context by penalizing complexity. Lower values suggest a better balance between fit and parsimony.
7. Is a small p-value always enough to pick the bigger model?
Not always. Statistical significance should be considered alongside interpretability, theory, diagnostics, and whether the added parameters are meaningful.
8. Can I use this for non-nested models?
No. Standard likelihood ratio testing is designed for nested model comparisons. Use information criteria or other methods for non-nested models.