code: public static double binomialCdf(int k, double p, int n) {
          if(k<0 ||  p<0 || n<1) {
              throw new IllegalArgumentException("All the parameters must be positive and n larger than 1.");
          }
          
          k = Math.min(k, n);
          
          double probabilitySum = approxBinomialCdf(k,p,n); 
          
          return probabilitySum;
      }
docs: Returns the cumulative probability of k of a specific number of tries n and probability p
  
  @param k
  @param p
  @param n
  @return