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

Inverse cumulative normal distribution function #80505

Closed
rhettinger opened this issue Mar 17, 2019 · 15 comments
Closed

Inverse cumulative normal distribution function #80505

rhettinger opened this issue Mar 17, 2019 · 15 comments
Assignees
Labels
3.8 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@rhettinger
Copy link
Contributor

BPO 36324
Nosy @rhettinger, @stevendaprano, @miss-islington
PRs
  • bpo-36324: Add inv_cdf() to statistics.NormalDist() #12377
  • bpo-36324: Improved code formatting for the NormalDist.inv_cdf rational approximation #12448
  • bpo-36324: NormalDist() add more tests and update comments #12476
  • bpo-36324: Make internal attributes for statistics.NormalDist() private. #14871
  • [3.8] bpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871) #14875
  • bpo-36324: Update comments to include the target hash sums #15110
  • [3.8] bpo-36324: Update comments to include the target hash sums (GH-15110) #15112
  • bpo-36324: Apply review comments from Allen Downey #15693
  • [3.8] bpo-36324: Apply review comments from Allen Downey (GH-15693) #15694
  • bpo-36324: Apply review comment from Jake Vanderplas #15695
  • [3.8] bpo-36324: Apply review comment from Jake Vanderplas (GH-15695) #15696
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/stevendaprano'
    closed_at = <Date 2019-03-19.03:18:52.625>
    created_at = <Date 2019-03-17.08:15:39.483>
    labels = ['3.8', 'type-feature', 'library']
    title = 'Inverse cumulative normal distribution function'
    updated_at = <Date 2019-09-05.08:10:44.232>
    user = 'https://github.com/rhettinger'

    bugs.python.org fields:

    activity = <Date 2019-09-05.08:10:44.232>
    actor = 'rhettinger'
    assignee = 'steven.daprano'
    closed = True
    closed_date = <Date 2019-03-19.03:18:52.625>
    closer = 'rhettinger'
    components = ['Library (Lib)']
    creation = <Date 2019-03-17.08:15:39.483>
    creator = 'rhettinger'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36324
    keywords = ['patch']
    message_count = 15.0
    messages = ['338120', '338306', '338313', '338314', '338410', '338450', '338511', '348228', '348230', '348995', '348996', '351184', '351187', '351189', '351190']
    nosy_count = 3.0
    nosy_names = ['rhettinger', 'steven.daprano', 'miss-islington']
    pr_nums = ['12377', '12448', '12476', '14871', '14875', '15110', '15112', '15693', '15694', '15695', '15696']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue36324'
    versions = ['Python 3.8']

    @rhettinger
    Copy link
    Contributor Author

    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

    @rhettinger rhettinger added the 3.8 only security fixes label Mar 17, 2019
    @rhettinger rhettinger added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Mar 17, 2019
    @stevendaprano
    Copy link
    Member

    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.

    @rhettinger
    Copy link
    Contributor Author

    New changeset 714c60d by Raymond Hettinger in branch 'master':
    bpo-36324: Add inv_cdf() to statistics.NormalDist() (GH-12377)
    714c60d

    @rhettinger
    Copy link
    Contributor Author

    Thanks Steven.

    @miss-islington
    Copy link
    Contributor

    New changeset fe13883 by Miss Islington (bot) (Raymond Hettinger) in branch 'master':
    bpo-36324: Improved code formatting for the NormalDist.inv_cdf rational approximation (GH-12448)
    fe13883

    @stevendaprano
    Copy link
    Member

    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.

    @miss-islington
    Copy link
    Contributor

    New changeset 2afb598 by Miss Islington (bot) (Raymond Hettinger) in branch 'master':
    bpo-36324: NormalDist() add more tests and update comments (GH-12476)
    2afb598

    @rhettinger
    Copy link
    Contributor Author

    New changeset 02c91f5 by Raymond Hettinger in branch 'master':
    bpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871)
    02c91f5

    @rhettinger
    Copy link
    Contributor Author

    New changeset c613c33 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8':
    bpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871) (GH-14875)
    c613c33

    @rhettinger
    Copy link
    Contributor Author

    New changeset 8183bb8 by Raymond Hettinger in branch 'master':
    bpo-36324: Update comments to include the target hash sums (GH-15110)
    8183bb8

    @rhettinger
    Copy link
    Contributor Author

    New changeset d7d607c by Raymond Hettinger (Miss Islington (bot)) in branch '3.8':
    bpo-36324: Update comments to include the target hash sums (GH-15110) (GH-15112)
    d7d607c

    @rhettinger
    Copy link
    Contributor Author

    New changeset e4810b2 by Raymond Hettinger in branch 'master':
    bpo-36324: Apply review comments from Allen Downey (GH-15693)
    e4810b2

    @rhettinger
    Copy link
    Contributor Author

    New changeset dafbe32 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8':
    bpo-36324: Apply review comments from Allen Downey (GH-15693) (GH-15694)
    dafbe32

    @rhettinger
    Copy link
    Contributor Author

    New changeset 9b51570 by Raymond Hettinger in branch 'master':
    bpo-36324: Apply review comment from Jake Vanderplas (GH-15695)
    9b51570

    @rhettinger
    Copy link
    Contributor Author

    New changeset f5649bf by Raymond Hettinger (Miss Islington (bot)) in branch '3.8':
    bpo-36324: Apply review comment from Jake Vanderplas (GH-15695) (GH-15696)
    f5649bf

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants