Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

statprob.h File Reference

Probability functions for statistics: regularized incomplete gamma and beta. More...

Go to the source code of this file.

Enumerations

enum  Statproberr_ { STATPROB_OK = 0, STATPROB_BADARGS, STATPROB_NOCONV }
 Error codes. More...


Functions

double stdnorm_tail (double z)
 Returns the tail of the standard normal distribution at z.

double t_test (unsigned int df, double t, int *Err)
 Returns the significance level for the t test. More...

double F_test (unsigned int df1, unsigned int df2, double F, int *Err)
 Returns the significance level for the test that the F ratio is larger than 1.0. More...

double chi2_test (unsigned int df, double Chi2, int *Err)
 Returns the significance level for the test that the Chi2 is exceeded for a correct model. More...

double igamma_regul (double a, double x, int *Err)
 Calculates and returns the regularized incomplete gamma function (1/Gamma(a))*INTEGRAL[exp(-t)*t^(a-1) dt, 0, x]. More...

double complement_incomplgamma_regul (double a, double x, int *Err)
 This is 1-igamma_regul(a, x). More...

double ibeta_regul (double a, double b, double x, int *Err)
 The regularized incomplete beta function. More...


Detailed Description

Probability functions for statistics: regularized incomplete gamma and beta.

Author(s):
Andras Aszodi
Date:
2-Jul-2002.

Definition in file statprob.h.


Enumeration Type Documentation

enum Statproberr_
 

Error codes.

Enumeration values:
STATPROB_OK  
STATPROB_BADARGS  
STATPROB_NOCONV  

Definition at line 22 of file statprob.h.


Function Documentation

double stdnorm_tail ( double z )
 

Returns the tail of the standard normal distribution at z.

double t_test ( unsigned int df,
double t,
int * Err )
 

Returns the significance level for the t test.

If the value returned by t_test() is low, then the probability is large that t is high. An error code is returned in *Err if Err!=NULL and something went wrong.

double F_test ( unsigned int df1,
unsigned int df2,
double F,
int * Err )
 

Returns the significance level for the test that the F ratio is larger than 1.0.

If the value returned by F_test() is low, then the probability is large that F is high. An error code is returned in *Err if Err!=NULL and something went wrong.

double chi2_test ( unsigned int df,
double Chi2,
int * Err )
 

Returns the significance level for the test that the Chi2 is exceeded for a correct model.

The less the probability, the better. :-) An error code is returned in *Err if Err!=NULL and something went wrong.

double igamma_regul ( double a,
double x,
int * Err )
 

Calculates and returns the regularized incomplete gamma function (1/Gamma(a))*INTEGRAL[exp(-t)*t^(a-1) dt, 0, x].

If Err!=NULL, then an appropriate error code is returned in *Err if something went wrong (see the Statproberr_ typedef above). igamma_regul(dof/2, chi^2/2) gives the probability that the correct model's chi^2 value (with dof degrees of freedom) is less than chi^2. See also complement_incomplgamma_regul(...) below.

double complement_incomplgamma_regul ( double a,
double x,
int * Err )
 

This is 1-igamma_regul(a, x).

complement_incomplgamma_regul(dof/2, chi^2/2) gives the probability that the chi2 value is exceeded even for a correct model: the less the better :-)

double ibeta_regul ( double a,
double b,
double x,
int * Err )
 

The regularized incomplete beta function.

If x is outside the range [0..1] then -1.0 is returned and *Err is set to STATPROB_BADARGS if Err!=NULL.


Generated at Wed Aug 21 09:33:30 2002 for The Razorback C Library: Statistics by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001