# Comparing two cumulative density functions

I am looking for a method to use to test for equality of two cumulative density functions.

The QQ-plot and the Kolmogorov-Smirnov test are two widely used options. A QQ-plot requires some level of expertise, as the decision is based on your own judgement. See also the answers to this question for more discussion about both tests. I use there the Shapiro-Wilks test for normality, which can be seen as a parametric counterpart of the KS test in case the comparison is made with a normal distribution.

For reference, I'd like to point out the book Comparing Distributions from prof. dr. Olivier Thas. This gives a thorough overview of parametric, semi-parametric and non-parametric approaches to the topic.

Might be worth looking at some variant of the Anderson-Darling or Cramer-von Mises statistics. The latter is essentially a weighted least-squares distance between two CDFs.

Plot their inverses against one another, i.e. make a quantile-quantile plot:

http://en.wikipedia.org/wiki/Q-Q_plot

Take a look at the Kolmogorov–Smirnov test (ks.test in R.)

Lately I've been playing with comparing distributions by computing the difference between their empirical CDFs and then bootstrapping intervals on this difference. Differences between the distributions in location, scale, and each tail all have different and rather noticeable effects on the DECDF function.

• I know this is an old thread, but if you're still considering that idea, take a look at this paper which shows how to create confidence bands that give X% simultaneous (and not just pointwise) coverage for things like quantile-quantile curves, differences in ECDFs, etc. www-stat.wharton.upenn.edu/~buja/PAPERS/paper-sim.pdf – lockedoff Mar 8 '11 at 16:45