# Homework Help: Help with Sample Skewness

1. Jul 26, 2010

### FrostScYthe

Hi everyone,

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

$$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}}\ ,$$

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?

Ted.

2. Aug 25, 2010

### presbyope

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.

3. Aug 25, 2010

### presbyope

Oops. I misunderstood. The excel skew function is

$$\frac{n}{(n-1)(n-2)}\sum{\left(\frac{x-\bar{x}}{s}\right)^3}$$

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