import pysps
= pysps.InclusionProb([1, 2, 3, 4], 3)
pi pi
InclusionProb(array([0.33333333, 0.66666667, 1. , 1. ]), 3)
Sequential Poisson sampling is a variation of Poisson sampling for drawing probability-proportional-to-size samples with a given number of units, and is commonly used for price-index surveys. This package is a Python implementation of the {sps} R package.
Install the stable release from PyPI
or get the development version from github
The first step to draw a sample is to construct the inclusion probabilties for each unit in the population.
InclusionProb(array([0.33333333, 0.66666667, 1. , 1. ]), 3)
Now these inclusion probabilities can be used to create a sample.
If you use this software, please cite it
@software{pysps,
author = {Martin, Steve},
doi = {10.5281/zenodo.15825865},
license = {MIT},
title = {{pysps: Sequential Poisson sampling}},
version = {0.1.1},
year = {2025}
}