Statistics Graduate Level Quiz: Deviance And Goodness Of Fit
10 questions · exam conditions
0:00
Deviance And Goodness Of FitQuestion 1 of 10

A binomial logistic regression is fitted to 1212 distinct covariate patterns, each representing 2020 independent trials. The model contains an intercept and two slope coefficients. Within every pattern, both the fitted expected number of successes and the fitted expected number of failures are reasonably large.

Which statement gives the most appropriate conventional deviance goodness-of-fit assessment?

Compare the grouped residual deviance with χ92χ^2_9 because there are 1212 binomial groups and 33 fitted parameters.
Compare the individual-trial residual deviance with χ2372χ^2_{237} because there are 240240 Bernoulli observations and 33 parameters.
Compare the grouped residual deviance with χ122χ^2_{12} because each distinct covariate pattern contributes one independent component.
Compare the grouped residual deviance with χ82χ^2_8 because the intercept removes one degree of freedom in addition to the three parameters.
← Back to quizzes

Statistics Graduate Level Quiz

Statistics Graduate Level Quiz: Deviance And Goodness Of Fit

Practice Deviance And Goodness Of Fit in Statistics Graduate Level with focused quiz questions that help you check what you know, review explanations, and build confidence with test-style prompts.

What this quiz covers

This quiz focuses on Deviance And Goodness Of Fit, giving you a quick way to practice the rules, question types, and explanations that matter most for Statistics Graduate Level.

How to use this quiz

Try each quiz question before looking at the correct answer. Use the explanations to review missed ideas, then come back to similar questions until the pattern feels familiar.

All questions

Question 1

A binomial logistic regression is fitted to 1212 distinct covariate patterns, each representing 2020 independent trials. The model contains an intercept and two slope coefficients. Within every pattern, both the fitted expected number of successes and the fitted expected number of failures are reasonably large.

Which statement gives the most appropriate conventional deviance goodness-of-fit assessment?

  1. Compare the grouped residual deviance with χ92χ^2_9 because there are 1212 binomial groups and 33 fitted parameters. (correct answer)
  2. Compare the individual-trial residual deviance with χ2372χ^2_{237} because there are 240240 Bernoulli observations and 33 parameters.
  3. Compare the grouped residual deviance with χ122χ^2_{12} because each distinct covariate pattern contributes one independent component.
  4. Compare the grouped residual deviance with χ82χ^2_8 because the intercept removes one degree of freedom in addition to the three parameters.
Explanation: Whenever you see a deviance goodness-of-fit question for logistic regression, your first instinct should be to identify whether the data are grouped (binomial counts) or ungrouped (individual Bernoulli trials), because this determines which chi-squared approximation is valid. Here, you have g=12g = 12 distinct covariate patterns, each with ni=20n_i = 20 trials, and the model has p=3p = 3 parameters (intercept + two slopes). The residual deviance for grouped binomial data follows an approximate χ2\chi^2 distribution with degrees of freedom equal to the number of groups minus the number of fitted parameters: df=gp=123=9df = g - p = 12 - 3 = 9. The passage explicitly tells you that fitted expected successes and failures are reasonably large within every pattern, satisfying the condition needed for this chi-squared approximation to work. That confirms A is correct. B is wrong because when data consist of individual Bernoulli trials (binary 0/1 outcomes), the deviance does not follow a chi-squared distribution in any useful approximating sense — the expected cell counts are simply too small (each is one observation). Comparing individual-trial deviance to χ2372\chi^2_{237} is a well-known invalid approach. C incorrectly sets df=12df = 12, ignoring that the 3 fitted parameters must be subtracted. Degrees of freedom are always residual — you lose one for each estimated parameter. D invents an extra degree-of-freedom penalty for the intercept. The intercept is already counted among the p=3p = 3 parameters, so subtracting it again is double-counting. Key takeaway: For grouped logistic regression, use df=(number of groups)(total parameters estimated)df = \text{(number of groups)} - \text{(total parameters estimated)}, and remember that the individual-trial deviance chi-squared approximation is invalid regardless of sample size.

Question 2

Two nested Gaussian linear models are fitted to the same 5050 observations. The reduced model has residual sum of squares 120120, and the full model, which adds two regression coefficients, has residual sum of squares 100100. Both models estimate the error variance by maximum likelihood.

What is the likelihood-ratio deviance statistic for testing the two added coefficients, and what is its usual asymptotic reference distribution under the null hypothesis?

  1. 10.0010.00, compared with a χ22χ^2_2 distribution
  2. 9.129.12, compared with a χ22χ^2_2 distribution (correct answer)
  3. 20.0020.00, compared with a χ12χ^2_1 distribution
  4. 0.180.18, compared with a χ472χ^2_{47} distribution
Explanation: When comparing nested Gaussian models fitted by maximum likelihood, the likelihood-ratio test (LRT) statistic is not simply the difference in RSS. Because ML estimates of σ2\sigma^2 use nn in the denominator (not npn-p), the log-likelihood for a Gaussian model is: =n2lnσ^2+const=n2ln ⁣(RSSn)+const\ell = -\frac{n}{2}\ln\hat{\sigma}^2 + \text{const} = -\frac{n}{2}\ln\!\left(\frac{\text{RSS}}{n}\right) + \text{const} The deviance (2Δ-2\Delta\ell) statistic becomes: D=2(reducedfull)=nln ⁣(RSSreducedRSSfull)=50ln ⁣(120100)=50ln(1.2)50×0.18239.12D = -2\left(\ell_{\text{reduced}} - \ell_{\text{full}}\right) = n\ln\!\left(\frac{\text{RSS}_{\text{reduced}}}{\text{RSS}_{\text{full}}}\right) = 50\ln\!\left(\frac{120}{100}\right) = 50\ln(1.2) \approx 50 \times 0.1823 \approx 9.12 Under the null, this statistic follows an asymptotic χ22\chi^2_2 distribution, where the degrees of freedom equal the number of added parameters (two coefficients). So B is correct. A is wrong because 10.0010.00 comes from naively halving the RSS difference (120100)/2=10(120-100)/2 = 10, which corresponds to an F-statistic numerator scaled differently — not the LRT deviance. C incorrectly uses df=1df=1 instead of df=2df=2 (two coefficients were added), and the value 20.0020.00 is simply the raw RSS difference with no log transformation. D references df=47df=47, which would be the residual degrees of freedom of the full model — irrelevant to the chi-squared reference distribution for this test. A useful memory aid: whenever ML (not REML or OLS) is used in nested Gaussian models, compute the LRT as nln(RSS0/RSS1)n\ln(\text{RSS}_0/\text{RSS}_1), not as a simple difference. The χ2\chi^2 degrees of freedom always equal the number of additional parameters, not residual degrees of freedom.

Question 3

A quasi-Poisson regression fitted to independent count data has residual deviance 210210, Pearson statistic 240240, and residual degrees of freedom 120120. The analyst estimates the dispersion using the Pearson statistic.

Which interpretation of the deviance is most appropriate under this dispersion adjustment?

  1. The estimated dispersion is 1.751.75, so the adjusted deviance is 120120 and indicates exact fit.
  2. The estimated dispersion is 2.002.00, so the adjusted deviance is 105105 and does not indicate excess lack of fit. (correct answer)
  3. The estimated dispersion is 2.002.00, but the unadjusted deviance 210210 must still be compared with χ1202χ^2_{120}.
  4. The estimated dispersion is 0.500.50, so the adjusted deviance is 420420 and strongly rejects the fitted mean model.
Explanation: When you encounter quasi-Poisson regression questions, focus on two things: how dispersion is estimated, and what that estimate does to your inference tools. In quasi-Poisson models, the dispersion parameter ϕ^\hat{\phi} is typically estimated as the Pearson statistic divided by the residual degrees of freedom. Here, that gives ϕ^=240/120=2.00\hat{\phi} = 240/120 = 2.00. Once you have this estimate, the residual deviance is rescaled by dividing by ϕ^\hat{\phi}: the adjusted deviance becomes 210/2.00=105210/2.00 = 105. This adjusted statistic is then compared to a χ1202\chi^2_{120} distribution. Since 105<120105 < 120 (well below the mean of the reference distribution), there is no evidence of excess lack of fit — the model fits adequately. This confirms B as correct. A is wrong on two counts: it uses the deviance (210/120=1.75210/120 = 1.75) rather than the Pearson statistic to estimate dispersion, and then incorrectly claims the adjusted deviance equals exactly 120120, implying "exact fit" — a nonsensical standard. C makes a critical error by suggesting you compare the unadjusted deviance against χ1202\chi^2_{120}. Under quasi-Poisson, overdispersion inflates the deviance, so comparing the raw deviance without scaling by ϕ^\hat{\phi} would spuriously signal lack of fit. D inverts the dispersion estimate entirely, computing ϕ^=120/240=0.50\hat{\phi} = 120/240 = 0.50 — which would imply underdispersion and an inflated adjusted deviance of 420420. Dispersion is always Pearson statistic divided by df, never the other way around. A reliable rule: in quasi models, dispersion comes from the Pearson statistic ÷ df, and you always divide the deviance by ϕ^\hat{\phi} to adjust it.

Question 4

Two binomial regression models are fitted to the same observations. Model A and Model B each contain four fitted regression parameters, but they use different, nonnested sets of predictors. Their residual deviances are 8484 and 9090, respectively.

Which comparison is justified from the reported deviances?

  1. Model A has an AIC lower by 66, but the deviance difference has no standard nested-model chi-square reference. (correct answer)
  2. Model A is preferred by a likelihood-ratio test with 66 degrees of freedom because its deviance is lower by 66.
  3. Model B has an AIC lower by 66 because a larger residual deviance represents a larger maximized likelihood.
  4. The models have equal AIC because they contain equal numbers of parameters, regardless of their residual deviances.
Explanation: When comparing non-nested models, you need to think carefully about which tools are valid. The likelihood-ratio test (LRT) requires nested models — one must be a special case of the other. AIC, however, works across any models fit to the same data, making it the appropriate comparison tool here. AIC is defined as AIC=Residual Deviance+2p\text{AIC} = \text{Residual Deviance} + 2p, where pp is the number of fitted parameters. Since both models have p=4p = 4, the 2p2p penalty is identical (2×4=82 \times 4 = 8 for each). The AIC difference is therefore driven entirely by the deviance difference: Model A's AIC is 84+8=9284 + 8 = 92 and Model B's is 90+8=9890 + 8 = 98, so Model A is lower by exactly 66. Crucially, because the models are non-nested, you cannot use a chi-square reference distribution to interpret the deviance difference as a formal hypothesis test. This makes A correct. B is wrong on two counts: the LRT requires nested models, and even if it applied, the degrees of freedom would be the difference in parameters (here 00, not 66). C has the likelihood direction exactly backwards — a lower residual deviance corresponds to a higher maximized log-likelihood, so Model A, not B, would be preferred. D is tempting but wrong: equal numbers of parameters means equal penalty terms, but AIC still differs because the deviance terms differ. Your takeaway: memorize that LRT \Rightarrow nested models only, while AIC is the go-to for non-nested comparisons. Equal penalty terms mean deviance differences translate directly into AIC differences.

Question 5

A Poisson regression has a residual deviance larger than expected, but many fitted means are small enough that the analyst doubts the chi-square approximation. The analyst proposes a parametric bootstrap goodness-of-fit test using residual deviance as the test statistic.

Which bootstrap procedure most appropriately accounts for estimation of the regression parameters?

  1. Simulate from the saturated model, fit the original model once, and compare simulated counts directly with observed counts.
  2. Simulate from the fitted model, retain the original coefficient estimates, and calculate each simulated data set's deviance from those fixed estimates.
  3. Simulate from the fitted model, refit the model to each simulated data set, and compare its deviance with the observed deviance. (correct answer)
  4. Resample the observed deviance residuals without replacement, add them to the fitted counts, and use a normal reference distribution.
Explanation: When you encounter a parametric bootstrap goodness-of-fit test, the central question is always: what sampling distribution are you trying to approximate? Residual deviance measures how much worse the fitted model is than the saturated model. Under the null hypothesis that your model is correct, you want to know the distribution of that deviance statistic — but this distribution depends on the fact that parameters are estimated, not known. Ignoring estimation uncertainty produces an overly optimistic (narrow) reference distribution. Option C is correct because it faithfully replicates the entire modeling pipeline. You simulate data from the fitted Poisson model, refit the model to each simulated dataset, and compute each simulated deviance from its own newly estimated parameters. This generates a reference distribution that correctly accounts for the variability introduced by parameter estimation, giving you a valid p-value even when fitted means are too small for the chi-square approximation to be reliable. Option A is wrong on two fronts: simulating from the saturated model generates data that doesn't reflect your fitted model's structure, and comparing raw counts bypasses the deviance statistic entirely. Option B makes the critical error of fixing coefficient estimates at their original values across all simulated datasets. This ignores estimation variability, producing a reference distribution that is too narrow and inflating the apparent significance of any departure. Option D abandons the parametric framework altogether — resampling deviance residuals without replacement is finite-population sampling, not a bootstrap, and assuming normality of the reference distribution defeats the entire motivation of avoiding asymptotic approximations. As a study rule: in any bootstrap test involving estimated parameters, ask whether the procedure refits the model at each iteration. If not, it's almost certainly underestimating variability.

Question 6

A reduced Poisson log-linear model has residual deviance 132132 on 100100 degrees of freedom. Adding three predictors produces a full model with residual deviance 118118 on 9797 degrees of freedom. Assume the observations are independent and the relevant expected counts are sufficiently large.

At the five-percent level, which conclusion is best supported by these results?

  1. The added predictors are significant, but the full model does not show significant lack of fit. (correct answer)
  2. The added predictors are not significant, although the full model shows significant lack of fit.
  3. The added predictors are significant, and the full model also shows significant lack of fit.
  4. Neither the added predictors nor the full-model goodness-of-fit assessment is statistically significant.
Explanation: When analyzing Poisson log-linear models, you typically need to run two separate chi-squared tests: one to assess whether the added predictors improve fit, and another to assess whether the full model itself fits the data adequately. Test 1 — Significance of added predictors (likelihood ratio test): Compare the two models by taking the difference in deviances: 132118=14132 - 118 = 14 on 10097=3100 - 97 = 3 degrees of freedom. You compare this to a χ32\chi^2_3 distribution. The critical value at α=0.05\alpha = 0.05 is approximately 7.817.81. Since 14>7.8114 > 7.81, the three added predictors are statistically significant. Test 2 — Goodness-of-fit of the full model: Use the full model's residual deviance directly: 118118 on 9797 degrees of freedom. The critical value for χ972\chi^2_{97} at α=0.05\alpha = 0.05 is approximately 120.99120.99. Since 118<120.99118 < 120.99, you fail to reject the null hypothesis of adequate fit — the full model does not show significant lack of fit. This confirms answer A: the predictors are significant, but the full model fits adequately. Answer B is wrong because it reverses both conclusions — the predictors are significant and the full model does not show lack of fit. Answer C correctly identifies the predictors as significant but wrongly concludes the full model shows lack of fit (118118 does not exceed the critical value). Answer D misses the significant drop in deviance from adding the predictors. Study tip: Always remember these are two distinct tests — never assume that a significant improvement automatically implies the full model fails goodness-of-fit, or vice versa.

Question 7

An independence model is fitted to a contingency table with 33 row categories and 44 column categories. The likelihood-ratio goodness-of-fit statistic is 13.213.2. However, five of the twelve fitted expected counts are below 11.

Which assessment is most defensible?

  1. Use χ62χ^2_6 and reject definitively because small expected counts make the likelihood-ratio approximation conservative.
  2. Use χ112χ^2_{11} because the saturated multinomial model has one fewer parameter than the number of cells.
  3. Use χ62χ^2_6 without qualification because deviance statistics are unaffected by sparse expected counts.
  4. The nominal reference is χ62χ^2_6, but a conditional or bootstrap calibration is preferable because the table is sparse. (correct answer)
Explanation: Whenever you fit an independence model to a contingency table, two issues arise simultaneously: the degrees of freedom and the validity of the chi-squared approximation. Keep both in mind when the data are sparse. For a 3×43 \times 4 table, the independence model has (31)(41)=6(3-1)(4-1) = 6 degrees of freedom, so the nominal reference distribution is χ62\chi^2_6. Under regular conditions, the likelihood-ratio statistic G2=13.2G^2 = 13.2 would be compared to this distribution and would exceed the critical value near 12.5912.59, suggesting rejection. However, the chi-squared approximation for G2G^2 relies on large expected counts — roughly, all expected counts should exceed 1 and most should exceed 5. Here, five of the twelve expected counts fall below 1, meaning the table is sparse. In sparse settings, the χ2\chi^2 approximation can be unreliable in either direction, so the nominal p-value is untrustworthy. The most defensible path is to acknowledge the χ62\chi^2_6 reference but use a conditional exact test or bootstrap/permutation calibration to obtain valid p-values. That reasoning makes D correct. Choice A is wrong on two counts: the degrees of freedom are correctly 6, but sparsity does not systematically make the approximation conservative — the direction of the bias is unpredictable. Choice B is wrong because it confuses the saturated model's parameter count with degrees of freedom; the correct df is 6, not 11. Choice C is wrong because it falsely claims sparsity is irrelevant — sparse expected counts are precisely when the G2G^2 approximation breaks down most severely. As a study rule: whenever you see small expected counts (especially below 1), always flag the chi-squared approximation as suspect and consider exact or resampling methods, regardless of which test statistic is used.

Question 8

For two independent observations in a Poisson GLM, the observed and fitted means are respectively (0,0.5)(0,0.5) and (4,2)(4,2). Use the convention that the term involving yln(y/μ)y ln(y/μ) equals 00 when y=0y=0.

What is the combined contribution of these observations to the residual deviance?

  1. Approximately 1.551.55, because the zero count contributes no deviance.
  2. Approximately 2.552.55, including a contribution of 1.001.00 from the zero count. (correct answer)
  3. Approximately 3.773.77, obtained by retaining only the logarithmic and fitted-mean terms.
  4. Approximately 5.095.09, because each likelihood discrepancy must be doubled a second time.
Explanation: When working with Poisson GLMs, residual deviance measures how far observed counts stray from their fitted values. The deviance contribution for a single observation is 2[yln ⁣(yμ)(yμ)]2\left[y\ln\!\left(\frac{y}{\mu}\right) - (y - \mu)\right], with the convention that yln(y/μ)=0y\ln(y/\mu) = 0 whenever y=0y = 0. Apply this to each observation. For the first observation, y1=0y_1 = 0 and μ1=0.5\mu_1 = 0.5: the log term vanishes by convention, leaving 2[0(00.5)]=2(0.5)=1.002[0 - (0 - 0.5)] = 2(0.5) = 1.00. Notice that a zero count still contributes deviance through the (yμ)(y - \mu) term — it is not automatically zero. For the second observation, y2=4y_2 = 4 and μ2=2\mu_2 = 2: the contribution is 2[4ln(4/2)(42)]=2[4ln22]=2[2.7732]=2(0.773)1.552\left[4\ln(4/2) - (4-2)\right] = 2[4\ln 2 - 2] = 2[2.773 - 2] = 2(0.773) \approx 1.55. The combined deviance is 1.00+1.55=2.551.00 + 1.55 = 2.55, confirming B. Choice A makes the common mistake of assuming a zero observed count contributes nothing to deviance. While the logarithmic term disappears, the fitted-mean term 2(yμ)=1.00-2(y - \mu) = 1.00 remains and must be included. Choice C drops the (yμ)(y-\mu) correction term entirely, keeping only the log component; this gives roughly 1.55+2.773.771.55 + 2.77 \approx 3.77 but ignores half the deviance formula. Choice D applies an erroneous extra factor of 2 to the already-doubled formula, inflating the result to around 5.095.09. A reliable study tip: always write out the full deviance formula 2[yln(y/μ)(yμ)]2[y\ln(y/\mu) - (y-\mu)] before plugging in numbers. The (yμ)(y-\mu) piece is easy to overlook, especially when y=0y=0.

Question 9

In a logistic regression with binary responses, one predictor completely separates observations with outcomes 11 and 00. As an iterative fitting algorithm proceeds, the residual deviance approaches 00 while the magnitude of the separating coefficient continues to increase.

Which conclusion best explains this behavior?

  1. The model has achieved excellent regular fit, and standard chi-square goodness-of-fit inference remains valid.
  2. The saturated model is misspecified, causing the residual deviance to vanish despite a finite coefficient estimate.
  3. The likelihood supremum occurs at an infinite coefficient, so near-zero deviance does not establish regular model adequacy. (correct answer)
  4. The response variance has been estimated as zero, so the coefficient should be tested using a Gaussian likelihood ratio.
Explanation: Whenever you see a question involving logistic regression where a predictor perfectly separates the two outcome groups, you should immediately think about complete separation and its consequences for maximum likelihood estimation. In logistic regression, the log-likelihood for a binary outcome involves terms like log(p^i)\log(\hat{p}_i) and log(1p^i)\log(1 - \hat{p}_i). When one predictor perfectly separates outcomes, increasing the coefficient β\beta toward ++\infty drives predicted probabilities toward 1 for all Y=1Y=1 cases and toward 0 for all Y=0Y=0 cases, pushing the log-likelihood toward its theoretical maximum of 0. Critically, this maximum is never actually achieved at any finite value of β\beta — the likelihood has a supremum but no maximum. The MLE does not exist in the conventional sense. The iterative algorithm keeps inflating β^\hat{\beta} without converging, and the residual deviance approaches 0 simply because the algorithm is chasing an asymptote. This is exactly what C describes: the likelihood supremum occurs at infinity, so a near-zero deviance does not signal a well-fitted, well-identified model. A is wrong because standard chi-square goodness-of-fit inference requires a proper, finite MLE — that regularity condition fails here. B is wrong because the saturated model is not misspecified; the problem is with the fitted model's parameter space, not the reference model. D is wrong because this phenomenon has nothing to do with response variance or a Gaussian likelihood; it is a structural identifiability problem specific to complete separation. As a study tip: on graduate-level stats exams, questions about near-zero deviance paired with diverging coefficients almost always test your understanding of complete separation and MLE non-existence — not model fit quality.

Question 10

Three observations in a GLM have individual deviance contributions 11, 44, and 99. Their observed responses are, respectively, above, below, and above their fitted means.

Which statement about their deviance residuals is correct?

  1. The residuals are 1,2,31,2,3, and their sum equals the square root of the total deviance.
  2. The residuals are 1,4,91,-4,9, and their ordinary sum equals the total deviance 1414.
  3. The residuals are 1,2,3-1,2,-3, and their squared sum equals the residual degrees of freedom.
  4. The residuals are 1,2,31,-2,3, and their squared sum equals the total deviance 1414. (correct answer)
Explanation: Whenever you see a question about deviance residuals in a GLM, anchor yourself to one key definition: the deviance residual for observation ii is di=sign(yiμ^i)Did_i = \text{sign}(y_i - \hat{\mu}_i)\sqrt{D_i}, where DiD_i is the individual deviance contribution. The sign matches whether the observed value sits above or below its fitted mean, and the magnitude is the square root of the deviance contribution. The total deviance equals di2\sum d_i^2 — the sum of squared deviance residuals. For this problem, the three deviance contributions are 1,4,91, 4, 9, so the magnitudes of the deviance residuals are 1=1\sqrt{1}=1, 4=2\sqrt{4}=2, and 9=3\sqrt{9}=3. The signs come from the direction of each residual: observation 1 is above its mean (+)(+), observation 2 is below ()(-), and observation 3 is above (+)(+). This gives deviance residuals 1,2,31, -2, 3. Their squared sum is 1+4+9=141+4+9=14, which equals the total deviance. That confirms D is correct. A is wrong because it assigns all positive signs, ignoring that observation 2 falls below its mean. It also incorrectly claims the ordinary sum equals the square root of total deviance — that's not a standard property. B is wrong on two counts: deviance residuals use square roots of deviance contributions, not the raw contributions themselves, and the sum of unsquared residuals does not generally equal the total deviance. C gets the signs right but wrong: observation 1 is above its mean, so its residual should be +1+1, not 1-1; also, squared deviance residuals sum to total deviance, not necessarily to the residual degrees of freedom. Your study tip: always remember the formula di=sign(yiμ^i)Did_i = \text{sign}(y_i - \hat{\mu}_i)\sqrt{D_i}, and that di2=Dtotal\sum d_i^2 = D_{\text{total}} — not the unsquared sum.