summaryrefslogtreecommitdiff
path: root/boost/accumulators/statistics/skewness.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/accumulators/statistics/skewness.hpp')
-rw-r--r--boost/accumulators/statistics/skewness.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/boost/accumulators/statistics/skewness.hpp b/boost/accumulators/statistics/skewness.hpp
index 2e29018f5d..c383ec4a6c 100644
--- a/boost/accumulators/statistics/skewness.hpp
+++ b/boost/accumulators/statistics/skewness.hpp
@@ -31,7 +31,7 @@ namespace impl
@brief Skewness estimation
The skewness of a sample distribution is defined as the ratio of the 3rd central moment and the \f$ 3/2 \f$-th power
- of the 2nd central moment (the variance) of the sampless 3. The skewness can also be expressed by the simple moments:
+ of the 2nd central moment (the variance) of the samples 3. The skewness can also be expressed by the simple moments:
\f[
\hat{g}_1 =
@@ -48,7 +48,7 @@ namespace impl
: accumulator_base
{
// for boost::result_of
- typedef typename numeric::functional::average<Sample, Sample>::result_type result_type;
+ typedef typename numeric::functional::fdiv<Sample, Sample>::result_type result_type;
skewness_impl(dont_care)
{
@@ -57,7 +57,7 @@ namespace impl
template<typename Args>
result_type result(Args const &args) const
{
- return numeric::average(
+ return numeric::fdiv(
accumulators::moment<3>(args)
- 3. * accumulators::moment<2>(args) * mean(args)
+ 2. * mean(args) * mean(args) * mean(args)