Skip to content

Conversation

@rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Feb 24, 2019

Responding to suggestions on the tracker and some off-line suggestions.

Davin suggested that english named accessors instead of greek letters would result in more intelligible user code. Steven suggested that the parameters still need to be mu and theta which are used elsewhere (and I noted those parameter names are used in linked-to resources).

Michael suggested proving-out the API by seeing whether it generalized to Lognormal. I did so and found that Lognormal distribution parameters mu and sigma do not represent the mean and standard deviation of the lognormal distribution (instead, they are for the underlying regular normal distribution).

Putting these ideas together, we have NormalDist parameterized by mu and sigma but offering English named properties for accessors. That gives lets us match other API that access mu and sigma, it matches the external resources on the topic, gives us clear english names in user code. The API extends nicely to LogNormal where the parameters and the summary statistic accessors are not the same.

https://bugs.python.org/issue36018

@miss-islington
Copy link
Contributor

@rhettinger: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 9e456bc into python:master Feb 24, 2019
@rhettinger rhettinger deleted the normdist_with_properties branch February 24, 2019 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants