InflGame.domains.rd.#
- InflGame.domains.rd.beta_distribution(bin_points, alpha_value, beta_value)#
Compute a beta distribution for resources on the unit interval.
Uses the beta probability density function to model resource distribution on the interval (0, 1). The beta distribution is useful for modeling bounded resources with various shapes controlled by the alpha and beta parameters.
The distribution is defined as:
\[R(b) = \frac{b^{\alpha-1}(1-b)^{\beta-1}}{B(\alpha, \beta)}\]where \(B(\alpha, \beta)\) is the beta function:
\[B(\alpha, \beta) = \int_0^1 t^{\alpha-1}(1-t)^{\beta-1} dt = \frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}\]- Parameters:
- bin_pointsnp.ndarray | torch.Tensor
Points where the distribution is evaluated, typically on the interval (0, 1).
- alpha_valuefloat
Alpha parameter \(\alpha\) of the beta distribution. Must be positive. Controls the shape of the distribution at \(b=0\).
- beta_valuefloat
Beta parameter \(\beta\) of the beta distribution. Must be positive. Controls the shape of the distribution at \(b=1\).
- Returns:
- np.ndarray
Computed resource distribution values (probability density) at the specified bin_points.
Notes
When \(\alpha = \beta = 1\), the distribution is uniform
When \(\alpha > 1\) and \(\beta > 1\), the distribution is unimodal
When \(\alpha < 1\) and \(\beta < 1\), the distribution is bimodal (U-shaped)
Examples
>>> bin_points = np.linspace(0.01, 0.99, 100) >>> resources = beta_distribution(bin_points, alpha_value=2, beta_value=5)