How do I perform a Kolmogorov-Smirnov Test in SAS? 2

How do I perform a Kolmogorov-Smirnov Test in SAS?

The Kolmogorov-Smirnov Test is a statistical test used to compare two probability distributions. In SAS, the test can be performed by using the PROC UNIVARIATE procedure. This procedure allows the user to specify the two datasets to be compared and the desired level of significance. The output of the test includes a D statistic and corresponding p-value, which can be used to determine if the two distributions are significantly different. The Kolmogorov-Smirnov Test in SAS is a useful tool for analyzing data and making informed decisions based on the comparison of probability distributions.

Perform a Kolmogorov-Smirnov Test in SAS


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 SAS.

Example: Kolmogorov-Smirnov Test in SAS

First, let’s create a dataset in SAS with a sample size of n = 20:

/*create dataset*/
data my_data;
    input Values;
    datalines;
5.57
8.32
8.35
8.74
8.75
9.38
9.91
9.96
10.36
10.65
10.77
10.97
11.15
11.18
11.47
11.64
11.88
12.24
13.02
13.19
;
run;

Next, we’ll use proc univariate to perform a Kolmogorov-Smirnov test to determine if the sample is normally distributed:

/*perform Kolmogorov-Smirnov test*/
proc univariatedata=my_data;
   histogram Values / normal(mu=est sigma=est);
run;

At the bottom of the output we can see the test statistic and corresponding p-value of the Kolmogorov-Smirnov test:

Kolmogorov-Smirnov test in SAS

The test statistic is 0.1098 and the corresponding p-value is >0.150.

Recall that a Kolmogorov-Smirnov test uses the following null and alternative hypotheses:

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

Since the p-value from the test is not less than .05, we fail to reject the null hypothesis.

This means we can assume that the dataset is normally distributed.

Additional Resources

The following tutorials explain how to perform a Kolmogorov-Smirnov test in other statistical software:

Cite this article

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

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

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

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

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

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

Download Post (.PDF)

Comments are closed.

Slide Up
x
PDF
Scroll to Top