Search   Memberlist   Usergroups
 Page 1 of 1 [3 Posts]
Author Message
glare22@gmail.com
science forum beginner

Joined: 12 Jul 2006
Posts: 7

Posted: Wed Jul 12, 2006 8:38 pm    Post subject: Re: Is there a program for numerically integrating a PDF to get CDF

Thanks a lot.

I have tried to use dqk61 to estimate the value in a small range of
0.0125 where the peak exists, I get a very large number. I will try
dqagi and dqags.

Peter Spellucci wrote:
 Quote: In article <1152695303.927180.168540@m79g2000cwm.googlegroups.com>, glare22@gmail.com writes: I want to get the CDF from the integration of a given PDF. Is there a program I can use for this purpose? Currently I use qk15i from the quadpack. But the result is not good. For the PDF with a sharp peak, it gives totally wrong results. Can anyone help me? Thanks. Liang you are using the wrong code: 1. quadpack/qk15i.f ( plus dependencies ) gams: H2a3a2,H2a4a2 for: estimate 1D integral on (semi)infinite interval using a 15 point quadrature rule,non-automatic prec: single Score: 100% first of all, switch to an adaptive automatic integrator. then you also must be able to estimate the witdth of possible peaks in order to set the tolerances \so tight such that the adaptive mechanism is forced the refine the grid correspondingly. this is not too hard to do. with prior knowledge of the integrand you can outwit any numerical integrator: it "sees" the integrand only at the grid which is constructed automatically using some rules. In your case, where you want to construct a table of a indefinite integral, you can proceed stepwise, using a semiinfinte interval first with a strong tolerance and then using finite intervals using other adaptive code from quadpack. dqagi and dqags would be a choice hth peter
Peter Spellucci
science forum Guru

Joined: 29 Apr 2005
Posts: 702

Posted: Wed Jul 12, 2006 10:27 am    Post subject: Re: Is there a program for numerically integrating a PDF to get CDF

glare22@gmail.com writes:
 Quote: I want to get the CDF from the integration of a given PDF. Is there a program I can use for this purpose? Currently I use qk15i from the quadpack. But the result is not good. For the PDF with a sharp peak, it gives totally wrong results. Can anyone help me? Thanks. Liang

you are using the wrong code:
1. quadpack/qk15i.f ( plus dependencies )
gams: H2a3a2,H2a4a2
for: estimate 1D integral on (semi)infinite interval using a 15 point quadrature rule,non-automatic
prec: single
Score: 100%

first of all, switch to an adaptive automatic integrator. then you also must be
able to estimate the witdth of possible peaks in order to set the tolerances \so
tight such that the adaptive mechanism is forced the refine the grid
correspondingly. this is not too hard to do. with prior knowledge of
the integrand you can outwit any numerical integrator: it "sees" the integrand
only at the grid which is constructed automatically using some rules.
In your case, where you want to construct a table of a indefinite integral,
you can proceed stepwise, using a semiinfinte interval first with a strong
tolerance and then using finite intervals using other adaptive code from
dqagi and dqags would be a choice
hth
peter
glare22@gmail.com
science forum beginner

Joined: 12 Jul 2006
Posts: 7

 Posted: Wed Jul 12, 2006 9:08 am    Post subject: Is there a program for numerically integrating a PDF to get CDF I want to get the CDF from the integration of a given PDF. Is there a program I can use for this purpose? Currently I use qk15i from the quadpack. But the result is not good. For the PDF with a sharp peak, it gives totally wrong results. Can anyone help me? Thanks. Liang

 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 Page 1 of 1 [3 Posts]
 The time now is Sat Apr 20, 2019 10:12 am | All times are GMT
 Jump to: Select a forum-------------------Forum index|___Science and Technology    |___Math    |   |___Research    |   |___num-analysis    |   |___Symbolic    |   |___Combinatorics    |   |___Probability    |   |   |___Prediction    |   |       |   |___Undergraduate    |   |___Recreational    |       |___Physics    |   |___Research    |   |___New Theories    |   |___Acoustics    |   |___Electromagnetics    |   |___Strings    |   |___Particle    |   |___Fusion    |   |___Relativity    |       |___Chem    |   |___Analytical    |   |___Electrochem    |   |   |___Battery    |   |       |   |___Coatings    |       |___Engineering        |___Control        |___Mechanics        |___Chemical

 Topic Author Forum Replies Last Post Similar Topics How to solve linear program with matrix variable ? Fan num-analysis 4 Thu Jul 13, 2006 5:55 am Is there a program for numerically integrating a PDF to g... glare22@gmail.com num-analysis 5 Wed Jul 12, 2006 9:02 am DONT let the CHILD RAPING EVIL AMERICAN GOVT PSYCHOPATHS ... McGinnn Math 2 Sun Jul 09, 2006 10:28 pm Integrating t^(-3/2) * e^(1/t) Konrad Viltersten Math 7 Wed Jul 05, 2006 2:27 pm eCheminfo Drug Discovery Community of Practice Meeting, B... The Ferryman Chem 1 Tue Jun 27, 2006 2:17 pm