Kolmogorov-Smirnov One Sample Test Calculator

Analyze empirical fit using strong one sample statistics. Check D statistics, p estimates, and limits. Download reports and inspect plots with practical interpretation notes.

Calculator input

Example input: 3.1, 2.9, 4.4, 3.7, 4.1, 3.3, 3.8, 4.0, 2.7, 3.5

Example data table

Observation Value Observation Value Observation Value
13.1054.1092.70
22.9063.30103.50
34.4073.80114.20
43.7084.00123.60

Formula used

The one sample Kolmogorov-Smirnov test compares the empirical cumulative distribution function, written as Fn(x), with a chosen theoretical cumulative distribution F(x). The empirical step function increases by 1 divided by n at each ordered observation.

For sorted values x1 through xn, the positive gap is D+ = max[i/n - F(xi)] and the negative gap is D- = max[F(xi) - (i-1)/n]. The test statistic is D = max(D+, D-). Larger D values show greater disagreement.

This page also reports an asymptotic p value using the Smirnov approximation. Critical values use c(alpha) divided by the square root of n for common alpha levels. These reference values are most appropriate when the theoretical distribution is fully specified before seeing the sample.

Distribution functions used here are the normal cumulative distribution with mean and standard deviation, the uniform cumulative distribution over a fixed interval, the exponential cumulative distribution with rate lambda, and the lognormal cumulative distribution based on log scale parameters.

How to use this calculator

Enter a sample name if you want a labeled report. Paste one numeric observation list into the sample box. You can separate values with commas, spaces, semicolons, or new lines.

Select the theoretical distribution that represents your null hypothesis. For specified models, enter the required parameters. For the fitted normal option, the page estimates the sample mean and sample standard deviation automatically, then marks the result as exploratory.

Choose an alpha level and the number of displayed decimals. Submit the form to generate the result panel above the calculator. Review the D statistic, approximate p value, decision statement, chart, and row level calculation table.

Use the CSV option when you want spreadsheet friendly output. Use the PDF option when you need a report to share. The chart helps you inspect where the empirical distribution departs from the theoretical curve.

Frequently asked questions

1. What does the one sample Kolmogorov-Smirnov test measure?

It measures the largest vertical distance between the empirical cumulative distribution of your sample and a chosen theoretical cumulative distribution.

2. When should I avoid this test?

Avoid it for clearly discrete outcomes, extremely small samples, or situations where ties dominate and continuity assumptions are not reasonable.

3. What is the difference between D+, D-, and D?

D+ captures the maximum upward gap, D- captures the maximum downward gap, and D is the larger of the two.

4. Can I use fitted normal parameters here?

Yes, but treat that mode as exploratory. Standard one sample critical values are designed for distributions specified before observing the sample.

5. Why does the chart matter?

The chart shows where the empirical step curve departs from the theoretical curve, helping you interpret the location of disagreement.

6. What does a small p value imply?

A small p value suggests your sample is unlikely under the selected theoretical distribution, so the null model may not fit well.

7. Can I export the result?

Yes. CSV export gives a data table for further analysis, and PDF export creates a compact report for sharing or archiving.

8. Does the calculator sort my sample automatically?

Yes. The test requires ordered data, so the calculator sorts the observations internally before computing cumulative differences.

Related Calculators

Mann-Whitney U Test CalculatorKruskal-Wallis H Test CalculatorKendall Tau Correlation CalculatorChi-Square Goodness of Fit CalculatorSign Test CalculatorKolmogorov-Smirnov Two Sample Test CalculatorJonckheere-Terpstra Trend Test CalculatorMcNemar Test CalculatorFisher Exact Test CalculatorBinomial Sign Test Calculator

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.