public static double pdf(double x,double mu,double sigma,double lambda){
  final double dx=x - mu;
  final double lss=lambda * sigma * sigma;
  final double erfc=NormalDistribution.erfc((lss - dx) / (sigma * MathUtil.SQRT2));
  return erfc > 0. ? .5 * lambda * Math.exp(lambda * (lss * .5 - dx))* erfc : 0.;
}

public static double pdf ( double x , double mu , double sigma , double lambda ) { final double dx = x - mu ; final double lss = lambda * sigma * sigma ; final double erfc = NormalDistribution . erfc ( ( lss - dx ) / ( sigma * MathUtil . SQRT2 ) ) ; return erfc > 0. ? .5 * lambda * Math . exp ( lambda * ( lss * .5 - dx ) ) * erfc : 0. ; }
probability density function of the exgaussian distribution .
