savvi

savvi is a package for Safe Anytime Valid Inference (SAVI). Also, it’s a savvy pun.

The goal of this package is to provide methods to calculate confidence intervals and p-values that are valid at all sample sizes.

More formally, given a significance level α[0,1], a (1α) confidence sequence for parameters θRp is a sequence of intervals Cn such that

P(n1:θCn)α.

pn is an anytime-valid p-value for that process if

P(n1:pnα)α.

See Ramdas et al. ().

Install

Stable version:

pip install savvi

Development version:

pip install git+https://github.com/assuncaolfi/savvi

For development, use pdm.

Get started

See the example gallery.

References

Ramdas, Aaditya, Peter Grünwald, Vladimir Vovk, and Glenn Shafer. 2023. “Game-Theoretic Statistics and Safe Anytime-Valid Inference.” https://arxiv.org/abs/2210.01948.