PredictiveCheckTest.summary#

PredictiveCheckTest.summary(*, level=_EXTREME_PVALUE)[source]#

Render as a table: one row per statistic and variable.

Each row carries the observed statistic, the 5%, 50%, and 95% quantiles of its replicated distribution, the tail probability to three decimals, and a * when that probability is outside (level, 1 - level); the metadata block records the kind, the replication and observation counts, the table’s dimensions, and the verdict. The notes carry, in order, whatever the replicating result attached (notes), the list of flagged cells when there are any (the first eight, then an ellipsis), the reading rule for the check’s kind, and below 200 replications the resolution of the p-values.

Parameters:

level (float) – The tail size on each side that marks a row.

Return type:

SummaryTable

Returns:

The _SummaryTable, titled "{Kind} predictive check: {source}"; print it, display it in a notebook, or call its to_pandas().

Raises:

SpecificationError – If the level is not inside (0, 0.5).

Example

>>> import numpy as np
>>> rng = np.random.default_rng(5)
>>> y = rng.standard_normal((100, 1))
>>> check = replication_check(y, rng.standard_normal((200, 100, 1)))
>>> table = check.summary()
>>> table.columns
('statistic', 'variable', 'observed', 'q05', 'median', 'q95', 'p', '')
>>> len(table.rows), table.rows[0][:2]
(5, ('mean', 'y'))