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 in some more messages to PMStatisticalSample #200

Merged
merged 9 commits into from
Apr 19, 2021

Conversation

ctSkennerton
Copy link
Contributor

Hello,

I have fleshed out the PMStatisticalSample object created in #186. This pull request adds in average, mean, median, stdev, variance messages to try to address #187

Best,
Connor

Also add in a test to make sure that passing in a negative number causes an error.
* Add in guard clause to prevent use with negative numbers as the behaviour is not well defined.
* Prevent a potential float under/overflow by summing the logarithms as suggested by Nicolas Cellier.
…ion.

Adds in average, mean, median, stdev, variance messages
hemalvarambhia
hemalvarambhia previously approved these changes Apr 16, 2021
@@ -49,6 +49,20 @@ PMStatisticalSample class >> harmonicMean: aCollection [
^ (self newFrom: aCollection) harmonicMean
]

{ #category : #information }
PMStatisticalSample class >> mean: aCollection [
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe aCollection could be aSample

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I changed from aCollection to aSample

]

{ #category : #information }
PMStatisticalSample class >> median: aCollection [
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above - aCollection -> aSample

@hemalvarambhia hemalvarambhia dismissed their stale review April 16, 2021 17:12

Too soon to approve

@hemalvarambhia hemalvarambhia merged commit 22c78b9 into PolyMathOrg:master Apr 19, 2021
@SergeStinckwich SergeStinckwich added this to the v1.0.3 milestone May 23, 2021
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.

3 participants