...one of the most highly
regarded and expertly designed C++ library projects in the
world.

— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards

boost::accumulators::impl::weighted_skewness_impl — Skewness estimation for weighted samples.

// In header: <boost/accumulators/statistics/weighted_skewness.hpp>template<typenameSample,typenameWeight>structweighted_skewness_impl {// typestypedefnumeric::functional::multiplies< Sample, Weight >::result_type weighted_sample;typedefnumeric::functional::average< weighted_sample, weighted_sample >::result_type result_type;// construct/copy/destructweighted_skewness_impl(dont_care);// public member functionstemplate<typenameArgs> result_type result(Argsconst&)const; };

The skewness of a sample distribution is defined as the ratio of the 3rd central moment and the -th power $ of the 2nd central moment (the variance) of the samples. The skewness can also be expressed by the simple moments:

where are the -th moment and the mean (first moment) of the samples.

The skewness estimator for weighted samples is formally identical to the estimator for unweighted samples, except that the weighted counterparts of all measures it depends on are to be taken.