Confidence intervals in SunSpider JavaScript Benchmark
How are the confidence intervals calculated in Su开发者_StackOverflow社区nSpider JavaScript Benchmarks?
I guess that this works as following:
Every test has several runs.
1. take 95% close to average test runs times.
2. calculate percentage difference between those takes.
I know this is a very old question, but from the SunSpider source:
var error = "+/- " + ((tDist(count) * stdErr / mean) * 100).toFixed(1) + "% ";
Where
var sqrtCount = Math.sqrt(count);
var stdErr = stdDev / sqrtCount;
Obviously, parts of the var error =
statement human-readably format it for the results table.
(PS I used this an exercise to learn JavaScript; I hope I'm not completely off-base!)
精彩评论