How do I perform a Kolmogorov-Smirnov test in Excel? 2

How do I perform a Kolmogorov-Smirnov test in Excel?

The Kolmogorov-Smirnov test is a statistical method used to determine if a dataset follows a specific distribution. In order to perform this test in Excel, you will need to first organize your data into two separate columns, with one column containing the actual data and the other containing the expected values based on the distribution you want to test. Next, you will need to calculate the cumulative distribution function (CDF) for both columns. This can be done by using the “ECDF” function in Excel. Once the CDFs are calculated, you can use the “KSTEST” function to compare the two distributions and determine the p-value. If the p-value is greater than the specified alpha level, the data can be considered to follow the chosen distribution. However, if the p-value is less than the alpha level, the data does not fit the distribution. Using this method, you can easily perform a Kolmogorov-Smirnov test in Excel to analyze the distribution of your data.

Perform a Kolmogorov-Smirnov Test in Excel


The Kolmogorov-Smirnov test is used to determine whether or not or not a sample is .

This test is widely used because many statistical tests and procedures make the that the data is normally distributed.

The following step-by-step example shows how to perform a Kolmogorov-Smirnov test on a sample dataset in Excel.

Step 1: Enter the Data

First, let’s enter the values for a dataset with a sample size of n = 20:

Step 2: Calculate Actual vs. Expected Values from Normal Distribution

Next, we’ll calculate the actual values vs. the expected values from the normal distribution:

Kolmogorov-Smirnov test in Excel

Here is the formula we used in various cells:

  • B2: =ROW() – 1
  • C2: =B2/COUNT($A$2:$A$21)
  • D2: =(B2-1)/COUNT($A$2:$A$21)
  • E2: =IF(C2<1, NORM.S.INV(C2),””)
  • F2: =NORM.DIST(A2, $J$1, $J$2, TRUE)
  • G2: =ABS(F2D2)
  • J1: =AVERAGE(A2:A21)
  • J2: =STDEV.S(A2:A21)
  • J4: =MAX(G2:G21)

Step 3: Interpret the Results

A Kolmogorov-Smirnov test uses the following null and alternative hypotheses:

  • H0: The data is normally distributed.
  • HA: The data is not normally distributed.

To determine if we should reject or fail to reject the null hypothesis we must refer to the Maximum value in the output, which turns out to be 0.10983.

This represents the maximum absolute difference between the actual values of our sample and the expected values from a normal distribution.

To determine if this maximum value is statistically significant, we must refer to a Kolmogorov-Smirnov Table of critical values and find the number equal to n = 20 and α = .05.

Since our maximum value is not greater than this critical value, we fail to reject the null hypothesis.

This means we can assume that our sample data is normally distributed.

Additional Resources

The following tutorials explain how to perform other common statistical tests in Excel:

Cite this article

stats writer (2024). How do I perform a Kolmogorov-Smirnov test in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-do-i-perform-a-kolmogorov-smirnov-test-in-excel/

stats writer. "How do I perform a Kolmogorov-Smirnov test in Excel?." PSYCHOLOGICAL SCALES, 1 Jul. 2024, https://scales.arabpsychology.com/stats/how-do-i-perform-a-kolmogorov-smirnov-test-in-excel/.

stats writer. "How do I perform a Kolmogorov-Smirnov test in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-do-i-perform-a-kolmogorov-smirnov-test-in-excel/.

stats writer (2024) 'How do I perform a Kolmogorov-Smirnov test in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-do-i-perform-a-kolmogorov-smirnov-test-in-excel/.

[1] stats writer, "How do I perform a Kolmogorov-Smirnov test in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, July, 2024.

stats writer. How do I perform a Kolmogorov-Smirnov test in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top