Added Sample Variance & SD#25
Closed
jamescgibson wants to merge 1 commit into
Closed
Conversation
The existing methods calculate the 'population' variance and standard deviation. Added methods to calculate the 'sample' versions of theseA quantities, which provide unbiased estimates of the population parameters when a sample is used to estimate.
Owner
|
Thanks for this awesome PR! As you correctly note, we calculate the variance of the values in the collection and do not try and estimate the variance of the population from which the values in the collection are derived. Only the former and not the later is within the scope of this gem's target functionality. I've updated the readme with a note to try and make this clearer to users of the gem. |
Author
|
Cool, thanks for the response! Great gem here, I ended up patching it in one project because I needed the sample estimates, and figured you might want to include it - no worries though. Cheers! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing methods calculate the 'population' variance and standard
deviation. Added methods to calculate the 'sample' versions of these
quantities, which provide unbiased estimates of the population
parameters when a sample is used to estimate.
P.S. Looks like there were some end-of-line spaces that got truncated automatically by my editor, I'll happily amend to remove these if the commit log noise is an issue.