We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 4: Normal Distribution #1
Day 4: Normal Distribution #1
Sort by
recency
|
26 Discussions
|
Please Login in order to post a comment
So everyone publishes his code??
Now here is mine (wasn't aware of , what a pity).
Here is my answer:
erf and erfc, which are +- antiderivatives of the gaussian (with a specific choice of +c) is in the python math library. So, you can easily write the CDF of normal dist using either erf or erfc.
Entering in three lines 0.99379... 0.98777... 0.39435... Rounding in any possible way to the required scale of three decimal places. Wrong answer! However, no doubts, the numbers are correct...
This might help some of you who have issues with this problem. In python 2: 3/2 is integer division (returns 1 instead of 1.5), that wasted so much time for me to debug.