Python Forum
finding the integral of probability density function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
finding the integral of probability density function
#1
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?
Reply
#2
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).
Reply
#3
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?
Reply
#4
(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
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  inserting something into probability density SchroedingersLion 1 518 Jan-06-2020, 09:15 AM
Last Post: Gribouillis
  Get underlying function from Kernel Density Estimation jpython 3 635 Dec-05-2019, 11:23 AM
Last Post: jpython
  How to get the probability density function of my data set jpython 1 487 Dec-04-2019, 12:49 PM
Last Post: Larz60+
  MatPlotLib 2d plot of current density? ruben 0 570 May-13-2019, 06:47 AM
Last Post: ruben
  Hydrogen ground state integral Eduard 2 936 Sep-26-2018, 10:19 PM
Last Post: Eduard
  How to check for nested dataframe density? python_newbie09 0 735 Aug-27-2018, 07:34 PM
Last Post: python_newbie09
  Draw Weibull distribution probability function based on Confidence interval farzadtb 1 1,516 Jul-31-2018, 03:21 PM
Last Post: Vysero
  Plot Probability Density of an Histogram Python_TLS 1 998 Jun-28-2018, 06:19 AM
Last Post: scidam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020