bayesplain.frequentist.FrequentistTwin

class bayesplain.frequentist.FrequentistTwin(test, statistic_name, statistic, pvalue, dof=None, estimate=None, interval=None, interval_level=0.95, interval_method='', null_statement='')[source]

A conventional test result, with its interpretation attached.

Variables:
test : str

Name of the test, as a student would meet it in a methods section.

statistic_name : str

Symbol for the test statistic, e.g. "chi-square" or "z".

statistic : float

The test statistic.

pvalue : float

The p-value.

dof : float or None

Degrees of freedom, where the test has them.

estimate : float or None

The point estimate the test is built around.

interval : tuple of float or None

Confidence interval on estimate.

interval_level : float

Coverage of interval.

interval_method : str

How the interval was constructed, since the choice is not unique.

null_statement : str

The null hypothesis in words.

Methods

claims()

State, in words, what this p-value does claim.

disclaims()

State what this p-value is routinely but wrongly taken to claim.

interval_claims([formatter])

State what the confidence interval does and does not claim.

rate_in_words()

Express the p-value as a frequency, without rounding it to zero.

claims()[source]

State, in words, what this p-value does claim.

Returns:

A sentence built from this result’s own numbers.

Return type:

str

disclaims()[source]

State what this p-value is routinely but wrongly taken to claim.

Returns:

A sentence naming the misreading.

Return type:

str

dof = None[source]
estimate = None[source]
interval = None[source]
interval_claims(formatter=None)[source]

State what the confidence interval does and does not claim.

Parameters:
formatter : callable, optional

formatter(low, high) -> str, used to render the bounds in whatever display units the caller reports in. Defaults to raw values in the quantity’s own units.

Returns:

Two sentences: the correct reading, then the tempting one.

Return type:

str

interval_level = 0.95[source]
interval_method = ''[source]
null_statement = ''[source]
pvalue[source]
rate_in_words()[source]

Express the p-value as a frequency, without rounding it to zero.

Returns:

A phrase such as '11.0% of the time', or 'fewer than 1 time in 1,000' when a percentage would round away the whole number.

Return type:

str

property significant[source]

Whether the p-value clears the conventional 0.05 threshold.

statistic[source]
statistic_name[source]
test[source]