| Author |
Message |
Schizoid Man science forum beginner
Joined: 24 Jan 2006
Posts: 25
|
Posted: Tue Jun 20, 2006 4:43 am Post subject:
Numerical integration of the t-distribution
|
|
|
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
|
Posted: Tue Jun 20, 2006 7:11 am Post subject:
Re: Numerical integration of the t-distribution
|
|
|
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
|
Posted: Thu Jun 22, 2006 10:15 pm Post subject:
Re: Numerical integration of the t-distribution
|
|
|
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
|
Posted: Fri Jun 23, 2006 4:07 pm Post subject:
Re: Numerical integration of the t-distribution
|
|
|
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
|
Posted: Fri Jun 23, 2006 4:07 pm Post subject:
Re: Numerical integration of the t-distribution
|
|
|
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
|
Posted: Fri Jun 23, 2006 4:44 pm Post subject:
Re: Numerical integration of the t-distribution
|
|
|
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
|
Posted: Fri Jun 23, 2006 8:05 pm Post subject:
Re: Numerical integration of the t-distribution
|
|
|
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
|
Posted: Fri Jun 23, 2006 8:07 pm Post subject:
Re: Numerical integration of the t-distribution
|
|
|
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 |
|
 |
|