Why use p50/p95 over mean for API response times?

Tests your grasp of statistical distributions for UX metrics. A good answer explains how outliers skew the mean, while percentiles (p50, p95) better represent typical and worst-case user experiences.
What's really being asked
This isn't a stats quiz. It tests your ability to connect abstract metrics to concrete user experience and business impact. The interviewer wants to see that you understand why we choose certain metrics: to accurately model reality. They're looking for practical, user-centric thinking, not just a textbook definition.
The full answer
A strong answer has three parts. First, define the terms: the mean is the arithmetic average, sensitive to extreme values. The median (p50) is the middle value of a data set, resistant to outliers. Percentiles like p95 show the value below which 95% of observations fall. Second, explain the problem with the mean for latency: response times often have a long-tail distribution. A few very slow requests (e.g., a 30-second timeout) can dramatically pull the mean up, making the "average" experience seem much worse than it is for most users. Conversely, if most requests are fast but a few are terrible, the mean might still look acceptable, hiding the pain felt by a segment of users. Third, explain the value of percentiles: p50 (median) gives a much better sense of the typical user's experience. p95 and p99 are crucial because they represent the "worst-case" experience for the vast majority of your users. A high p99 indicates a meaningful portion of users are having a very bad time, which is a direct predictor of frustration and churn.
The mistakes people make
A frequent red flag is giving a purely academic answer about statistics without mentioning users. For example, "The mean is non-robust to outliers in a skewed distribution." While true, it doesn't show senior-level thinking. A great answer always ties the metric back to the person waiting for the API call to finish. Another mistake is confusing median and mean, or being unable to clearly define what p95 actually signifies (e.g., saying "it's the slowest 5% of requests" which is imprecise).
What usually comes next
"Okay, so we're tracking p99. It just jumped from 800ms to 1500ms, but p50 is stable at 150ms. What are your first three steps to investigate?" or "When might the mean actually be a useful metric for an engineering team?" (Hint: for things with a normal distribution, like CPU usage, or when calculating total cost). "What's the difference between a histogram and a percentile?"
A concrete example
Imagine you have 10 API requests with these response times in milliseconds: 100, 110, 120, 130, 140, 150, 160, 170, 180, and one outlier at 3000. The mean is (1260 + 3000) / 10 = 426ms. This suggests a slow API. However, the median (the average of the 5th and 6th values) is (140 + 150) / 2 = 145ms. The 145ms median much better represents the experience of a typical user than the 426ms mean. Reporting on p95/p99 would immediately draw attention to that one terrible experience, which the mean obscures in a different way.
Interview question
When analyzing API response times, why are percentiles (e.g., p50, p95) generally considered more informative than the arithmetic mean?
- a.Percentiles are easier for non-technical stakeholders to understand and interpret.
- b.The mean is primarily useful for metrics that follow a normal distribution, which API latencies typically do not.
- c.Percentiles better represent the typical and worst-case user experiences because the mean can be heavily skewed by a small number of very slow requests.Correct
- d.Percentiles offer a more precise measure of the absolute fastest and slowest requests.
Why? this is the answer
The card emphasizes that API response times often have a long-tail distribution where a few slow requests can dramatically skew the mean, making it a poor representation of most users' experiences. Percentiles like p50 (median) accurately reflect the typical user's experience, while p95/p99 capture the worst-case for the majority, directly linking to user satisfaction. Option B, while true that mean is better for normal distributions, doesn't fully capture the user-centric reason for preferring percentiles for latency, which is the core of the card's argument.
Just read this? Test yourself on what you have been reading.
Read the original → igor.io
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on metrics — each one lists the topics its interview covers.
See open roles