public static double calculatePValue(double t,int v){
  return 2 * (1 - StudentsTDistribution.cdf(Math.abs(t),v));
}

public static double calculatePValue ( double t , int v ) { return 2 * ( 1 - StudentsTDistribution . cdf ( Math . abs ( t ) , v ) ) ; }
calculates the two - sided p - value of the underlying t - distribution with v degrees of freedom
