## KS-test Statistic

KS test statistic measures the maximum difference between the empirical cumulative distribution function(ECDF) of the two distributions under study. We can define ECDF as below.

{{F}_{n}}\left(x\right)=\frac{k }{n}

where k = 1, 2,3….n and x can take values from x1,x2,…,xn which are ordered in ascending manner. If we want to know if the data distribution with ECDF Fn(x) differs from a known distribution( Normal, uniform, etc.) with cumulative distribution function (CDF) F(x), then KS-test statistic is given as below.

Dn={\mathrm{max}}\left|F_n\left(x\right)-F\left(x\right)\right|

The calculation of the KS test statistic is depicted in the following figure.

## No Responses Yet