Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Statistics›Two-Sample Kolmogorov-Smirnov Test
Regression model

Two-Sample Kolmogorov-Smirnov Test

Also known as: KS two-sample test, two-sample KS test, İki Örneklem Kolmogorov-Smirnov Testi

The two-sample Kolmogorov-Smirnov test is a nonparametric procedure that asks whether two independent groups are drawn from the same continuous distribution. Building on Smirnov's 1948 tables, it compares the empirical cumulative distribution functions (CDFs) of the two samples and uses their maximum absolute distance as the test statistic.

ScholarGate
  1. Regression model
  2. v1
  3. 2 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Two-Sample Kolmogorov-Smirnov Test
Levene and Brown-Forsyth…Mann-Whitney U testPermutation TestAnderson-Darling TestFligner-Killeen TestKolmogorov-Smirnov TestLilliefors TestMood's Median Test

When to use it

Use it to compare two independent groups on a continuous measurement when you do not want to assume normality and you care about any difference in the whole distribution — not just the mean. It suits data that are continuous, split into two independent groups, with a reasonable sample size (around 20 or more per the StatWise default). Note that tied (repeated) values can affect the result, since the test is built for genuinely continuous data.

Strengths & limitations

Strengths
  • Distribution-free: it makes no normality assumption and works on any continuous data.
  • Detects differences in shape, location, and scale simultaneously, not just a shift in the mean.
  • Simple and easy to apply, with a single interpretable statistic — the maximum CDF gap.
Limitations
  • Statistical power is low in very small samples (n < 10); a permutation test is preferred there.
  • With fewer than 5 observations a comparison of empirical CDFs is essentially meaningless.
  • Tied values violate the continuity assumption and can distort the statistic and its p-value.

Frequently asked

How is the two-sample KS test different from a t-test or Mann-Whitney test?

A t-test compares means and a Mann-Whitney test compares ranks (a stochastic shift). The KS test compares the entire distributions, so it can flag differences in spread or shape even when the central tendencies match.

What does the D statistic actually measure?

D is the largest vertical distance between the two empirical cumulative distribution functions. The bigger this maximum gap, the stronger the evidence that the two samples come from different distributions.

Do tied values cause problems?

Yes. The test assumes continuous data, so repeated (tied) values can affect the statistic and the p-value. If your data are heavily tied or discrete, treat the result cautiously.

What should I do with very small samples?

With n below 10 the KS test has little power, and below 5 the CDF comparison is meaningless. A permutation test (or bootstrap inference for tiny samples) is the better choice.

Sources

  1. Smirnov, N. V. (1948). Table for Estimating the Goodness of Fit of Empirical Distributions. Annals of Mathematical Statistics, 19(2), 279-281. DOI: 10.1214/aoms/1177730256 ↗
  2. Conover, W. J. (1999). Practical Nonparametric Statistics (3rd ed.). Wiley. ISBN: 978-0471160687

How to cite this page

ScholarGate. (2026, June 1). Two-Sample Kolmogorov-Smirnov Test. ScholarGate. https://scholargate.app/en/statistics/kolmogorov-smirnov-2sample

Related methods

Levene and Brown-Forsythe TestMann-Whitney U testPermutation Test

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Levene and Brown-Forsythe TestStatistics↔ compare
  • Mann-Whitney U testStatistics↔ compare
  • Permutation TestStatistics↔ compare
Compare side by side →

Referenced by

Anderson-Darling TestFligner-Killeen TestKolmogorov-Smirnov TestLilliefors TestMood's Median Test

Similar methods

Kolmogorov-Smirnov TestLilliefors TestMann-Whitney U testAnderson-Darling TestIndependent t-testIndependent samples t-testShapiro-Wilk testPermutation Test

Related reference concepts

Rank-Based MethodsNonparametric StatisticsPermutation TestsData Distribution and NormalityKaplan-Meier Survival CurvesStatistical Hypothesis Testing

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Two-Sample Kolmogorov-Smirnov Test (Two-Sample Kolmogorov-Smirnov Test). Retrieved 2026-07-20 from https://scholargate.app/en/statistics/kolmogorov-smirnov-2sample · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
N. V. Smirnov
Year
1948
Type
Nonparametric two-sample distribution test
Statistic
D = sup|F₁(x) − F₂(x)| (maximum distance between empirical CDFs)
Outcome
continuous
MinSample
20
Groups
two independent groups
RequiresNormal
No
Related methods
Levene and Brown-Forsythe TestMann-Whitney U testPermutation Test
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account