Python Forum

Full Version: finding the integral of probability density function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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).
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?
(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-ca...-functions