This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: T-Student question
- From: Martin Jansche <jansche at ling dot ohio-state dot edu>
- To: <gsl-discuss at sources dot redhat dot com>
- Date: Tue, 29 Apr 2003 16:21:38 -0400 (EDT)
- Subject: Re: T-Student question
On Tue, 29 Apr 2003, Asier wrote:
> I must know that t_(n-1;\alpha). I usually have seen this data in
> tables
[...]
> I need to know how to calculate this kind of tables. If I know the
> degrees of freedom and the probability, I want to calculate the
> data in the table.
Unless you want to do this via root-finding, you'd need a way to
calculate the inverse function (with respect to the third parameter)
of gsl_sf_beta_inc. If you had a function f such that f(a,b,y)=x iff
gsl_sf_beta_inc(a,b,x)=y, you could then calculate
sqrt(nu * (1 / f(2*(1-p), nu/2, 0.5) - 1))
to get the critical value for a given p-value and degrees of freedom
nu.
The requisite function f does not seem to be part of GSL yet, but
would be useful to have. Mathematica has InverseBetaRegularized,
which seems to be what you need.
Without an explicit inverse of the incomplete Beta function, you can
use standard root finding with derivatives.
> I think I'll have the same problem with the Pearson's chi-square function
Same situation. You'll need to calculate the inverse function of
gsl_sf_gamma_inc_P.
- martin