Class NonlinearityTests.TestResult
java.lang.Object
edu.cmu.tetrad.search.utils.NonlinearityTests.TestResult
- Enclosing class:
NonlinearityTests
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
FieldsModifier and TypeFieldDescriptionfinal doubleRepresents the p-value of a statistical hypothesis test.final booleanIndicates whether the null hypothesis of the statistical hypothesis test is rejected.final doubleRepresents the value of the test statistic computed during a statistical hypothesis test. -
Constructor Summary
ConstructorsConstructorDescriptionTestResult(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
-
Field Details
-
statistic
public final double statisticRepresents 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 pValueRepresents 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 rejectIndicates 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 testpValue- 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 hypothesisreject- a boolean value indicating whether the null hypothesis is rejected based on the test result
-
-
Method Details
-
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.
-