Understand the design decisions for streaming statistics
developCriterium's streaming statistics implementation is designed to estimate and represent statistical distributions from streaming data samples with minimal storage. The design prioritizes handling uni-modal or bi-modal distributions (approximately log-normal) and supports both quantile queries and density estimation.
While several approaches were evaluated (including Reservoir Sampling, P-square, and Streaming Moments), the project's design direction favors T-digest for its balance of efficiency and accuracy.
Key characteristics of the chosen approach (T-digest):
- High storage efficiency for simple modal patterns.
- Fast quantile queries.
- Robustness against gradual changes in distribution shape.
- Low sensitivity to parameter tuning.