This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Inverse cumulative normal distribution function
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steven.daprano Nosy List: miss-islington, rhettinger, steven.daprano
Priority: normal Keywords: patch

Created on 2019-03-17 08:15 by rhettinger, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12377 merged rhettinger, 2019-03-17 08:27
PR 12448 merged rhettinger, 2019-03-19 21:11
PR 12476 merged rhettinger, 2019-03-20 20:10
PR 14871 merged rhettinger, 2019-07-20 17:02
PR 14875 merged miss-islington, 2019-07-21 07:35
PR 15110 merged rhettinger, 2019-08-04 18:16
PR 15112 merged miss-islington, 2019-08-04 18:53
PR 15693 merged rhettinger, 2019-09-05 06:48
PR 15694 merged miss-islington, 2019-09-05 07:19
PR 15695 merged rhettinger, 2019-09-05 07:56
PR 15696 merged miss-islington, 2019-09-05 08:03
Messages (15)
msg338120 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-03-17 08:15
Give statistics.NormalDist()a method for computing the inverse cumulative distribution function.  Model it after the NORM.INV function in MS Excel.

https://support.office.com/en-us/article/norm-inv-function-54b30935-fee7-493c-bedb-2278a9db7e13

Use the high accuracy approximation found here:  http://csg.sph.umich.edu/abecasis/gas_power_calculator/algorithm-as-241-the-percentage-points-of-the-normal-distribution.pdf
msg338306 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2019-03-19 01:06
Looks good to me.

Later I will do some spot checks against the results returned by the Nspire calculator, but in the meantime I think this can go in. Thanks for your efforts Raymond, I think this NormalDist is shaping up to be a great addition.
msg338313 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-03-19 03:17
New changeset 714c60d7aca6d0f6d73ad2d7c876d2d683a7fce3 by Raymond Hettinger in branch 'master':
bpo-36324: Add inv_cdf() to statistics.NormalDist() (GH-12377)
https://github.com/python/cpython/commit/714c60d7aca6d0f6d73ad2d7c876d2d683a7fce3
msg338314 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-03-19 03:18
Thanks Steven.
msg338410 - (view) Author: miss-islington (miss-islington) Date: 2019-03-19 21:29
New changeset fe13883f01da855967403acab77e0f16707a56cb by Miss Islington (bot) (Raymond Hettinger) in branch 'master':
bpo-36324: Improved code formatting for the NormalDist.inv_cdf rational approximation (GH-12448)
https://github.com/python/cpython/commit/fe13883f01da855967403acab77e0f16707a56cb
msg338450 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2019-03-20 10:05
On Tue, Mar 19, 2019 at 01:06:45AM +0000, Steven D'Aprano wrote:
> Later I will do some spot checks against the results returned by the Nspire calculator

Looks good to me, they agree to 6 decimal places in my tests. Following 
Mark's earlier investigation, I expect that where they differ, it is the 
Nspire which is wrong.
msg338511 - (view) Author: miss-islington (miss-islington) Date: 2019-03-20 20:29
New changeset 2afb59861827a23c1b50e44022bb77291351c2f1 by Miss Islington (bot) (Raymond Hettinger) in branch 'master':
bpo-36324: NormalDist() add more tests and update comments (GH-12476)
https://github.com/python/cpython/commit/2afb59861827a23c1b50e44022bb77291351c2f1
msg348228 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-07-21 07:34
New changeset 02c91f59b6f6e720a9e89635e00c55bcf7f932a8 by Raymond Hettinger in branch 'master':
bpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871)
https://github.com/python/cpython/commit/02c91f59b6f6e720a9e89635e00c55bcf7f932a8
msg348230 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-07-21 07:55
New changeset c613c3319ed9bdc8cd74c730ad946169c0776c8a by Raymond Hettinger (Miss Islington (bot)) in branch '3.8':
bpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871) (GH-14875)
https://github.com/python/cpython/commit/c613c3319ed9bdc8cd74c730ad946169c0776c8a
msg348995 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-08-04 18:52
New changeset 8183bb8150edcac6a7525bfb7708d08837ecb095 by Raymond Hettinger in branch 'master':
bpo-36324: Update comments to include the target hash sums (GH-15110)
https://github.com/python/cpython/commit/8183bb8150edcac6a7525bfb7708d08837ecb095
msg348996 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-08-04 19:16
New changeset d7d607c000a28432f87d24d2a5a9315c51017041 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8':
bpo-36324: Update comments to include the target hash sums (GH-15110) (GH-15112)
https://github.com/python/cpython/commit/d7d607c000a28432f87d24d2a5a9315c51017041
msg351184 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-09-05 07:18
New changeset e4810b2a6c1d0db1a27ad046831b8fa3b57967a4 by Raymond Hettinger in branch 'master':
bpo-36324:  Apply review comments from Allen Downey (GH-15693)
https://github.com/python/cpython/commit/e4810b2a6c1d0db1a27ad046831b8fa3b57967a4
msg351187 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-09-05 07:42
New changeset dafbe3265657dc5a5c46e762080023f0aa25ec58 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8':
bpo-36324:  Apply review comments from Allen Downey (GH-15693) (GH-15694)
https://github.com/python/cpython/commit/dafbe3265657dc5a5c46e762080023f0aa25ec58
msg351189 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-09-05 08:03
New changeset 9b51570ffd0494c07dafe10c7d2afe865754694c by Raymond Hettinger in branch 'master':
bpo-36324:  Apply review comment from Jake Vanderplas (GH-15695)
https://github.com/python/cpython/commit/9b51570ffd0494c07dafe10c7d2afe865754694c
msg351190 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-09-05 08:10
New changeset f5649bfe7622447b302ef55e4db3a96b5840f8e8 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8':
bpo-36324:  Apply review comment from Jake Vanderplas (GH-15695) (GH-15696)
https://github.com/python/cpython/commit/f5649bfe7622447b302ef55e4db3a96b5840f8e8
History
Date User Action Args
2022-04-11 14:59:12adminsetgithub: 80505
2019-09-05 08:10:44rhettingersetmessages: + msg351190
2019-09-05 08:03:24miss-islingtonsetpull_requests: + pull_request15353
2019-09-05 08:03:20rhettingersetmessages: + msg351189
2019-09-05 07:56:50rhettingersetpull_requests: + pull_request15352
2019-09-05 07:42:31rhettingersetmessages: + msg351187
2019-09-05 07:19:06miss-islingtonsetpull_requests: + pull_request15351
2019-09-05 07:18:50rhettingersetmessages: + msg351184
2019-09-05 06:48:33rhettingersetpull_requests: + pull_request15350
2019-08-04 19:16:22rhettingersetmessages: + msg348996
2019-08-04 18:53:54miss-islingtonsetpull_requests: + pull_request14854
2019-08-04 18:52:08rhettingersetmessages: + msg348995
2019-08-04 18:16:37rhettingersetpull_requests: + pull_request14852
2019-07-21 07:55:23rhettingersetmessages: + msg348230
2019-07-21 07:35:03miss-islingtonsetpull_requests: + pull_request14662
2019-07-21 07:34:57rhettingersetmessages: + msg348228
2019-07-20 17:02:14rhettingersetpull_requests: + pull_request14660
2019-03-20 20:29:11miss-islingtonsetmessages: + msg338511
2019-03-20 20:10:17rhettingersetpull_requests: + pull_request12428
2019-03-20 10:05:19steven.dapranosetmessages: + msg338450
2019-03-19 21:29:18miss-islingtonsetnosy: + miss-islington
messages: + msg338410
2019-03-19 21:11:34rhettingersetpull_requests: + pull_request12402
2019-03-19 03:18:52rhettingersetstatus: open -> closed
resolution: fixed
messages: + msg338314

stage: patch review -> resolved
2019-03-19 03:17:17rhettingersetmessages: + msg338313
2019-03-19 01:06:45steven.dapranosetmessages: + msg338306
2019-03-17 08:27:02rhettingersetkeywords: + patch
stage: patch review
pull_requests: + pull_request12337
2019-03-17 08:15:39rhettingercreate