Class TTestHelper


  • public class TTestHelper
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TTestHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double cohend​(double[] sample1, double[] sample2)
      Calculates the effect size between the two sample arrays according to Cohen'd for a two-tailed t-test with unequal variance
      static double cohend​(double m1, double m2, double v1, double v2, int n1, int n2)
      Calculates the effect size according Cohen's d for a two-tailed t-test with unequal variance.
      static double tTest​(double[] sample1, double[] sample2)
      Manually calculates the p-value of Welch's t-test for the two given sample arrays.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TTestHelper

        public TTestHelper()
    • Method Detail

      • tTest

        public static double tTest​(double[] sample1,
                                   double[] sample2)
        Manually calculates the p-value of Welch's t-test for the two given sample arrays.
        Parameters:
        sample1 - double array of sample values.
        sample2 - double array of sample values.
        Returns:
        p-value
      • cohend

        public static double cohend​(double[] sample1,
                                    double[] sample2)
        Calculates the effect size between the two sample arrays according to Cohen'd for a two-tailed t-test with unequal variance
        Parameters:
        sample1 - Non-empty array of values from population 1.
        sample2 - Non-empty array of values from population 2.
        Returns:
        Effect size according to Cohen's d.
      • cohend

        public static double cohend​(double m1,
                                    double m2,
                                    double v1,
                                    double v2,
                                    int n1,
                                    int n2)
        Calculates the effect size according Cohen's d for a two-tailed t-test with unequal variance.
        Parameters:
        m1 - Mean of sample 1.
        m2 - Mean of sample 2.
        v1 - Variance of sample 1.
        v2 - Variance of sample 2.
        n1 - Size of sample 1.
        n2 - Size of sample 2.
        Returns:
        Effect size according to Cohen's d.