4 ms·
The author seems to have two statistical misconceptions (which don't, however, detract from his main points). He says, "it’s absolutely vital to report somethi
by radford-neal 7y ago
The author seems to have two statistical misconceptions (which don't, however, detract from his main points).
He says, "it’s absolutely vital to report something about the distribution as a whole. In general, confidence intervals are a good technique for doing this".
But confidence intervals are a way of exhibiting uncertainty in a the estimate of a parameter (such as the mean), not a way of describing a distribution. Hopefully, what he actually meant is that giving the 5% and 95% (for example) quantiles of the distribution would be useful. The 90% confidence interval for the mean would be much smaller than the range from 5% to 95% quantiles, and would collapse to a point in the limit as you did more repetitions - not at all the desired behaviour.
Also, I disagree that it's always useful to report something about the whole distribution rather than just the mean. If the benchmark is for a small part of the program, the time will be combined with many other parts (perhaps repetitions of this part), with variation in a single part averaged out.
In this regard, he makes another mistake in footnote [4]: "I’ve sometimes heard it said that the central limit theorem saves us when benchmarking. In my experience, this hope is based on an over simplification of the theorem, which is that if you run a program enough times any randomness (including noise) will converge towards a normal distribution. That is only true if the various random variables are close to being independent and identically distributed."
This again seems to confuse the distribution data with the distribution of an estimate for the mean. Only the latter is subject to the central limit theorem. The distribution of the run times will not approach a normal distribution regardless of how many times you run the program (unless it's normal to start with, of course), even if the run times are independent and identically distributed. This should be obvious to anyone who hasn't heard of the central limit theorem. It should also be obvious to those who have heard it and understood it.
- Retric 7y agoI think you missed his point. If 0.5% of requests take 100x the average time you want that to be as obvious as possible. With quintiles those extreme outliers are easy to miss. With confidence interval error bars the outliers become more obvious. Further, running the test 1 Billion times would not reduce those error bars because that unusual event would occur ~5 million times.
- radford-neal 7y agoIf you want to know about the 99.5% quantile, then of course you have to look at that, not the 95% quantile. (Note that "quintiles" refers to the 20%, 40%, 60%, and 80% quantiles,but you can look at whatever quantile you like.) Your comment about "confidence interval error bars" revealing outliers makes no sense. I think you still don't understand that a confidence interval (for some parameter estimate, maybe the mean) is not a description of the distribution of the data, but rather is about the distribution of an estimate obtained from the data - not at all the same thing. Running a test 1 billion times certainly would reduce the confidence interval for the mean, even if 5 million of those are 100x outliers.
- Retric 7y agoI think I figured out the confusion. Benchmarking is a comparison and each test is a fixed sample size. A test might collect 100 or 100,000 samples by running the task repeatedly, but the data is not aggregated across multiple tests as the data is generally not saved. So, running the benchmark test again keep’s n the same when calculating the confidence interval. This means error bars are showing the calculated mean and standard * arbitrary scaling factor all lined up on an easy to read graph. PS: A lot of statistical tools are poor fits as the data is rarely a normal distribution. But, rigger is not the goal here.
- radford-neal 7y agoYou're still not getting it. Confidence intervals are not what you want to look at. Neither are error bars. They would be relevant if you wanted to know the mean performance, and wondered how accurately you had estimated this mean. But as far as I can tell, that's what you want to know.
- Retric 7y agoIt's not how accurately you had estimated this mean, but how representative the mean is for what's going on. If you have a better idea feel free to suggest it. Bonus points if it's easy to calculate and display.