UCLA Academic Technology Services HomeServicesClassesContactJobs

SPSS FAQ
How can I test for equality of distribution?

An alternative test to the classic t-test is the Kolmogorov-Smirnov test for equality of distributional functions.  In a simple example, we'll see if the distribution of writing test scores across gender are equal using the hsb2 data set.  We'll first do histograms of writing scores by gender.
get file = 'c:/hsb2.sav'.

sort cases by female.
split file by female.

igraph
 /x1= var(write)
 /y=$count
 /histogram shape=histogram x1interval num = 13.
split file off.

npar test
/k-s = write by female(1 0).
From the test (Kolmogorov-Smirnov Z = 1.738, p = .005), it is apparent that the writing scores do not have the same distributional function across gender.

How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.