Daily Dose of Data Science

Share this post

Pandas and NumPy Return Different Values for Standard Deviation. Why?

www.blog.dailydoseofds.com

Discover more from Daily Dose of Data Science

High-quality insights on Data Science and Python, along with best practices — shared daily. Get a 550+ Page Data Science PDF Guide and 450+ Practice Questions Notebook, FREE.
Over 37,000 subscribers
Continue reading
Sign in

Pandas and NumPy Return Different Values for Standard Deviation. Why?

Avi Chawla
Jan 30, 2023
5
Share this post

Pandas and NumPy Return Different Values for Standard Deviation. Why?

www.blog.dailydoseofds.com
Share

Pandas assumes that the data is a sample of the population and that the obtained result can be biased towards the sample.

Thus, to generate an unbiased estimate, it uses (n-1) as the dividing factor instead of n. In statistics, this is also known as Bessel's correction.

NumPy, however, does not make any such correction.

Find more info here: Bessel’s correction.

Share this post on LinkedIn: Post Link.

Thanks for reading Daily Dose of Data Science! Subscribe for free to receive new posts and support my work.


Find the code for my tips here: GitHub.

I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn.

5
Share this post

Pandas and NumPy Return Different Values for Standard Deviation. Why?

www.blog.dailydoseofds.com
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

© 2023 Avi Chawla
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing