FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Math » num-analysis
Numerical integration of the t-distribution
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
Author Message
Schizoid Man
science forum beginner


Joined: 24 Jan 2006
Posts: 25

PostPosted: Tue Jun 20, 2006 4:43 am    Post subject: Numerical integration of the t-distribution Reply with quote

Hi,

Could someone suggest a good technique for the numerical integration of
the t-distribution density function?

Can I use something straightforward like Gauss-Legendre quadrature or
will I need something a little more subtle?

Thanks,
Schiz
Back to top
Robert B. Israel
science forum Guru


Joined: 24 Mar 2005
Posts: 2151

PostPosted: Tue Jun 20, 2006 7:11 am    Post subject: Re: Numerical integration of the t-distribution Reply with quote

In article <e77ue6$rkg$1@geraldo.cc.utexas.edu>,
Schizoid Man <schiz@sf.com> wrote:


Quote:
Could someone suggest a good technique for the numerical integration of
the t-distribution density function?

Can I use something straightforward like Gauss-Legendre quadrature or
will I need something a little more subtle?

The density, being a constant times (1+t^2/nu)^(-(nu+1)/2) where nu is the
number of degrees of freedom, is a nice analytic function. I don't see
any reason why it should be particularly challenging for any standard
numerical technique.

You can also evaluate the cdf in terms of a hypergeometric function. For
any particular integer nu, it can be written in a reasonably convenient
"closed form". So numerical integration shouldn't really be necessary.

Robert Israel israel@math.MyUniversity'sInitials.ca
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
Back to top
Schizoid Man
science forum beginner


Joined: 24 Jan 2006
Posts: 25

PostPosted: Thu Jun 22, 2006 10:15 pm    Post subject: Re: Numerical integration of the t-distribution Reply with quote

Robert Israel wrote:
Quote:
In article <e77ue6$rkg$1@geraldo.cc.utexas.edu>,
Schizoid Man <schiz@sf.com> wrote:


Could someone suggest a good technique for the numerical integration of
the t-distribution density function?

Can I use something straightforward like Gauss-Legendre quadrature or
will I need something a little more subtle?

The density, being a constant times (1+t^2/nu)^(-(nu+1)/2) where nu is the
number of degrees of freedom, is a nice analytic function. I don't see
any reason why it should be particularly challenging for any standard
numerical technique.

You can also evaluate the cdf in terms of a hypergeometric function. For
any particular integer nu, it can be written in a reasonably convenient
"closed form". So numerical integration shouldn't really be necessary.

Hi Robert,

I actually need to integrate the product of the density function of the
t-distribution and another function over a particular limit.

I'm building a financial pricing model, where the user can swap out the
distribution of choice - normal, t, double t, etc - and I needed some
generic numerical integration technique, because some of these
distributions might not have closed form solutions.

Thanks.
Back to top
dave_and_darla@Juno.com
science forum beginner


Joined: 17 Oct 2005
Posts: 49

PostPosted: Fri Jun 23, 2006 4:07 pm    Post subject: Re: Numerical integration of the t-distribution Reply with quote

Schizoid Man wrote:
Quote:
I actually need to integrate the product of the density function of the
t-distribution and another function over a particular limit.

If the limits stay the same from integral to integral, and you need to
do a lot of the integrals, it may pay to construct a Gaussian-type
quadrature rule for the t-distribution and your particular limits.

Dave
Back to top
dave_and_darla@Juno.com
science forum beginner


Joined: 17 Oct 2005
Posts: 49

PostPosted: Fri Jun 23, 2006 4:07 pm    Post subject: Re: Numerical integration of the t-distribution Reply with quote

Schizoid Man wrote:
Quote:
I actually need to integrate the product of the density function of the
t-distribution and another function over a particular limit.

If the limits stay the same from integral to integral, and you need to
do a lot of the integrals, it may pay to construct a Gaussian-type
quadrature rule for the t-distribution and your particular limits.

Dave
Back to top
Schizoid Man
science forum beginner


Joined: 24 Jan 2006
Posts: 25

PostPosted: Fri Jun 23, 2006 4:44 pm    Post subject: Re: Numerical integration of the t-distribution Reply with quote

Dave Dodson wrote:
Quote:
Schizoid Man wrote:
I actually need to integrate the product of the density function of the
t-distribution and another function over a particular limit.

If the limits stay the same from integral to integral, and you need to
do a lot of the integrals, it may pay to construct a Gaussian-type
quadrature rule for the t-distribution and your particular limits.

Ideally, I would like to integrate over [-inf, +inf] in which case
Gauss-Hermite would be perfect for the normal distribution.

For other distributions like the t, should I just used something like
Gauss-Legendre over a 'reasonably large' interval like [-8, +8]?
Back to top
dave_and_darla@Juno.com
science forum beginner


Joined: 17 Oct 2005
Posts: 49

PostPosted: Fri Jun 23, 2006 8:05 pm    Post subject: Re: Numerical integration of the t-distribution Reply with quote

Schizoid Man wrote:
Quote:
Dave Dodson wrote:
If the limits stay the same from integral to integral, and you need to
do a lot of the integrals, it may pay to construct a Gaussian-type
quadrature rule for the t-distribution and your particular limits.

Ideally, I would like to integrate over [-inf, +inf] in which case
Gauss-Hermite would be perfect for the normal distribution.

For other distributions like the t, should I just used something like
Gauss-Legendre over a 'reasonably large' interval like [-8, +8]?

What I am suggesting is to find or figure out the weights and abscissas
when the weight function is the t-distribution. I'm pretty sure that
there is software to do that. Maybe even in Numerical Recipes. You will
get better accuracy for the amount of effort with a quadrature formula
for your specific weight function.

Dave
Back to top
dave_and_darla@Juno.com
science forum beginner


Joined: 17 Oct 2005
Posts: 49

PostPosted: Fri Jun 23, 2006 8:07 pm    Post subject: Re: Numerical integration of the t-distribution Reply with quote

Dave Dodson wrote:
Quote:
What I am suggesting is to find or figure out the weights and abscissas
when the weight function is the t-distribution. I'm pretty sure that
there is software to do that. Maybe even in Numerical Recipes. You will
get better accuracy for the amount of effort with a quadrature formula
for your specific weight function.

Sorry to reply to my own post, but I should have looked for a reference
before posting...

Try: www.cs.purdue.edu/archives/2002/wxg/codes/OPQ.html

Dave
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
The time now is Sat Jan 10, 2009 2:31 am | All times are GMT
Forum index » Science and Technology » Math » num-analysis
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Help in identifying a numerical method Don num-analysis 2 Thu Jul 20, 2006 8:56 pm
No new posts Expectation value in terms of cumulat... Randy Poe Math 6 Wed Jul 19, 2006 9:34 pm
No new posts Distribution of Goldbach pairs as eve... stargene@sbcglobal.net Math 1 Mon Jul 17, 2006 5:02 am
No new posts Recommendation for numerical differen... 1940LaSalle@gmail.com num-analysis 6 Wed Jul 12, 2006 8:07 pm
No new posts Numerical differentiation formulas? 1940LaSalle@gmail.com Math 2 Wed Jul 12, 2006 8:01 pm

Guitar Lessons | Credit Counseling | Bankruptcy | Debt Consolidation | Web Designer
Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.4659s ][ Queries: 16 (0.3649s) ][ GZIP on - Debug on ]