Kolmogorov-Smirnov Test

Basic EDF test that measures maximum distance between empirical and theoretical CDFs.

Test Overview

Statistical Foundation

Test Statistic (D):

The Kolmogorov-Smirnov statistic D represents the maximum vertical distance between the empirical and theoretical cumulative distribution functions across all possible values.

Kolmogorov-Smirnov test statistic

Fn(x)

= empirical cumulative distribution function

F0(x)

= theoretical (normal) cumulative distribution function

F0(x) uses the sample mean and standard deviation as plug-in estimates of the population parameters.

Critical Values:

• For α = 0.05: D_critical = 1.36/√n

• For α = 0.01: D_critical = 1.63/√n

• For α = 0.10: D_critical = 1.22/√n

• Values decrease as sample size increases

Decision Rule:

• D > D_critical: Reject normality

• D ≤ D_critical: Fail to reject normality

• Smaller D values indicate better fit

• Range: 0 ≤ D ≤ 1

Test Procedure:

Step 1: Calculate Empirical CDF

F_n(x_i) = i/n for ordered observations x_(1) ≤ x_(2) ≤ ... ≤ x_(n)

Step 2: Calculate Theoretical CDF

F_0(x_i) = Φ((x_i - μ̂)/σ̂) where μ̂ and σ̂ are sample estimates

Step 3: Find Maximum Difference

D = max_i |F_n(x_i) - F_0(x_i)|

Reading the Kolmogorov-Smirnov ECDF Comparison

Interpretation Guidelines

Decision Framework:

Normal Distribution (D ≤ Critical):

Non-Normal (D > Critical):

Sample Size Considerations:

Small (n < 30)

Lower power, may miss departures. Use exact p-values when available.

Medium (30-100)

Good balance of power and stability. Asymptotic approximation reliable.

Large (> 100)

High power but may detect trivial departures from normality.

Practical Guidelines:

When to Use Kolmogorov-Smirnov:

Important Limitation:

Due to its conservative nature, the KS test may fail to detect departures from normality that other tests would catch. Consider using it alongside more powerful tests like Shapiro-Wilk or Anderson-Darling for comprehensive assessment.

Implementation Guide

Assumptions & Limitations

Key Assumptions:

Independent Observations

Data points must be independent with no correlation structure

Continuous Distribution

Designed for continuous data - performance degrades with discrete variables

Random Sampling

Sample should be representative of the target population

Test Performance Characteristics:

✅ Strengths:

❌ Weaknesses:

Practical Limitations:

• Conservative bias: Tends to accept normality even when moderate departures exist

• Uniform sensitivity: Treats all regions of the distribution equally, missing tail-specific issues

• Parameter estimation: Critical values change when parameters are estimated from data

• Tied observations: Performance degrades significantly with discrete or rounded data

Example Data Layout for Kolmogorov-Smirnov Test

Single column of continuous data for overall distribution shape testing. Sample Size Recommendation: Minimum 8 observations required, but 30+ recommended for good statistical power in distribution shape assessment.

This is how your spreadsheet or CSV file should be structured before you upload it. Match the column names, keep one row per observation, and leave the analysis to the platform.

Single column of continuous data for Kolmogorov-Smirnov normality testing. Tests maximum deviation between empirical and theoretical CDFs. Sample Size Recommendation: Works with any sample size, but minimum 20 observations recommended for meaningful results, preferably 50+ for reliable asymptotic approximation.