Get the mean of the set of observations
float mean = sigma_fx ( v ) / f ; float sum = 0 ; for ( auto i : v ) { sum += ( i . first - mean ) * ( i . first - mean ) * i . second ; } return sqrt ( sum / f ) ; }