What formula does Excel use to calculate sample skewness?

  • Thread starter Thread starter FrostScYthe
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on the discrepancy between the sample skewness calculated using a custom formula and the result produced by Excel's built-in skewness function. The formula used for sample skewness is g_1 = m_3 / m_2^{3/2}, while Excel employs a different calculation: (n / ((n-1)(n-2))) * Σ((x - x̄) / s)^3, where s represents the standard deviation. The difference in results arises from the distinct methodologies used in these calculations, which have historical roots dating back to the 1980s.

PREREQUISITES
  • Understanding of sample skewness and its mathematical formulation.
  • Familiarity with Excel functions, particularly the SKEW function.
  • Knowledge of standard deviation and its calculation.
  • Basic statistical concepts, including mean and variance.
NEXT STEPS
  • Research the mathematical derivation of sample skewness formulas.
  • Learn how to implement statistical functions in Excel, focusing on SKEW.
  • Explore the differences between population and sample statistics.
  • Investigate the historical context of statistical formulas used in software applications.
USEFUL FOR

Statisticians, data analysts, Excel users, and anyone interested in understanding the nuances of statistical calculations and discrepancies in software implementations.

FrostScYthe
Messages
80
Reaction score
0
Hi everyone,

I'm using the following formula to calculate sample skewness:

g_1 = \frac{m_3}{m_2^{3/2}} <br /> = \frac{\tfrac{1}{n} \sum_{i=1}^n (x_i-\overline{x})^3}{\left(\tfrac{1}{n} \sum_{i=1}^n (x_i-\overline{x})^2\right)^{3/2}}\ ,

However, when I try excel on to calculate skewness I get a different results. For example this set:

1
1
1
1
1
1
1
9
9

I get: 1.33630621
Excel gets: 1.619847741

Is excel using a different formula, or am I doing something wrong? O_o

Ted.
 
Physics news on Phys.org
I ran your example in octave and got your result. Excel code is virtually unreadable so it's hard to catch errors. There is a trick for naming cells, but that only helps so much.
 
Oops. I misunderstood. The excel skew function is

<br /> \frac{n}{(n-1)(n-2)}\sum{\left(\frac{x-\bar{x}}{s}\right)^3}<br />

where s is the stdev. Who knows how they came up with that. Probably dates back to the 80's.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
9
Views
3K
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K