Last active
December 1, 2018 05:36
-
-
Save saurabh-hirani/5972d1c7167d5525a700edbf793f1f57 to your computer and use it in GitHub Desktop.
rough-notes-for-explaining-percentile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. | |
- if 10 students took a test and scored the following: | |
10 20 30 40 50 60 70 80 90 100 | |
and the cutoff percentage for a college admission is 90% - how many students got in? | |
- average does not help - avg = (n * (n + 1)) / 2 = 55 | |
- throw out the bottom 90% of the scores | |
90 100 | |
2 students scored 90 and above or 90% of the students scored 90 or below. | |
- What if the above was latency? | |
p90 is 90 - which says 90% of the requests took 90 or below | |
2. Better latency example | |
- 10 requests took the following time: | |
- 1 2 3 4 5 6 100 200 1 2 500 | |
- sort | |
1 1 2 2 3 4 5 6 100 200 500 | |
- total requests = 10 | |
- How many requests took 5 ms or less? | |
- look and say - 7 | |
- How many percent of requests experienced 5 ms or less? - Given ms - asking percentage | |
- sort | |
1 1 2 2 3 4 5 6 100 200 500 | |
- find how many at or below 5 = 7 | |
- how much percent is that of the total | |
100 * 7 / 10 = 70% | |
- 70% of requests experienced 5 ms or less | |
- What was the latency of 90% of my requests? - Given percentage - asking ms | |
- For a set of 10 requests | |
- 90% = 9 | |
- Take the 9th value and discard the rest - 200ms | |
- p90 was 200ms i.e. 90% of requests experienced 200ms or less. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment