Or login with:
| template<class T> doublestdev( | int | n | |
| T* | data | ||
| bool | total = false | ) |
#include <codecogs/statistics/moments/standard_deviation.h> #include <iostream> int main() { double x[5] = {2.5 , 6.2 , 8.0 , 9.6 , 3.8}; double dev = Stats::Moments::stdev<double>(5, x); std::cout << "The population standard deviation is: " << dev << std::endl; return 0; }Output:
The population standard deviation is: 2.9192| n | the size of the population |
| data | the actual population data given as an array |
| total | Default value = false |
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge