eradiate.testing.regression.sidak_family_p_value#

eradiate.testing.regression.sidak_family_p_value(p_min, n)#

Aggregate n paired p-values into a single family-wise p-value using the Šidák correction, i.e. the probability of observing a minimum p-value at least as extreme as p_min among n independent comparisons.

Parameters:
  • p_min (float) – Smallest of the paired p-values.

  • n (int) – Number of paired comparisons.

Returns:

float – Family-wise p-value, directly comparable with the test threshold: it exceeds the threshold if and only if every paired p-value exceeds the Šidák-corrected per-comparison level 1 - (1 - threshold) ** (1 / n).

Notes

Computed as -expm1(n * log1p(-p_min)) rather than 1 - (1 - p_min) ** n to remain accurate for small p_min.