What formula does Excel use to calculate sample skewness?

  • Thread starter Thread starter FrostScYthe
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 5K views
FrostScYthe
Messages
80
Reaction score
0
Hi everyone,

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

[tex]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}}\ ,[/tex]

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

[tex] \frac{n}{(n-1)(n-2)}\sum{\left(\frac{x-\bar{x}}{s}\right)^3}[/tex]

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