Test tTestEqSize

refs #34
This commit is contained in:
2014-11-11 02:00:58 +01:00
parent 1af305ae3d
commit 7c896fea8d
2 changed files with 17 additions and 0 deletions

View File

@@ -646,6 +646,15 @@ public final class Mathematics {
return result;
}
/**
* Performs two-sample unpaired t test and returns t critical value.
*
* Both samples have to have the same size and equal variance.
*
* @param vector1
* @param vector2
* @return
*/
public static double tTestEqSizeEqVar(double[] vector1, double[] vector2) {
double n = (double) vector1.length;
double mean1 = mean(vector1);