Kolmogorov-Smirnov Goodness of Fit Test

In this lesson, we are going to discuss the Kolmogorov-Smirnov Goodness of Fit test, how and when to perform it.
Remember that the Kolmogorov-Smirnov Goodness of Fit test is one of the non-parametric tests discussed previously. See What are Non-Parametric Tests

Here we are going to cover

  1. What is Kolmogorov-Smrmov Test
  2. When to use the K-S Test
  3. How to Perform the Kolmogorov-Smirmov Test
  4. Komogorove-Smirnov Test P-Value Table
  5. Pros and Cons of the Kolmogorov-Smirnov Test
  6. Final Notes

1. What is the Kolmogorov-Smirnov Test(K-S Test)?

The K-S Goodness of Fit Test is a non-parametric test that compares a given data with a known distribution and helps you determine if they have the same distribution.
The K-S test does not assume any particular distribution.

2. When to Apply the K-S Test

The K-S test is applied to test the normality of your data to see if it comes from a normally-distributed population.
It is also used in Analyis of Variance(ANOVA) to check the assumption of normality.
In summary, the K-S test can be used to answer the following questions:

  • Is the data taken from a normal distribution?
  • Is the data taken from a  log-normal distribution?
  • Is the data taken from an exponential distribution?
  • Is the data taken from a logistic distribution?

3. How to Perform the Kolmogorov-Smirnov Test

Follow the steps the peform the K-S Test

Step 1: Set up the Null and alternate hypothesis
This could be of the form
H0: The groups are independent
Ha: The values are not dependent

Step 2: Create the EDF for your data
EDF stands for Empirical Distribution Function

Step 3: Specify a parent distribution
This is the distribution that you will like to compare your sample data to

Step 4:Plot the two distributions togeter

Step 5: Measure the greatest vertical distance between the two graphs

Step 6: Calculate the Test Statistic

Step 7: Find the Critical Value from the K-S table

Step 8: Compare the Crital Value to the calculated value

Step 9: State your conclution

4. The K-S Test P-Value Table

This is a statistical table just like other tables used to look up critical values of statistics.
To get the P-Value, you need:

  • degrees of freedom
  • level of significance

5. Pros and Cons of Kolmogorov-Smirnov Test

The Kolmogorov-Smirnov test has both advantages and disadvantages as highlighted below

Benefits of the K-S Test

  • It can be used as goodness of fit test following regression analysis
  • There are no restrictions ion the sample size. This means that small samples could work as well
  • K-S tables are easily available
  • The Test  is distribution-free

Disadvantages of the K-S Test
It only applies to continuous distribution
It tends to be more sensitive near the middle of the distribution than at the tails
The distribution to be copared with must be fully  specified

6. Final Notes

As you can see from the discussion, the K-S test has a number of benefits but also disadvantages. Additionally, it’s better to used applications like MS Excel, SPSS or other packages to easily carry out this test.