Class NonlinearityTests.TestResult

java.lang.Object
edu.cmu.tetrad.search.utils.NonlinearityTests.TestResult
Enclosing class:
NonlinearityTests

public static final class NonlinearityTests.TestResult extends Object
Encapsulates the result of a statistical test, including the test statistic, p-value, and the decision to reject the null hypothesis. This class is immutable and provides information about the outcome of a hypothesis test.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    Represents the p-value of a statistical hypothesis test.
    final boolean
    Indicates whether the null hypothesis of the statistical hypothesis test is rejected.
    final double
    Represents the value of the test statistic computed during a statistical hypothesis test.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TestResult(double statistic, double pValue, boolean reject)
    Constructs a TestResult instance with the specified test statistic, p-value, and decision on whether to reject the null hypothesis.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a string representation of this TestResult instance.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • statistic

      public final double statistic
      Represents the value of the test statistic computed during a statistical hypothesis test. This value is used to determine the evidence against the null hypothesis based on the context of the test being performed. The interpretation of this value depends on the specific test type and its corresponding distribution.
    • pValue

      public final double pValue
      Represents the p-value of a statistical hypothesis test. The p-value is the probability of observing a test statistic as extreme as, or more extreme than, the one observed, under the assumption that the null hypothesis is true. It quantifies the strength of evidence against the null hypothesis. A smaller p-value indicates stronger evidence against the null hypothesis. If the p-value is not applicable or cannot be computed, this value is set to NaN.
    • reject

      public final boolean reject
      Indicates whether the null hypothesis of the statistical hypothesis test is rejected.
  • Constructor Details

    • TestResult

      public TestResult(double statistic, double pValue, boolean reject)
      Constructs a TestResult instance with the specified test statistic, p-value, and decision on whether to reject the null hypothesis.
      Parameters:
      statistic - the value of the test statistic computed in the statistical hypothesis test
      pValue - the p-value of the test, representing the probability of observing a test statistic as extreme as, or more extreme than, the one observed, under the null hypothesis
      reject - a boolean value indicating whether the null hypothesis is rejected based on the test result
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this TestResult instance. The returned string includes the test statistic, p-value, and the rejection decision of the null hypothesis, formatted as key-value pairs.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the TestResult in the format: "stat={statistic}, p={pValue}, reject={reject}"