public static double pdf(double val,int v){
  return Math.exp(GammaDistribution.logGamma((v + 1) * .5) - GammaDistribution.logGamma(v * .5)) * (1 / Math.sqrt(v * Math.PI)) * Math.pow(1 + (val * val) / v,-((v + 1) * .5));
}

public static double pdf ( double val , int v ) { return Math . exp ( GammaDistribution . logGamma ( ( v + 1 ) * .5 ) - GammaDistribution . logGamma ( v * .5 ) ) * ( 1 / Math . sqrt ( v * Math . PI ) ) * Math . pow ( 1 + ( val * val ) / v , - ( ( v + 1 ) * .5 ) ) ; }
static version of the t distribution ' s pdf .
