EULER_BETA
The Euler beta function is a symmetric two-parameter special function that appears in probability distributions, integral transforms, and normalization constants.
It can be defined by an integral on [0,1] and by gamma functions:
B(a,b)=\int_0^1 t^{a-1}(1-t)^{b-1}\,dt
B(a,b)=\frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}
This wrapper evaluates B(a,b) using SciPy.
Excel Usage
=EULER_BETA(a, b)
a(float, required): First real shape parameter.b(float, required): Second real shape parameter.
Returns (float): Beta function value for the given parameters.
Example 1: Beta with integer parameters
Inputs:
| a | b |
|---|---|
| 2 | 3 |
Excel formula:
=EULER_BETA(2, 3)
Expected output:
0.0833333
Example 2: Beta with non-integer parameters
Inputs:
| a | b |
|---|---|
| 1.7 | 2.4 |
Excel formula:
=EULER_BETA(1.7, 2.4)
Expected output:
0.165675
Example 3: Beta with first parameter equal to one
Inputs:
| a | b |
|---|---|
| 1 | 4 |
Excel formula:
=EULER_BETA(1, 4)
Expected output:
0.25
Example 4: Beta with small positive shape parameters
Inputs:
| a | b |
|---|---|
| 0.5 | 0.5 |
Excel formula:
=EULER_BETA(0.5, 0.5)
Expected output:
3.14159
Python Code
from scipy.special import beta as scipy_beta
def euler_beta(a, b):
"""
Evaluate the Euler beta function for two real parameters.
See: https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.beta.html
This example function is provided as-is without any representation of accuracy.
Args:
a (float): First real shape parameter.
b (float): Second real shape parameter.
Returns:
float: Beta function value for the given parameters.
"""
try:
return float(scipy_beta(a, b))
except Exception as e:
return f"Error: {str(e)}"Online Calculator
First real shape parameter.
Second real shape parameter.