public static double logpdf(double x,double k,double lambda,double theta){
  if (x <= theta || x == Double.POSITIVE_INFINITY) {
    return Double.NEGATIVE_INFINITY;
  }
  double xl=(x - theta) / lambda;
  return Math.log(k / lambda) + (k - 1) * Math.log(xl) - Math.pow(xl,k);
}

public static double logpdf ( double x , double k , double lambda , double theta ) { if ( x <= theta || x == Double . POSITIVE_INFINITY ) { return Double . NEGATIVE_INFINITY ; } double xl = ( x - theta ) / lambda ; return Math . log ( k / lambda ) + ( k - 1 ) * Math . log ( xl ) - Math . pow ( xl , k ) ; }
pdf of weibull distribution
