Compare Kolmogorov-Smirnov, Shapiro-Wilk, Anderson-Darling and chi-square goodness-of-fit tests and when to use each

Quick Overview

Asks how the Kolmogorov-Smirnov, Shapiro-Wilk, Anderson-Darling and chi-square goodness-of-fit tests differ and when each one fits. Tests knowledge of what each statistic measures, the assumptions behind each test, and how sample size changes what a rejection means.

Compare Kolmogorov-Smirnov, Shapiro-Wilk, Anderson-Darling and chi-square goodness-of-fit tests and when to use each

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Other

What are some common goodness-of-fit tests (for example Kolmogorov-Smirnov, Shapiro-Wilk, Anderson-Darling and chi-square), and when would you use each to check distributional assumptions? ```hint What each statistic looks at For each test, ask what quantity it computes from the sample and which part of the distribution (the center or the tails) that quantity is most sensitive to. ``` ```hint Read the fine print Check what each test assumes about the hypothesized distribution: is it continuous or discrete, and are its parameters fixed in advance or estimated from the same data? ``` ### What a Strong Answer Covers - What each test measures and the null hypothesis it tests - Each test's restrictions: continuous versus discrete data, known versus estimated parameters, binning and expected counts - Where each test is most sensitive and how that guides the choice - How sample size affects the result, the role of Q-Q plots, and whether the assumption being checked matters for the analysis that follows ### Follow-up Questions - You estimated the mean and variance from the sample and then ran a K-S test against that normal distribution. What is wrong with the p-value, and how do you fix it? - With 2 million rows, Shapiro-Wilk rejects normality of your regression residuals. What do you do next? - How do the degrees of freedom of a chi-square goodness-of-fit test change when you estimate parameters from the data? - How would you test whether two samples come from the same distribution without specifying what that distribution is?

Overview: Asks how the Kolmogorov-Smirnov, Shapiro-Wilk, Anderson-Darling and chi-square goodness-of-fit tests differ and when each one fits. Tests knowledge of what each statistic measures, the assumptions behind each test, and how sample size changes what a rejection means.

Nov 25, 2026
mediumData ScientistOtherStatistics & Math
0
0

What are some common goodness-of-fit tests (for example Kolmogorov-Smirnov, Shapiro-Wilk, Anderson-Darling and chi-square), and when would you use each to check distributional assumptions?

What a Strong Answer Covers Guidance

  • What each test measures and the null hypothesis it tests
  • Each test's restrictions: continuous versus discrete data, known versus estimated parameters, binning and expected counts
  • Where each test is most sensitive and how that guides the choice
  • How sample size affects the result, the role of Q-Q plots, and whether the assumption being checked matters for the analysis that follows

Follow-up Questions Guidance

  • You estimated the mean and variance from the sample and then ran a K-S test against that normal distribution. What is wrong with the p-value, and how do you fix it?
  • With 2 million rows, Shapiro-Wilk rejects normality of your regression residuals. What do you do next?
  • How do the degrees of freedom of a chi-square goodness-of-fit test change when you estimate parameters from the data?
  • How would you test whether two samples come from the same distribution without specifying what that distribution is?