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

Add sample param to Standard Deviation and Coefficient of Variation functions #8

Merged
merged 6 commits into from
Sep 20, 2016

Conversation

lidimayra
Copy link
Contributor

Boolean param sample in variance() makes it possible to choose between Sample or Population. Although standard_deviation() and coefficient_of_variation() methods calls standard_deviation() to calculate the final result, neither of them passed this param. As sample is the default param in variance(), there was no way to calculate Standard Deviation or Coefficient of Variation for a population dataset.

Changes made in this pull request adds sample param to both. (with default value set to True)

Boolean param to make possible to calculate Standard Deviation
for population (Default is sample).
Boolean param to make possible to calculate coefficient of variation
for population (default is sample).
Examples had been implemented incorrectly.
@codecov-io
Copy link

codecov-io commented Sep 18, 2016

Current coverage is 100% (diff: 100%)

Merging #8 into master will not change coverage

@@           master    #8   diff @@
===================================
  Files          32    32          
  Lines         463   463          
  Methods         0     0          
  Messages        0     0          
  Branches        0     0          
===================================
  Hits          463   463          
  Misses          0     0          
  Partials        0     0          

Powered by Codecov. Last update be10171...f5b9934

@sheriferson
Copy link
Owner

This is a great improvement to the functions that rely on standard_deviation(). I especially appreciate updating the documentation and tests. Thanks!

Could you extend this improvement to z_scores()? Right now z_scores calls standard_deviation without the ability to specify sample = False.

I'm happy to merge the pull request after that extension.

@lidimayra
Copy link
Contributor Author

Sure! I can do it right away!! 😊

@sheriferson
Copy link
Owner

Awesome! Thanks for the pull request :)

@sheriferson sheriferson merged commit 43b39bd into sheriferson:master Sep 20, 2016
@lidimayra lidimayra deleted the population-sd-cv branch September 20, 2016 03:58
@lidimayra
Copy link
Contributor Author

My pleasure! :)

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.

None yet

3 participants