Streaming Quantiles and Rank Error
Summarize quantiles with an error measured in rank and see why a small rank error need not mean a small numeric error.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
A percentile is a statement about sorted position
For \(n\) ordered observations, a quantile summary can allow error of at most \(\varepsilon n\) in the rank associated with a requested quantile. If values jump from \(20\) to \(2000\) near the target rank, a small allowed rank change can cross that jump. The guarantee concerns how many observations lie below or above the result, with ties handled by the summary’s rank convention.
Keep rank bounds for selected values
A comparison-based summary can retain ordered representative values with lower and upper rank bounds. Insert new observations, adjust affected bounds and combine nearby entries only when the resulting uncertainty respects the invariant. Memory then depends on the requested rank accuracy as well as stream length. Deterministic selection answers an exact single-rank query when the complete input is available. Mergeable aggregates explain why safe merging needs a proven summary-specific rule.[1]