double t = Math.abs(t(m1, m2, v1, v2, n1, n2));
double degreesOfFreedom = 0;
degreesOfFreedom= df(v1, v2, n1, n2);
TDistribution tDistribution =
getDistributionFactory().createTDistribution(degreesOfFreedom);
return 1.0 - tDistribution.cumulativeProbability(-t, t);
}
/**
* Computes p-value for 2-sided, 2-sample t-test, under the assumption
* of equal subpopulation variances.