SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.function.special
Class BetaRegularized

java.lang.Object
  extended by com.numericalmethod.suanshu.analysis.function.rn2r1.UnivariateRealFunction
      extended by com.numericalmethod.suanshu.analysis.function.special.BetaRegularized
All Implemented Interfaces:
Function, RealScalarFunction

public class BetaRegularized
extends UnivariateRealFunction

This class represents the Regularized Incomplete Beta function Bx(p, q).

               1    /x
 Bx(p, q) = ------- |  tp-1(1 - t)q-1dt
            B(p, q) /0
 
p > 0, q > 0

The R equivalent function is pbeta.

See Also:

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.analysis.function.Function
Function.EvaluationException
 
Field Summary
 double p
          the shape parameter p
 double q
          the shape parameter q
 
Constructor Summary
BetaRegularized(double p, double q)
          Construct an instance of Bx(p, q) with the parameters p and q.
 
Method Summary
 double evaluate(double x)
          Evaluate Bx(p, q).
 
Methods inherited from class com.numericalmethod.suanshu.analysis.function.rn2r1.UnivariateRealFunction
dimension4Domain, dimension4Range, evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p

public final double p
the shape parameter p


q

public final double q
the shape parameter q

Constructor Detail

BetaRegularized

public BetaRegularized(double p,
                       double q)
Construct an instance of Bx(p, q) with the parameters p and q.

Parameters:
p - p > 0
q - q > 0
Method Detail

evaluate

public double evaluate(double x)
Evaluate Bx(p, q).

Specified by:
evaluate in class UnivariateRealFunction
Parameters:
x - 0 <= x <= 1
Returns:
Bx(p, q)

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.