statistics

kolmogorov smirnov test

Comparing two distributions by the largest gap between their cumulative curves, without binning.
8 related articles

Description

The Kolmogorov–Smirnov (KS) test is a nonparametric method to compare two probability distributions, or a sample against a theoretical distribution, by measuring the largest vertical distance between their cumulative distribution functions. Unlike many tests, it does not require binning the data, so it avoids arbitrary choices of bin width and works well with small samples. It is a powerful tool for checking whether a dataset follows a hypothesized distribution or whether two datasets come from the same underlying distribution.

History

The test was introduced by Andrey Kolmogorov in 1933 for the one-sample case, and extended by Nikolai Smirnov in 1939 for the two-sample case.

How it works

You compute the empirical cumulative distribution function (CDF) from your data — a step function that jumps at each data point. For a two-sample test, you do this for both samples. The test statistic is the supremum (maximum) of the absolute difference between the two CDFs. The null hypothesis that the two distributions are identical is rejected if this statistic exceeds a critical value, which depends on the sample sizes and the desired significance level. The test is distribution-free, meaning its critical values do not depend on the underlying distribution, only on sample sizes.

In practice

It is used in astronomy to compare the distribution of galaxy properties across different populations, and in particle physics to validate that a Monte Carlo simulation matches real data.

Fun fact

The KS test is most sensitive to differences in the middle of the distribution and less sensitive at the tails, which can be a drawback when you care about rare events.

Concept graph →

Related articles · 8

Double Echo from the Depths of the Atmosphere: How SKA-Low Will Catch Rare Showers
A storm in the upper atmosphere lasts a few millionths of a second. A cosmic ray, a proton or a helium nucleus, strikes air molecules, sending a swarm of particles downward. Most of them stay together, but occasionally one particle gains so much energy that it surges ahead.
Cosmology2026-07-083 minarXiv:2607.06959
Cosmic Tuning Fork: KLT-Net Neural Network Rewrites the Distance Ladder
Modern cosmology has hit a dissonant chord. Local measurements of the Hubble constant from supernovae and Cepheids give around 73 km/s/Mpc, while global constraints from the cosmic microwave background within the standard ΛCDM model point to 67 km/s/Mpc.
Gravitational Choreography: Pulsars vs. LISA
A pair of neutron stars, locked in a gravitational embrace, traces invisible circles in the void. A century ago, Albert Einstein described this dance as waves of curved geometry, but for a long time we could only catch glimpses — through the feverish flicker of radio pulses.
Instrumentation2026-05-011 minarXiv:2605.00391express
Cosmology2026-04-151 minarXiv:2604.14327express
Gravity on a Cosmic Ruler
Take two heavy balls and place them a meter apart: they attract each other with a force that weakens by a factor of four when you double the distance. Newton discovered this law, and it works in a room, in the solar system, in a galaxy. But does it still hold when we're talking about hundreds of millions of light-years? Astronomers found a way to test this directly.
Fluid Dynamics2026-03-091 minarXiv:2603.08407express
Droplets in a Whirlwind of Air
In turbulent air, droplets don't fly in straight lines: they get tossed around like dust motes in a beam of light. Physicists have built a setup that tracks each droplet, which is about a tenth of the thickness of a human hair. A camera captures their motion, and a computer reconstructs their trajectories.
Cosmology2026-02-171 minarXiv:2602.15688express
Light Bent by the Invisible
Light from the earliest epoch of the universe has been traveling toward us for billions of years. On its way, it passes by enormous galaxy clusters. Their gravity slightly bends this light, just as a shop window distorts the view of the street behind it. As clusters grow, the bending becomes more noticeable. This effect is known as the Rees-Sciama effect.
Fluid Dynamics2026-01-031 minarXiv:2601.01258express
How Bottom Friction Reshapes Vortices in Shallow Water
Water in a puddle after rain swirls differently than in a deep lake. A thin layer of fluid feels the bottom, and that changes the nature of its vortices. Scientists created such a layer in the lab: they poured in an electrolyte, ran a current and a magnetic field, and the fluid began to move.