public static double exponentialCdf(double x, double lamda) {
        if(x<0 || lamda<=0) {
            throw new IllegalArgumentException("All the parameters must be positive.");
        }
        
        double probability = 1.0 - Math.exp(-lamda*x);
        
        return probability;
    }
public static double exponentialCdf ( double x , double lamda ) { if ( x < 0 || lamda <= 0 ) { throw new IllegalArgumentException ( "All the parameters must be positive." ) ; } double probability = 1.0 - Math . exp ( - lamda * x ) ; return probability ; }
Calculates the probability from 0 to X under Exponential Distribution

@param x
@param lamda
@return