Skip to content

fix: compute skewness as g1 - #225

Open
skymanbp wants to merge 1 commit into
DataHaskell:mainfrom
skymanbp:fix/skewness-g1
Open

fix: compute skewness as g1#225
skymanbp wants to merge 1 commit into
DataHaskell:mainfrom
skymanbp:fix/skewness-g1

Conversation

@skymanbp

Copy link
Copy Markdown
Contributor

Split out of #214.

skewness used a sqrt(n-1) factor: neither population g1 nor the sample form. Now g1, matching scipy.stats.skew.

Before, on [1, 2, 2, 3, 3, 3, 4, 10]:

ghci> D.skewness (F.col @Double "y") df
1.6801920329205566

After:

ghci> D.skewness (F.col @Double "y") df
1.796200837478836

scipy.stats.skew gives 1.7962008374788356. pandas .skew() gives 2.240256043894075, the adjusted Fisher Pearson convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant