Two-Sample Kolmogorov-Smirnov Test
The two-sample Kolmogorov-Smirnov test compares two independent samples by the largest vertical distance D between their empirical cumulative distribution functions.
두 표본 Kolmogorov-Smirnov 검정은 독립된 두 표본의 경험적 누적분포함수 사이의 최대 수직 거리 D 로 두 분포가 같은지 검정하는 방법입니다.
Do the response-time distributions of two independent groups differ in any way, not just in their means?
독립된 두 집단의 반응시간 분포가 평균뿐 아니라 어떤 식으로든 다른지 확인하고 싶어요.
Compute the empirical CDF of each group and take the maximum absolute difference D; its exact null distribution is used for small samples and the asymptotic Kolmogorov distribution for large ones. A small p indicates that the two distributions differ in location, spread or shape.
When to use Two-Sample Kolmogorov-Smirnov Test
- You want to detect any difference between two distributions, not only a shift in location.
- The outcome is continuous and the two samples are independent.
- You need a nonparametric check of whether two samples could come from the same population.
When to use something else
- You only care about a location shift; use the Mann-Whitney U test, which has more power for that.
- Differences are expected mainly in the tails; use the Anderson-Darling k-sample test instead.
Assumptions and requirements
- Two independent random samples.
- A continuous outcome; ties make the p-value conservative.
What the analysis reports
- D statistic with one-sided D+ and D- components
- Exact or asymptotic p-value with the method used
- Location of the maximum distance
- Group sizes, medians, means and SDs
How to report it
A two-sample Kolmogorov-Smirnov test indicated that the distributions of [group 1] (n = [value]) and [group 2] (n = [value]) differed, D = [value], p = [value].
Related methods
Run Two-Sample Kolmogorov-Smirnov Test on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and a grouping variable
- Price
- 150 credits for one analysis up to 10,000 rows (complexity level 1); larger or wider data costs more. Optional methodologist review: 900 credits.
- Checking
- Checked by property tests in every deployment
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.