Difference between revisions of "BetaFn"

(copied equation from user guide, changed status)
(Relationship to the GammaFn)
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:
 
[[Category:Doc Status C]] <!-- For Lumina use, do not change -->
 
[[Category:Doc Status C]] <!-- For Lumina use, do not change -->
  
= BetaFn(a,b) =
+
== BetaFn(a, b) ==
 +
The complete [[beta]] function, defined as:
 +
:<math>BetaFn(a,b) = \int_0^1 x^{a-1} (1-x)^{b-1} dx</math>
  
The complete beta function, defined as:
+
The following relationship exists between the [[BetaFn]] and the [[GammaFn]]:
:<math>BetaFn(a,b) = \int_0^1 x^{a-1} (1-x)^{b-1} dx</math>
+
:[[BetaFn]](a,b) = [[GammaFn]](a) * [[GammaFn]](b) / [[GammaFn]](a+b)
  
= Library =
+
== Numeric considerations ==
  
Advanced Math
+
For very large values of <code>a</code> and <code>b</code>, the result underflow, so that you might find it better to use <code>[[Ln]]([[BetaFn]](a,b))</code>. However, when computing the log-beta function, you should compute it using:
  
= See Also =
+
:<code>[[LGamma]](a) + [[LGamma]](b) - [[LGamma]](a+b)</code>
  
 +
== See Also ==
 +
* [[Beta]]
 
* [[BetaI]] : The incomplete beta function
 
* [[BetaI]] : The incomplete beta function
 
* [[GammaFn]] : The complete gamma function
 
* [[GammaFn]] : The complete gamma function
 +
* [[Parametric continuous distributions]]
 +
* [[Distribution Densities Library]]

Latest revision as of 21:23, 5 February 2016


BetaFn(a, b)

The complete beta function, defined as:

[math]\displaystyle{ BetaFn(a,b) = \int_0^1 x^{a-1} (1-x)^{b-1} dx }[/math]

The following relationship exists between the BetaFn and the GammaFn:

BetaFn(a,b) = GammaFn(a) * GammaFn(b) / GammaFn(a+b)

Numeric considerations

For very large values of a and b, the result underflow, so that you might find it better to use Ln(BetaFn(a,b)). However, when computing the log-beta function, you should compute it using:

LGamma(a) + LGamma(b) - LGamma(a+b)

See Also

Comments


You are not allowed to post comments.