Earlier quoted context omitted.
There are some newer data structures that take this to the next level such as T-Digest[1], which remains extremely accurate even when determining percentiles at the very tail end (like 99.999%) [1]: https://arxiv.org/pdf/1902.04023.pdf / https://github.com/tdunning/t-digest
NB: Post author here. Yeah, that was one of the reasons we chose it as one of the ones to implement, seemed like that was a really interesting tradeoff, we also used uddsketch[1] which provides relative error guarantees, which is pretty nifty. We thought they provided different enough tradeoffs that we wanted to implement both. [1]: https://arxiv.org/abs/1908.10693
How percentile approximation works and why it's more useful than averages
161–170 of 173 posts
Re: How percentile approximation works and why it's more useful than averages
#162Re: How percentile approximation works and why it's more useful than averages
#163Earlier quoted context omitted.
NB: Post author here. Yeah, that was one of the reasons we chose it as one of the ones to implement, seemed like that was a really interesting tradeoff, we also used uddsketch[1] which provides relative error guarantees, which is pretty nifty. We thought they provided different enough tradeoffs that we wanted to implement both. [1]: https://arxiv.org/abs/1908.10693
Hi, in an unrelated nitpick: The relative error should be calculated by dividing the error by the true value, not by it's approximation. Still, very nice writeup!
Re: How percentile approximation works and why it's more useful than averages
#164```To calculate the 10th percentile, let’s say we have 10,000 values. We take all of the values, order them from largest to smallest, and identify the 1001st value (where 1000 or 10% of the values are below it), which will be our 10th percentile.``` Isn't this contradictory? If we order the values from largest to smallest and take the 1001st value, then 10 % of the values are above/larger and not below/smaller. I bel…
Re: How percentile approximation works and why it's more useful than averages
#165""" Averages Can Be Misleading: Try a Percentile (2014) (elastic.co) 199 points by donbox on April 2, 2019 | | 55 comments """
Re: How percentile approximation works and why it's more useful than averages
#166How do you calculate these percentiles and use them as a trigger for alerts?
Re: How percentile approximation works and why it's more useful than averages
#167Awhile ago I wrote a Python library called LiveStats[1] that computed any percentile for any amount of data using a fixed amount of memory per percentile. It uses an algorithm I found in an old paper[2] called P^2. It uses a polynomial to find good approximations. The reason I made this was an old Amazon interview question. The question was basically, "Find the median of a huge data set without sorting it," and the "…
Re: How percentile approximation works and why it's more useful than averages
#168Earlier quoted context omitted.
Is it using https://github.com/tvondra/tdigest under the hood, or a separate implementation?
If folks are interested: https://github.com/timescale/timescaledb-toolkit/blob/main/e... (The TimescaleDB Toolkit is also implemented in Rust)
Re: How percentile approximation works and why it's more useful than averages
#169Earlier quoted context omitted.
> without sorting it... have a fixed size sorted buffer (that you sort yourself)
That doesn't really make sense to me at all. Don't sort it, just have it? Is the storage restriction the point?
Re: How percentile approximation works and why it's more useful than averages
#170Gamers have an intuitive sense of this. Your average framerate can be arbitrarily high, but if you have a big stutter every second between the smooth moments, then a lower but more consistent framerate may be preferable, typically expressed as the 1% and 0.1% slowest frames, which at a relatively typical 100fps, represents the slowest frame every second and every 10 seconds.