PredictiveCheckTest.pvalues#
- property PredictiveCheckTest.pvalues: NDArray[float64][source]#
(m, k)tail probabilities \(\Pr(T(y^{\text{rep}}) \ge T(y))\).The share of replications whose statistic exceeds the observed one, plus half the share that equals it, so a statistic the model reproduces exactly reads \(0.5\) and a discrete statistic –
minormaxon integer-valued data – is not pushed to one by ties. A cell isnanwhen the statistic is undefined on any replication. Rows followstatisticsand columnsnames. Recomputed on each access fromobservedandreplicated; the cost is one comparison per cell and replication.Example
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> y = rng.standard_normal((100, 2)) >>> check = replication_check(y, rng.standard_normal((200, 100, 2))) >>> p = check.pvalues >>> p.shape, bool(np.all((0.0 <= p) & (p <= 1.0))) ((5, 2), True)