Kolmogorov Smirnov Test : CDF vs PDF 
Does anyone know that why in the Kolmogorov-Smirnov Test, the empirical distribution function is compared with the cumulative distribution function and not the probability distribution function? Is there a reason behind this?
Source: https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test

The Kolmogorov Smirnov test uses the cumulative distribution function, because that's what the Kolmogorov Smirnov test is.
There are other tests that use a comparison with the density function rather than the cumulative distribution function, and they have different names.
Well known tests are Pearson's chi-squared test and the G-test.
Those tests work best for distributions describing a categorical or discrete variable, but they can be applied to continuous distributions as well. With continuous distributions you first transform the data to discrete data by binning (this post provides a lot of information about this binning when it is done based on the data).
In a certain sense this binning (based on the data) is almost the same as the Kolmogorov Smirnov test where the binning is done in a cumulative way.
