Pandas and NumPy Return Different Values for Standard Deviation. Why?
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.