MOEA Framework 2.12
API Specification

org.moeaframework.util.statistics
Class SingleSampleTTest

java.lang.Object
  extended by org.moeaframework.util.statistics.IntervalRatioStatisticalTest
      extended by org.moeaframework.util.statistics.SingleSampleTTest
All Implemented Interfaces:
StatisticalTest

public class SingleSampleTTest
extends IntervalRatioStatisticalTest

The Single-Sample t test determines if the population's mean equals some specified value.

Assumptions:

  1. Samples are randomly selected from the population
  2. The distribution of the underlying population is normal

References:

  1. Sheskin, D.J. "Handbook of Parametric and Nonparametric Statistical Procedures, Third Edition." Chapman & Hall/CRC. 2004.


Field Summary
 
Fields inherited from class org.moeaframework.util.statistics.IntervalRatioStatisticalTest
data, numberOfGroups
 
Constructor Summary
SingleSampleTTest(double mean)
          Constructs a single-sample T test with the specified mean.
 
Method Summary
 void add(double value)
          Adds a new observation with the specified value.
 void addAll(double[] values)
          Adds several new observations with the specified values.
 double getMean()
          Returns the value being tested against the population mean.
 boolean test(double alpha)
          Returns true if the null hypothesis is rejected; false otherwise.
 
Methods inherited from class org.moeaframework.util.statistics.IntervalRatioStatisticalTest
add, addAll, categorize, getNumberOfGroups
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleSampleTTest

public SingleSampleTTest(double mean)
Constructs a single-sample T test with the specified mean.

Parameters:
mean - the value being tested against the population mean
Method Detail

getMean

public double getMean()
Returns the value being tested against the population mean.

Returns:
the value being tested against the population mean

add

public void add(double value)
Adds a new observation with the specified value.

Parameters:
value - the value of the new observation

addAll

public void addAll(double[] values)
Adds several new observations with the specified values.

Parameters:
values - the values of the new observations

test

public boolean test(double alpha)
Returns true if the null hypothesis is rejected; false otherwise. The meaning of the null hypothesis and alternative hypothesis depends on the specific test.

The prespecified level of confidence, alpha, can be used for either one-tailed or two-tailed (directional or nondirectional) distributions, depending on the specific test. Some tests may only support specific values for alpha.

Parameters:
alpha - the prespecified level of confidence
Returns:
true if the null hypothesis is rejected; false otherwise
See Also:
TestUtils.tTest(double, double[], double)

MOEA Framework 2.12
API Specification

Copyright 2009-2016 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Visit us on Github!