1
$\begingroup$

I was analysing a distribution. I have attached the link for the list.

https://drive.google.com/file/d/1o1Zr9bwy_wzrDAIdsxRVXxAPzRrblQOg/view?usp=sharing

This histogram of this distribution looks like this,

enter image description here

Now I was evaluating the skewness of the distribution. First I used the basic formula of skewness.

enter image description here

[ I don't know name of the formula. If someone can enlighten me that's a plus. :) ]

Code:

meanY = np.mean(yArr)
stdY = np.std(yArr)
s = 0
for yd in yArr:
    s += (yd-meanY)**3
print((s/(stdY**3))/len(yArr))

Output:

-0.6510082464944021

Then I used Pearson's formula for skewness ie.

enter image description here

Code:

meanY = np.mean(yArr)
medianY = np.median(yArr)
stdY = np.std(yArr)
print(3*(meanY-medianY)/stdY)

Output:

0.34088557298815947

Now the first formula is saying the graph is right-skewed but the second formula is saying the graph is left-skewed. Why there is a conflict between the results of the two formulas?

Overall, I want to know why there is a difference in the report of both the formulas and the general conditions where Pearson's skewness formula will come at conflict with the traditional formula.

$\endgroup$

1 Answer 1

0
$\begingroup$

The problem lies in the first instance in using the same name for different constructs.

Suppose that you devise an intelligence test, and I do too, and we both call our test results "intelligence": for short, and because we are not innocent of desires to become slightly famous for our work and need a sales pitch, or even wish to make some money out of our tests.

Nevertheless there is no name magic that makes either test -- either measure -- the single, indisputable, incorrigible measure of intelligence. We should not expect that even rankings will coincide if the two tests are administered to a group of people.

So too with skewness.

The first measure is moment-based skewness, made famous by Karl Pearson, even though he used other measures too, and T.N. Thiele used the same idea earlier. The second measure also goes back to Pearson, although the factor of 3 is just ad hoc to make results comparable with yet another measure he liked, based on mean and mode.

Now, and for some years past, just using (mean $-$ median) / SD looks simpler. And that is bounded in a simple way that is repeatedly rediscovered: $-1 \le $ (mean $-$ median) / SD $\le 1$. The same bounds don't apply to moment-based skewness, although it is bounded according to sample size. For more on that story, see e.g. this paper

Further examples:

  1. Clearly mean being equal to median makes the second measure zero, but that in itself doesn't make any distribution symmetrical. It is easy to find non-pathological distributions for which mean is equal to median, but there is also asymmetry.

  2. A little harder, but it is possible to find asymmetric distributions for which the moment-based measure is zero.

Different criteria of skewness won't necessarily agree. Each is a reduction of information to a scalar, and different reductions ignore different details.

To get back to the beginning: We often write statements like

skewness = whatever recipe appeals

but the equals sign here is rhetorical. What we should be saying is captured better by a notation that I believe has its origins in Algol's use of :=, and the need to distinguish assignments from tests of equality.

whatever recipe appeals =: skewness

What comes first is the recipe, and any names we use are just conventional. Call the beast an aardvark and it still behaves in the same way.

Here definition is not claiming an unequivocal grasp of a concept, but just declaring a name that is convenient, just as in some very elementary algebra such as

$x = 42$

we are clearly not defining the essence of $x$ but just setting out notation useful for the current purpose.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.