public static double pdf(double x,double mu,double shape){
  if (!(x > 0) || x == Double.POSITIVE_INFINITY) {
    return 0;
  }
  final double v=(x - mu) / mu;
  double t1=Math.sqrt(shape / (MathUtil.TWOPI * x * x* x));
  return t1 > 0 ? t1 * Math.exp(-shape * v * v* .5 / x) : 0;
}

public static double pdf ( double x , double mu , double shape ) { if ( ! ( x > 0 ) || x == Double . POSITIVE_INFINITY ) { return 0 ; } final double v = ( x - mu ) / mu ; double t1 = Math . sqrt ( shape / ( MathUtil . TWOPI * x * x * x ) ) ; return t1 > 0 ? t1 * Math . exp ( - shape * v * v * .5 / x ) : 0 ; }
probability density function of the wald distribution .
