2

What is an easy to understand step by step procedure on how to compute a distance between a cumulative distribution function and an empirical distribution function given a random sample using Kolmogorov-Smirnov distance.

An actual illustrative implementaton in R would be helpful.

Jesper for President
  • 5,520
  • 2
  • 21
  • 45

1 Answers1

0

The way to compare empirical distributions is to make cumulative distribution functions out of the raw data [use ecdf()] then compare them by plotting [via qqplot()]. And then use KS. Discreet distributions can have direct functions called probability mass functions. Continuous can not because any single realization instance (say 3.57867363474624) can not have a probability, only an interval can (say 3-4). You could compare histograms but ecdf are used far far more often.

ran8
  • 157