[issue36018] Add a Normal Distribution class to the statistics module

2020-01-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 41f4dc3bcf30cb8362a062a26818311c704ea89f by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-36018: Minor fixes to the NormalDist() examples and recipes. (GH-18226) (GH-18227)

[issue36018] Add a Normal Distribution class to the statistics module

2020-01-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +17607 pull_request: https://github.com/python/cpython/pull/18227 ___ Python tracker ___

[issue36018] Add a Normal Distribution class to the statistics module

2020-01-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 01bf2196d842fc20667c5336e0a7a77eb4fdc25c by Raymond Hettinger in branch 'master': bpo-36018: Minor fixes to the NormalDist() examples and recipes. (GH-18226) https://github.com/python/cpython/commit/01bf2196d842fc20667c5336e0a7a77eb4fdc25c

[issue36018] Add a Normal Distribution class to the statistics module

2020-01-27 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +17606 pull_request: https://github.com/python/cpython/pull/18226 ___ Python tracker ___

[issue36018] Add a Normal Distribution class to the statistics module

2020-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset eebcff8c071b38b53bd429892524ba8518cbeb98 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-36018: Add another example for NormalDist() (GH-18191) (GH-18192)

[issue36018] Add a Normal Distribution class to the statistics module

2020-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 10355ed7f132ed10f1e0d8bd64ccb744b86b1cce by Raymond Hettinger in branch 'master': bpo-36018: Add another example for NormalDist() (#18191) https://github.com/python/cpython/commit/10355ed7f132ed10f1e0d8bd64ccb744b86b1cce --

[issue36018] Add a Normal Distribution class to the statistics module

2020-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +17575 pull_request: https://github.com/python/cpython/pull/18192 ___ Python tracker ___

[issue36018] Add a Normal Distribution class to the statistics module

2020-01-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +17574 pull_request: https://github.com/python/cpython/pull/18191 ___ Python tracker ___

[issue36018] Add a Normal Distribution class to the statistics module

2019-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset cc1bdf91d53b1a4751be84ef607e24e69a327a9b by Raymond Hettinger in branch '3.8': [3.8] bpo-36018: Address more reviewer feedback (GH-15733) (GH-15734) https://github.com/python/cpython/commit/cc1bdf91d53b1a4751be84ef607e24e69a327a9b

[issue36018] Add a Normal Distribution class to the statistics module

2019-09-08 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +15389 pull_request: https://github.com/python/cpython/pull/15734 ___ Python tracker ___

[issue36018] Add a Normal Distribution class to the statistics module

2019-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 4db25d5c39e369f4b55eab52dc8f87f390233892 by Raymond Hettinger in branch 'master': bpo-36018: Address more reviewer feedback (GH-15733) https://github.com/python/cpython/commit/4db25d5c39e369f4b55eab52dc8f87f390233892 --

[issue36018] Add a Normal Distribution class to the statistics module

2019-09-08 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +15388 pull_request: https://github.com/python/cpython/pull/15733 ___ Python tracker ___

[issue36018] Add a Normal Distribution class to the statistics module

2019-07-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: I have a query about the documentation: The default *method* is "exclusive" and is used for data sampled from a population that can have more extreme values than found in the samples. ... Setting the *method* to "inclusive" is used for

[issue36018] Add a Normal Distribution class to the statistics module

2019-07-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +14678 pull_request: https://github.com/python/cpython/pull/14898 ___ Python tracker ___

[issue36018] Add a Normal Distribution class to the statistics module

2019-05-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 671d782f8dc52942dc8c48a513bf24ff8465b112 by Raymond Hettinger in branch 'master': bpo-36018: Update example to show mean and stdev (GH-13047) https://github.com/python/cpython/commit/671d782f8dc52942dc8c48a513bf24ff8465b112 --

[issue36018] Add a Normal Distribution class to the statistics module

2019-05-01 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +12966 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36018] Add a Normal Distribution class to the statistics module

2019-04-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset b0a2c0fa83f9b79616ccf451687096542de1e6f8 by Raymond Hettinger in branch 'master': bpo-36018: Test idempotence. Test two methods against one-another. (GH-13021) https://github.com/python/cpython/commit/b0a2c0fa83f9b79616ccf451687096542de1e6f8

[issue36018] Add a Normal Distribution class to the statistics module

2019-04-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +12943 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36018] Add a Normal Distribution class to the statistics module

2019-04-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset fb8c7d53326d137785ca311bfc48c8284da46770 by Raymond Hettinger in branch 'master': bpo-36018: Make "seed" into a keyword only argument (GH-12921) https://github.com/python/cpython/commit/fb8c7d53326d137785ca311bfc48c8284da46770 --

[issue36018] Add a Normal Distribution class to the statistics module

2019-04-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +12849 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36018] Add a Normal Distribution class to the statistics module

2019-03-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: > I'm assuming you meant 5.374 rather than 5.372 in the first Nspire result. Yes, that was a typo, sorry. Thanks for checking into the results. -- ___ Python tracker

[issue36018] Add a Normal Distribution class to the statistics module

2019-03-11 Thread Mark Dickinson
Mark Dickinson added the comment: Below is the full transcript from Pari/GP: note that I converted the float inputs to exact Decimal equivalents, assuming IEEE 754 binary64. Summary: both Python results look fine; it's Nspire that's inaccurate here. mirzakhani:~ mdickinson$

[issue36018] Add a Normal Distribution class to the statistics module

2019-03-11 Thread Mark Dickinson
Mark Dickinson added the comment: According to GP/Pari, the correctly value for the first result, to the first few dozen places, is: 0.995275743920768157605659214368609706759611629000344854339231928536087783251913252354... I'm assuming you meant 5.374 rather than 5.372 in the first Nspire

[issue36018] Add a Normal Distribution class to the statistics module

2019-03-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: I've done some spot checks of NormDist.pdf and .cdf and compared the results to those returned by my TI Nspire calculator. So far, the PDF has matched that of the Nspire to 12 decimal places (the limit the calculator will show), but the CDF differs on or

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-28 Thread miss-islington
miss-islington added the comment: New changeset 9add4b3317629933d88cf206a24b15e922fa8941 by Miss Islington (bot) (Raymond Hettinger) in branch 'master': bpo-36018: Add documentation link to "random variable" (GH-12114)

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +12120 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-28 Thread miss-islington
miss-islington added the comment: New changeset ef17fdbc1c274dc84c2f611c40449ab84824607e by Miss Islington (bot) (Raymond Hettinger) in branch 'master': bpo-36018: Add special value tests and make minor tweaks to the docs (GH-12096)

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +12103 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-24 Thread miss-islington
miss-islington added the comment: New changeset 9e456bc70e7bc9ee9726d356d7167457e585fd4c by Miss Islington (bot) (Raymond Hettinger) in branch 'master': bpo-36018: Add properties for mean and stdev (GH-12022) https://github.com/python/cpython/commit/9e456bc70e7bc9ee9726d356d7167457e585fd4c

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +12054 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-23 Thread miss-islington
miss-islington added the comment: New changeset 79fbcc597dfd039d3261fffcb519b5ec5a18df9d by Miss Islington (bot) (Raymond Hettinger) in branch 'master': bpo-36018: Make __pos__ return a distinct instance of NormDist (GH-12009)

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Steven, Davin, Michael: Thanks for the encouragement and taking the time to review this code. -- ___ Python tracker ___

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +12040 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Why use object.__setattr__(self, 'mu', mu) instead of > self.mu = mu in the __init__ method? The idea was the instances should be immutable and hashable, but this added unnecessary complexity, so I took this out prior to the check in. > Should __pos__

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-23 Thread Davin Potts
Davin Potts added the comment: Steven: Your point about population versus sample makes sense and your point that altering their names would be a breaking change is especially important. I think that pretty well puts an end to my suggestion of alternative names and says the current pattern

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-23 Thread Steven D'Aprano
Steven D'Aprano added the comment: Davin: the chice of using mu versus xbar was deliberate, as they represent different quantities: the population mean versus a sample mean. But reading over the docs with fresh eyes, I can now see that the distinction is not as clear as I intended. I think

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-23 Thread Steven D'Aprano
Steven D'Aprano added the comment: Karthikeyan: thanks for the hint about Github. Raymond: thanks for the diff. Some comments: Why use object.__setattr__(self, 'mu', mu) instead of self.mu = mu in the __init__ method? Should __pos__ return a copy rather than the instance itself? The rest

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-23 Thread Davin Potts
Davin Potts added the comment: There is an inconsistency worth paying attention to in the choice of names of the input parameters. Currently in the statistics module, pvariance() accepts a parameter named "mu" and pstdev() and variance() each accept a parameter named "xbar". The docs

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Okay, it's in for the second alpha. Please continue to make API or implementation suggestions. Nothing is set in stone. -- ___ Python tracker

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 11c79531655a4aa3f82c20ff562ac571f40040cc by Raymond Hettinger in branch 'master': bpo-36018: Add the NormalDist class to the statistics module (GH-11973) https://github.com/python/cpython/commit/11c79531655a4aa3f82c20ff562ac571f40040cc

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for all the positive feedback. If there are no objections, I would like to push this so it will be in the second alpha release so that it can get exercised. We can still make adjustments afterwards. --

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: @steven.daprano Bit off topic but you can also append .patch in the PR URL to generate patch file with all the commits made in the PR up to latest commit and .diff provides the current diff against master. They are plain text and can be downloaded

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-22 Thread Raymond Hettinger
Change by Raymond Hettinger : Removed file: https://bugs.python.org/file48162/normdist_22feb2019.diff ___ Python tracker ___ ___

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-22 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file48163/normdist_22feb2019.diff ___ Python tracker ___ ___

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-22 Thread Raymond Hettinger
Change by Raymond Hettinger : Removed file: https://bugs.python.org/file48161/normdist_22feb2019.diff ___ Python tracker ___ ___

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-22 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file48162/normdist_22feb2019.diff ___ Python tracker ___ ___

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've made both suggested changes, "examples"->"samples" and set the defaults to the standard normal distribution. To bypass Github, I've attached a diff to this tracker issue. Let me know what you think :-) -- Added file:

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-22 Thread Steven D'Aprano
Steven D'Aprano added the comment: Thanks Raymond. Apologies for commenting here instead of at the PR. While I've been fighting with more intermittedly broken than usual internet access, Github has stopped supporting my browser. I can't upgrade the browser without upgrading the OS, and I

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Okay the PR is ready. If you all are mostly comfortable with it, it would great to get this in for the second alpha so that people have a chance to work with it. -- nosy: +davin ___ Python tracker

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +11999 stage: -> patch review ___ Python tracker ___ ___

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll work up a PR for this. We can continue to tease-out the best method names. I've has success with "examples" and "from_samples" when developing this code in the classroom. Both names had the virtue of being easily understood and never being

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-19 Thread Michael Selik
Michael Selik added the comment: +1, This would be useful for quick analyses, avoiding the overhead of installing scipy and looking through its documentation. Given that it's in the statistics namespace, I think the name can be simply ``Normal`` rather than ``NormalDist``. Also, instead of

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: I like this idea! Should the "examples" method be re-named "samples"? That's the word used in the docstring, and it matches the from_samples method. -- ___ Python tracker

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-17 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file48148/gauss_demo.py ___ Python tracker ___ ___ Python-bugs-list

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +mark.dickinson, tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36018] Add a Normal Distribution class to the statistics module

2019-02-17 Thread Raymond Hettinger
New submission from Raymond Hettinger : Attached is a class that I've found useful for doing practical statistics work with normal distributions. It provides a nice, high-level API that makes short-work of everyday statistical problems. -- Examples # Simple scaling and