Class WelchTTest

  • All Implemented Interfaces:
    GoodnessOfFitTest

    public class WelchTTest
    extends java.lang.Object
    implements GoodnessOfFitTest
    Calculates a test statistic according to Welch's t test for two samples Supplies methods for calculating the degrees of freedom according to the Welch-Satterthwaite Equation. Also directly calculates a two-sided p-value for the underlying t-distribution.

    Note: if you test i.i.d. normal distributed data, the p-values will be approximately uniformly distributed.

    Since:
    0.5.0
    Author:
    Jan Brusis, Erich Schubert
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  WelchTTest.Par
      Parameterizer, to use the static instance.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static WelchTTest STATIC
      Static instance.
    • Constructor Summary

      Constructors 
      Constructor Description
      WelchTTest()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double deviation​(double[] sample1, double[] sample2)
      Measure the deviation of a full sample from a conditional sample.
      • Methods inherited from class java.lang.Object

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

      • STATIC

        public static final WelchTTest STATIC
        Static instance.
    • Constructor Detail

      • WelchTTest

        public WelchTTest()
        Constructor.
    • Method Detail

      • deviation

        public double deviation​(double[] sample1,
                                double[] sample2)
        Description copied from interface: GoodnessOfFitTest
        Measure the deviation of a full sample from a conditional sample.

        Sample arrays may be modified, e.g., sorted, by the test.

        Specified by:
        deviation in interface GoodnessOfFitTest
        Parameters:
        sample1 - Full sample
        sample2 - Conditional sample
        Returns:
        Deviation