2
$\begingroup$

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.

$\endgroup$

1 Answer 1

0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.