<p>In <a href="https://github.com/mlpack/mlpack/pull/742#discussion_r72757317">src/mlpack/methods/preprocess/preprocess_describe_main.cpp</a>:</p>
<pre style='color:#555'>&gt; +    const double&amp; rowMean,
&gt; +    const bool population)
&gt; +{
&gt; +  double skewness = 0;
&gt; +  double S3 = pow(rowStd, 3);
&gt; +  double M3 = SumNthPowerDeviations(input, rowMean, 3);
&gt; +  double n = input.n_elem;
&gt; +  if (population)
&gt; +  {
&gt; +    // Calculate Population Skewness
&gt; +    skewness = n * M3 / (n * n * S3);
&gt; +  }
&gt; +  else
&gt; +  {
&gt; +    // Calculate Sample Skewness
&gt; +    skewness = n * M3 / ((n-1) * (n-2) * S3);
</pre>
<p>As the <code>http://www.macroption.com/skewness-formula/</code>mention, the equation should be </p>

<p><code>(n*std::sqrt(n-1)/std::sqrt(n-2)) * std::sqrt(n) * M3 / (n*S3)</code></p>

<p>Please correct me if I am wrong</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/742/files/27ac82e876c3d68637d9e72d28bf0dadbc229ace#r72757317">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFEtI5GNO0BhO1KLqEBprZCg-_SFEks5qabj9gaJpZM4JWax8">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFD9FnlImxXFQ0z4-Mo-uDsme2g_Yks5qabj9gaJpZM4JWax8.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/742/files/27ac82e876c3d68637d9e72d28bf0dadbc229ace#r72757317"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>