
Show HN: Go statistics library with 100% code coverage and no dependencies - anonfunction
https://github.com/montanaflynn/stats/blob/master/README.md
======
nanis
If you are calculating means, variances etc using the textbook formulas, you
are doing it wrong. Don't just add up a bunch of floats and divide by N to
calculate an average. Don't use random people's high school homeworks for
statistical analysis. Write things with dependencies so they are correct.

~~~
anonfunction
I'm not sure why you think using standardized formulas is incorrect, there are
certainly cases to use a mean average. There are other times you may want to
use geometric mean, harmonic mean, mode, median, etc... and the library
doesn't force anyone to use a specific function for the analysis, it just
provides the tools to be used as needed.

Saying this is my high school homework is quite rude, it's a project I've been
working on for several years along with several other contributors. It's
cloned hundreds of times a day and quite obviously of benefit to many people
and organizations.

This library is used as a dependency in many projects like cockroachdb,
mongodb, etc... and has a lot of tests to verify it's correct. Not having
dependencies ensures that the entire library is well tested and removes the
need to track down bugs far down the dependency graph.

