Python Forum
finding the integral of probability density function - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: finding the integral of probability density function (/thread-20437.html)



finding the integral of probability density function - Staph - Aug-11-2019

Given a probability density function (pdf) like this

pdf = skew_norm_pdf(x,location,scale,SKEW_PARAMS[0])

how can I find the integral for this pdf in python?


RE: finding the integral of probability density function - ndc85430 - Aug-11-2019

Do you really need to, given that you know it should be 1? It might not be exactly 1 due to rounding errors, but it should be pretty close.

In any case, in general, if you have values of a function at some points (e.g. in an array or something), the techniques for finding the integral come under the term "numerical integration". SciPy provides implementations of some of these techniques (see the docs).


RE: finding the integral of probability density function - Staph - Aug-11-2019

Thanks, so I have two of such pdfs generated on range of x and I am trying to calculate area overlap between the two. any help in that regards?


RE: finding the integral of probability density function - buran - Aug-11-2019

(Aug-11-2019, 07:37 AM)Staph Wrote: Thanks, so I have two of such pdfs generated on range of x and I am trying to calculate area overlap between the two. any help in that regards?
Please, keep the discussion on the original thread.
https://python-forum.io/Thread-how-to-calculate-overlaping-coefficient-between-two-probablity-functions