Quantify distribution agreement for spectra, noise, and timing data quickly in labs. Choose model or second sample, then obtain D and p-values instantly today.
Enter numbers separated by commas, spaces, or new lines. For one-sample tests, choose a reference model. For two-sample tests, provide both datasets.
These values resemble normalized detector noise samples from two runs.
| Index | Sample A | Sample B |
|---|---|---|
| 1 | 0.12 | 0.1 |
| 2 | 0.15 | 0.14 |
| 3 | 0.18 | 0.17 |
| 4 | 0.21 | 0.2 |
| 5 | 0.23 | 0.24 |
| 6 | 0.26 | 0.25 |
| 7 | 0.28 | 0.29 |
| 8 | 0.31 | 0.3 |
| 9 | 0.33 | 0.35 |
| 10 | 0.36 | 0.38 |
Empirical CDF: For sorted values x(i), Fn(x(i)) = i/n.
One-sample statistic: D = max_x |Fn(x) - F(x)|, where F(x) is the model CDF.
Two-sample statistic: D = max_x |F(n1)(x) - F(n2)(x)|.
This tool estimates the two-sided p-value using the standard asymptotic Kolmogorov distribution with an effective sample size correction.
The Kolmogorov-Smirnov (KS) test quantifies how closely an observed sample follows a reference distribution, or whether two measured samples appear drawn from the same parent process. In physics, it is widely used for validating noise assumptions, checking arrival-time statistics, comparing spectra, and screening simulation outputs against lab data.
Use the one-sample option when you have a theoretical or design expectation, such as Gaussian readout noise or uniform timing jitter across a gate. The calculator builds the empirical cumulative distribution from the sorted sample and compares it to the chosen model CDF. It then reports the maximum deviation D, plus an approximate p-value.
Use the two-sample option when comparing two measurement campaigns, two detectors, or a baseline run against a modified configuration. Because it compares two empirical cumulative distributions directly, no parametric model is required. This makes it practical for quick stability checks, drift detection, and identifying subtle distribution shifts beyond mean and variance.
For normal comparisons, set the mean and standard deviation based on your expected operating regime or independent calibration. For exponential behavior, specify the rate lambda for decay-like waiting times. For a uniform check, define the minimum and maximum bounds. Incorrect parameters can inflate D, so keep the model aligned with the physics and instrumentation.
D is the largest vertical distance between the two cumulative curves. A small D means the curves nearly overlap across the full value range, including tails. A large D indicates systematic differences, such as heavier tails, offsets, or multimodal behavior. In practice, D captures shape differences that simple summary statistics can miss.
The p-value estimates how likely it is to observe a deviation at least as large as D under the null hypothesis. If p is below your chosen alpha (commonly 0.05), you have evidence to reject the null. For exploratory screening, alpha 0.10 is sometimes used; for stricter claims, 0.01 is common.
Use consistent units and remove non-numeric tokens before pasting. For time-series-derived samples, avoid oversampling strongly correlated points; independence improves interpretability. If you suspect outliers are real physics, keep them; if they are artifacts, fix the acquisition pipeline instead of trimming blindly. Document preprocessing to support reproducibility.
For lab notes, record the test type, sample sizes, D, p-value, and alpha. When comparing conditions, include context such as temperature, bandwidth, integration time, and detector settings. The CSV export supports quick import into analysis notebooks, while the PDF export provides a compact attachment for reports and QA documentation.
It measures the maximum difference between cumulative distribution functions, capturing shape and tail differences, not just averages. The statistic D summarizes that maximum deviation.
Use one-sample to compare measured data to an assumed model. Use two-sample to compare two measured datasets directly when you do not want to assume a parametric distribution.
No. The test works on the sorted raw values through cumulative distributions, so you avoid bin-size choices that can hide or exaggerate differences.
More is better. With very small samples, the test has limited power and p-values can be unstable. Aim for at least a few dozen points when possible, and interpret borderline results cautiously.
Then the one-sample p-value can be optimistic because the model was tuned to the data. Prefer parameters from independent calibration, or treat results as descriptive rather than confirmatory.
Exponential CDF assumes nonnegative support. Negative values usually indicate a baseline shift or preprocessing issue. Consider re-centering, choosing a different model, or using the two-sample test instead.
This calculator uses a standard asymptotic approximation that becomes more accurate as sample sizes grow. For tiny samples or special cases, exact methods may differ slightly.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.