diff options
-rw-r--r-- | stddev.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -40,8 +40,10 @@ int main(int,char **argv){ total+=(v-s_mean)*(v-s_mean); } const double s_stddev=data.size()==1?nan(""):sqrt(total/(data.size()-1)); + const double s_stderr=s_stddev/sqrt(data.size()); - cout<<"Mean: "<<s_mean<<endl - <<"Stddev: "<<s_stddev<<endl + cout<<"Mean: "<<s_mean<<'\n' + <<"Stddev: "<<s_stddev<<'\n' + <<"Stderr: "<<s_stderr<<'\n' <<"Median: "<<s_median<<endl; } |