# 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

Content
Here we are going to cover

## 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

## 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

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