HypothesisTest#

class cultivars.diagnostics.hypothesis.HypothesisTest(*, statistic, pvalue)[source]#

A scalar test statistic, its p-value, and a verdict at a level.

Every hypothesis-test record in the package descends from this one: a study that collects verdicts wants one type with reject and summary, not a union of seven. Subclasses add the fields their construction needs and describe their own table through _summary_table(); the renderers – summary(), str(), the notebook HTML – are derived here once. __repr__ stays a one-line verdict, because a test in a REPL should read as a sentence and not as a table.

Variables:
  • statistic (float) – The test statistic.

  • pvalue (float | None) – Its p-value, or None for a test known only through tabulated critical values.

See also

Attributes#

statistic

The test statistic.

pvalue

Its p-value, or None for a test known only through tabulated critical values.

Methods#

reject(*[, alpha])

Whether the null is rejected at level alpha.

summary()

The test as a table, renderable as text, HTML, or a dataframe.