Skip to content

DOC: sample variance -> population variance (#46482) #46711

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

Merged
merged 6 commits into from
Apr 27, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/user_guide/gotchas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ integer arrays to floating when NAs must be introduced.
Differences with NumPy
----------------------
For :class:`Series` and :class:`DataFrame` objects, :meth:`~DataFrame.var` normalizes by
``N-1`` to produce unbiased estimates of the sample variance, while NumPy's
``N-1`` to produce unbiased estimates of the population variance, while NumPy's
Copy link
Contributor

Choose a reason for hiding this comment

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

why don't we also put the appropriate wiki link here as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good. for those who are confused with sample and population variance

:meth:`numpy.var` normalizes by N, which measures the variance of the sample. Note that
:meth:`~DataFrame.cov` normalizes by ``N-1`` in both pandas and NumPy.

Expand Down