I understand how to write a function to loop through a vector<double> and calculate the mean and standard deviation of its values, but I was wondering if there is a library which I could simply #include<> and then just call a function to compute such values.

There probably is a statistical lib somewhere, just google for it.

I decided to use the Welford method described in this blog.