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.

Author steven.daprano
Recipients davin, mark.dickinson, miss-islington, rhettinger, selik, steven.daprano, tim.peters, xtreak
Date 2019-03-11.11:31:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552303891.34.0.303986564768.issue36018@roundup.psfhosted.org>
In-reply-to
Content
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 about the 8th decimal place:


py> x = statistics.NormalDist(2, 1.3)
py> x.cdf(5.374)
0.9952757439207682
# Nspire normCdf(-∞, 5.372, 2, 1.3) returns 0.995275710979
# difference of 3.294176820212158e-08


py> x.cdf(-0.23)
0.04313736707891003
# Nspire normCdf(-∞, -0.23, 2, 1.3) returns 0.043137332077
# difference of 3.500191003008579e-08

Wolfram Alpha doesn't help me decide which is correct, as it doesn't show enough decimal places.

https://www.wolframalpha.com/input/?i=CDF[+NormalDistribution[2,+1.3],+5.374+]

https://www.wolframalpha.com/input/?i=CDF[+NormalDistribution[2,+1.3],+-0.23+]


Do we care about this difference? Should I raise a new ticket for it?
History
Date User Action Args
2019-03-11 11:31:31steven.dapranosetrecipients: + steven.daprano, tim.peters, rhettinger, mark.dickinson, davin, selik, miss-islington, xtreak
2019-03-11 11:31:31steven.dapranosetmessageid: <1552303891.34.0.303986564768.issue36018@roundup.psfhosted.org>
2019-03-11 11:31:31steven.dapranolinkissue36018 messages
2019-03-11 11:31:31steven.dapranocreate