languages icon indicating copy to clipboard operation
languages copied to clipboard

Illustrate the variance in the visualizations

Open anka-213 opened this issue 11 months ago • 2 comments

As it stands, the current visualizations may mislead people to believe that one language is faster than another when both are within the confidence interval from each other. There are several ways we could alleviate this by including the standard deviation acquired from the benchmark within the visualizations.

One option would be to randomly vary the speed over time according to the variance, which would give languages that are basically the same speed a chance to catch up on each other and sometimes come before the other and sometimes after. (Another option could be to stretch out the balls and make them blurrier over time, but that probably wouldn't look as good.)

anka-213 avatar Jan 16 '25 17:01 anka-213

Nice ideas! It is probably tricky to illustrate it. Maybe we could use the std-dev to determine when there is overlap and in those cases make the balls go at the same speed?

You are welcome to file an issue about this on my visualization project too: https://github.com/PEZ/languages-visualizations

PEZ avatar Jan 17 '25 00:01 PEZ

@PEZ That's certainly an option too. But I believe (despite not having tried it) that randomizing the speed on every bounce or maybe even every animation frame might look really nice and illustrate the concept in a really intuitive way. I guess that there is a risk that the Law of Large Numbers will just average away the randomness if one would do it like that though, since the illustration would get way more samples than the original measurement had. But it could be worth a try and there are ways to compensate if it turns out to be a problem.

edit: From reading more about the statistics, the law of large numbers shouldn't be a problem.

anka-213 avatar Jan 17 '25 06:01 anka-213