...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::non_coherent_weighted_tail_mean_impl — Estimation of the (non-coherent) weighted tail mean based on order statistics (for both left and right tails)
// In header: <boost/accumulators/statistics/weighted_tail_mean.hpp> template<typename Sample, typename Weight, typename LeftRight> struct non_coherent_weighted_tail_mean_impl : public accumulator_base { // types typedef numeric::functional::multiplies< Sample, Weight >::result_type weighted_sample; typedef numeric::functional::fdiv< Weight, std::size_t >::result_type float_type; typedef numeric::functional::fdiv< weighted_sample, std::size_t >::result_type result_type; // construct/copy/destruct non_coherent_weighted_tail_mean_impl(dont_care); // public member functions template<typename Args> result_type result(Args const &) const; };
An estimation of the non-coherent, weighted tail mean is given by the weighted mean of the
smallest samples (left tail) or the weighted mean of the
largest samples (right tail) above a quantile of level , being the total number of sample and the sum of all weights: