(15C)(DM15) - PDF/CDF and Inverse of a Normal Distribution
|
11-24-2021, 03:37 PM
Post: #1
|
|||
|
|||
(15C)(DM15) - PDF/CDF and Inverse of a Normal Distribution
Hello!
This is my second program I wrote for my new DM15. It calculates the probability density function (PDF), the cumulative distribution function (CDF) and their inverse functions (!) of a standardized normal function. Call it with the argument (Y) and the desired function number (X). The function number is 1 for the PDF, 2 for its inverse, 3 for the CDF and 4 for its inverse. To calculate the CDF I used some approximating function rather than integrating the PDF, which offers a accuracy of at least 2 digits (error < 1%) and is much faster. The label to call is D (distribution). Examples: * 0 (Y) and 1 (X) calculates PDF(0)=0.39 * 0.1 (Y) and 2 (X) calculates 1.66 (the positive solution) where the PDF is 0.1 * 1 (Y) and 3 (X) calculates CDF(1)=0.84 * 0.95 (Y) and 4 (X) calculates 1.64 where CDF(1.64)=0.95 The Code: Code:
Have fun! Regards deetee |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(15C)(DM15) - PDF/CDF and Inverse of a Normal Distribution - deetee - 11-24-2021 03:37 PM
RE: (15C)(DM15) - PDF/CDF and Inverse of a Normal Distribution - Albert Chan - 11-25-2021, 01:27 PM
RE: (15C)(DM15) - PDF/CDF and Inverse of a Normal Distribution - deetee - 11-28-2021, 11:44 AM
RE: (15C)(DM15) - PDF/CDF and Inverse of a Normal Distribution - John Keith - 11-28-2021, 02:02 PM
RE: (15C)(DM15) - PDF/CDF and Inverse of a Normal Distribution - Albert Chan - 11-28-2021, 05:37 PM
RE: (15C)(DM15) - PDF/CDF and Inverse of a Normal Distribution - deetee - 11-30-2021, 11:07 AM
RE: (15C)(DM15) - PDF/CDF and Inverse of a Normal Distribution - Albert Chan - 11-30-2021, 01:28 PM
RE: (15C)(DM15) - PDF/CDF and Inverse of a Normal Distribution - deetee - 11-30-2021, 02:46 PM
|
User(s) browsing this thread: 1 Guest(s)