Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Help with Sample Skewness

  1. Jul 26, 2010 #1
    Hi everyone,

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

    [tex] g_1 = \frac{m_3}{m_2^{3/2}}
    = \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.
     
  2. jcsd
  3. Aug 25, 2010 #2

    presbyope

    User Avatar
    Gold Member

    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.
     
  4. Aug 25, 2010 #3

    presbyope

    User Avatar
    Gold Member

    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.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook