Kolmogorov-Smirnov PDF
y = distfun_kspdf(x,N)
a matrix of doubles, the outcome. x in [0,1]
a matrix of doubles , the number of observations. N belongs to the set {1,2,3,4,.......,2147483647}
a matrix of doubles, the probability density.
Computes the probability distribution function of the Kolmogorov-Smirnov distribution function.
Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.
// Check with x scalar, N scalar, pr scalar y = distfun_kspdf(0.274,10) expected = 0.0175879 // Plot the function scf(); x = linspace(0,1); y1 = distfun_kspdf(x,5); plot(x,y1,"b-") y2 = distfun_kspdf(x,10); plot(x,y2,"g-") y3 = distfun_kspdf(x,20); plot(x,y3,"r-") legend(["N=5","N=10","N=20"]); xtitle("Kolmogorov-Smirnov PDF","x","P(X=x)") | ![]() | ![]() |
http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test