Commit Graph

41 Commits

Author SHA1 Message Date
Raymond Hettinger
6c01ebcc0d bpo-37158: Simplify and speed-up statistics.fmean() (GH-13832) 2019-06-05 07:39:38 -07:00
Raymond Hettinger
cba9f84725 bpo-36546: Add design notes to aid future discussions (GH-13769) 2019-06-02 21:07:43 -07:00
Raymond Hettinger
fb8c7d5332 bpo-36018: Make "seed" into a keyword only argument (GH-12921) 2019-04-23 01:46:18 -07:00
Raymond Hettinger
7280048690 bpo-35904: Add missing fmean() entry to the summary table (GH-12919) 2019-04-23 01:35:16 -07:00
Raymond Hettinger
9013ccf6d8 bpo-36546: Add statistics.quantiles() (#12710) 2019-04-23 00:06:35 -07:00
Raymond Hettinger
6463ba3061 bpo-27181: Add statistics.geometric_mean() (GH-12638) 2019-04-07 09:20:03 -07:00
Raymond Hettinger
d1e768a677 bpo-36326: Let inspect.getdoc() find docstrings for __slots__ (GH-12498) 2019-03-25 13:01:13 -07:00
Raymond Hettinger
fe13883f01 bpo-36324: Improved code formatting for the NormalDist.inv_cdf rational approximation (GH-12448)
https://bugs.python.org/issue36324
2019-03-19 14:29:13 -07:00
Raymond Hettinger
52a594bd0d NormalDist.inv_cdf(): In-line constants because the variable names were not informative (GH-12446) 2019-03-19 12:48:04 -07:00
Raymond Hettinger
5f1e8b4d24 Add docstrings to the arithmetic methods in NormalDist() (GH-12426) 2019-03-18 22:24:15 -07:00
Raymond Hettinger
714c60d7ac bpo-36324: Add inv_cdf() to statistics.NormalDist() (GH-12377) 2019-03-18 20:17:14 -07:00
Raymond Hettinger
41f0b78cbf Simplify overlap() formula for case where variances are equal (GH-12323) 2019-03-14 02:25:26 -07:00
Raymond Hettinger
fc06a192fd bpo-35892: Fix mode() and add multimode() (#12089) 2019-03-12 00:43:27 -07:00
Raymond Hettinger
318d537daa bpo-36169 : Add overlap() method to statistics.NormalDist (GH-12149) 2019-03-06 22:59:40 -08:00
Raymond Hettinger
ef17fdbc1c bpo-36018: Add special value tests and make minor tweaks to the docs (GH-12096)
https://bugs.python.org/issue36018
2019-02-28 09:16:25 -08:00
Raymond Hettinger
9e456bc70e bpo-36018: Add properties for mean and stdev (GH-12022)
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
2019-02-24 11:44:55 -08:00
Raymond Hettinger
79fbcc597d bpo-36018: Make __pos__ return a distinct instance of NormDist (GH-12009)
https://bugs.python.org/issue36018
2019-02-23 22:19:01 -08:00
Raymond Hettinger
11c7953165 bpo-36018: Add the NormalDist class to the statistics module (GH-11973) 2019-02-23 14:44:07 -08:00
Raymond Hettinger
47d9987247 bpo-35904: Add statistics.fmean() (GH-11892) 2019-02-21 15:06:29 -08:00
Victor Stinner
d6debb24e0 bpo-29919: Remove unused imports found by pyflakes (#137)
Make also minor PEP8 coding style fixes on modified imports.
2017-03-27 16:05:26 +02:00
Steven D'Aprano
fb315dbe82 Issue #27181 remove geometric_mean and defer for 3.7. 2016-10-05 03:24:45 +11:00
Raymond Hettinger
15f44ab043 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-08-30 10:47:49 -07:00
Steven D'Aprano
d6ea3011c5 Remove support for nth root of negative numbers with odd powers.
Although nth roots of negative numbers are real for odd n, the
statistics module doesn't make use of this. Remove support for
negative roots from the private _nth_root function, which
simplifies the test suite.
2016-08-24 12:48:12 +10:00
Steven D'Aprano
e5803d9d2f Add geometric_mean to __all__ 2016-08-24 12:17:00 +10:00
Steven D'Aprano
0a21c729eb Re-licence statistics.py under the standard Python licence. 2016-08-24 02:40:03 +10:00