Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust duckdb population skewness by correction factor to get sample skewness #2021

Merged
merged 3 commits into from
Feb 16, 2025

Conversation

FBruzzesi
Copy link
Member

@FBruzzesi FBruzzesi commented Feb 15, 2025

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Why

duckdb natively returns population skewness, while polars and all other return sample skewness. This PR add the correction factor to match the outputs

How

Discovered while running sqlframe with duckdb backend

@FBruzzesi FBruzzesi added bug: incorrect result Something isn't working duckdb Issue is related to duckdb backend labels Feb 15, 2025
@FBruzzesi FBruzzesi changed the title fix: correct native duckdb skewness by correction factor to get sample skewness fix: adjust duckdb population skewness by correction factor to get sample skewness Feb 15, 2025
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing thanks! was meaning to look into it but never got round to it

@MarcoGorelli MarcoGorelli merged commit 3aefc49 into main Feb 16, 2025
28 of 29 checks passed
@MarcoGorelli MarcoGorelli deleted the fix/duckdb-skewness branch February 16, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: incorrect result Something isn't working duckdb Issue is related to duckdb backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants