eugenp / tutorials

Just Announced - "Learn Spring Security OAuth":

Home Page:http://bit.ly/github-lsso

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Standard Deviation formula is wrong

Atemu opened this issue · comments

    return Math.sqrt(standardDeviation / length);

needs to be

    return Math.sqrt(standardDeviation / length - 1);

Cross-check with Wolframalpha: https://www.wolframalpha.com/input?i=standard+deviation+%2825.0%2C+5.0%2C+45.0%2C+68.0%2C+61.0%2C+46.0%2C+24.0%2C+95.0%29

Hey, @Atemu.

Assuming this article: https://www.baeldung.com/java-calculate-standard-deviation

It uses population standard deviation.

We'll update the article to make this clear.