T-Student question

Martin Jansche jansche@ling.ohio-state.edu
Tue Apr 29 20:21:00 GMT 2003


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



More information about the Gsl-discuss mailing list