Cross Validated
2026-09-18 02:53 UTC
By HauntedMansion
AI-113-20260918-social-media-1d91d772
is there a way to calculate the percentiles cheaply without enumeratine values of the entire population (check body for details)
I've a database that stores multiple values of performance stats for thousands and millions of players in a certain game, over 10s of millions of matches, the game follows a system of episodes/acts, and players have ranks. I want to be able to answer questions like for a certain stat of the player in a match, how does it compare to others of the same rank (or in general sometimes) in the same episode/act, and sometimes I want to compare the average of said stat over the player's entire matches, to the averages of others over their entire matches, and so on. for that one of the best ways to present it is percentile, for example let's say we have a stat called damage per round, saying top 1% percentile would give the player a clear indicator that their damage per round is top notch, and so on. The problem is that I don't know of a cheap way to calculate that, since I'm not good at mathematics, but I'd imagine that maybe there's a way while importing players' matches into our database, to some what calculate & update some statistical data that could answer that cheaply? instead of having to go over a lot of player's data to answer that? I imagine if the stats follow a normal distribution it might be easy, but what if it doesn't for one reason or another, and how do I even verify if it does? and is there a way to incrementally calculate/update them incrementally ps: sorry if the phrasing of the question is messed up, Idk how else to phrase it
I've a database that stores multiple values of performance stats for thousands and millions of players in a certain game, over 10s of millions of matches, the game follows a system of episodes/acts, and players have ranks. I want to be able to answer questions like for a certain stat of the player in a match, how does it compare to others of the same rank (or in general sometimes) in the same episode/act, and sometimes I want to compare the average of said stat over the player's entire matches, to the averages of others over their entire matches, and so on. for that one of the best ways to present it is percentile, for example let's say we have a stat called damage per round, saying top 1% percentile would give the player a clear indicator that their damage per round is top notch, and so on. The problem is that I don't know of a cheap way to calculate that, since I'm not good at mathematics, but I'd imagine that maybe there's a way while importing players' matches into our database, to some what calculate & update some statistical data that could answer that cheaply? instead of having to go over a lot of player's data to answer that? I imagine if the stats follow a normal distribution it might be easy, but what if it doesn't for one reason or another, and how do I even verify if it does? and is there a way to incrementally calculate/update them incrementally ps: sorry if the phrasing of the question is messed up, Idk how else to phrase it
Full article content could not be extracted automatically. Read the original below.
Source:
Cross Validated
· stats.stackexchange.com