public static double kolmogorovSmirnovCDF(double x){
  double sum=0.0;
  for (int i=0; i < 100; i++) {
    sum+=Math.pow(Math.E,(-1 * Math.pow((2 * i) - 1,2) * Math.pow(Math.PI,2)) / Math.pow(8 * x,2));
  }
  double estimatedValue=sum * (Math.sqrt(2 * Math.PI) / x);
  return estimatedValue;
}

public static double kolmogorovSmirnovCDF ( double x ) { double sum = 0.0 ; for ( int i = 0 ; i < 100 ; i ++ ) { sum += Math . pow ( Math . E , ( - 1 * Math . pow ( ( 2 * i ) - 1 , 2 ) * Math . pow ( Math . PI , 2 ) ) / Math . pow ( 8 * x , 2 ) ) ; } double estimatedValue = sum * ( Math . sqrt ( 2 * Math . PI ) / x ) ; return estimatedValue ; }
estimates values of the kolmogorov - smirnov cdf to 100 iterations
