math_utils
Class HelperFuncs

java.lang.Object
  extended by math_utils.HelperFuncs

public class HelperFuncs
extends java.lang.Object

Helper functions for statistical computations. Used by TailProbs. Many of the implementations here are borrowed from Numerical Recipes (Ch. 6).

Author:
chaiml

Constructor Summary
HelperFuncs()
           
 
Method Summary
static double betacf(double a, double b, double x)
          Used by betai(): Evaluates continued fraction for incomplete beta function by modified Lentz's method.
static double betai(double a, double b, double x)
          Returns the incomplete beta function Ix(a,b).
static double erff(double x)
          Returns the error-function erf(x).
static double erffc(double x)
          Returns the complementary error-function erfc(x)=1-erf(x).
static double gammln(double xx)
          Returns the value ln(Gamma(xx)) for xx>0.
static double gammp(double a, double x)
          Returns the incomplete gamma function P(a,x).
static double gammq(double a, double x)
          Returns the incomplete gamma function Q(a,x)=1-P(a,x).
static double gcf(double a, double x)
          Returns the incomplete gamma function Q(a,x) evaluated by its continued fraction representation.
static double gser(double a, double x)
          Returns the incomplete gamma function P(a,x) evaluated by its series representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HelperFuncs

public HelperFuncs()
Method Detail

gammp

public static double gammp(double a,
                           double x)
Returns the incomplete gamma function P(a,x). Implementation from Numerical Recipes (Chapter 6).


gammq

public static double gammq(double a,
                           double x)
Returns the incomplete gamma function Q(a,x)=1-P(a,x). Implementation from Numerical Recipes (Chapter 6).


gser

public static double gser(double a,
                          double x)
Returns the incomplete gamma function P(a,x) evaluated by its series representation. Implementation from Numerical Recipes (Chapter 6).


gcf

public static double gcf(double a,
                         double x)
Returns the incomplete gamma function Q(a,x) evaluated by its continued fraction representation. Implementation from Numerical Recipes (Chapter 6).


gammln

public static double gammln(double xx)
Returns the value ln(Gamma(xx)) for xx>0. Implementation from Numerical Recipes (Chapter 6).


betai

public static double betai(double a,
                           double b,
                           double x)
Returns the incomplete beta function Ix(a,b). Implementation from Numerical Recipes (Chapter 6).


betacf

public static double betacf(double a,
                            double b,
                            double x)
Used by betai(): Evaluates continued fraction for incomplete beta function by modified Lentz's method. Implementation from Numerical Recipes (Chapter 6).


erff

public static double erff(double x)
Returns the error-function erf(x). Implementation from Numerical Recipes (Chapter 6).


erffc

public static double erffc(double x)
Returns the complementary error-function erfc(x)=1-erf(x). Implementation from Numerical Recipes (Chapter 6).