bayesplain.teach.PrecisionPlan

class bayesplain.teach.PrecisionPlan(required_n, target_width, expected_rate, level, schedule, prior=None, sd=None, groups=1, unit='')[source]

How much data a target precision requires.

Variables:
required_n

Observations needed to reach the target width – per group, when planning a comparison of two groups.

target_width

The interval width that was asked for.

expected_rate

The rate the calculation assumed, or None when planning for an average.

level

Credible level.

schedule

(n, width) pairs along the way.

prior=None

The prior assumed.

sd=None

The standard deviation assumed, when planning for an average.

groups=1

1 for a single estimate, 2 for a difference between groups.

unit=''

Display unit for widths, when planning for an average.

Methods

summary()

Report the required sample size and the trade-off around it.

expected_rate[source]
groups = 1[source]
level[source]
prior = None[source]
required_n[source]
schedule[source]
sd = None[source]
summary()[source]

Report the required sample size and the trade-off around it.

Returns:

Printable text.

Return type:

_Report

target_width[source]
unit = ''[source]