Gamma distribution¶
Error probability or chance to beat¶
Given two distributions \(X_A \sim \mathcal{G}(\alpha_A, \beta_A)\) and \(X_B \sim \mathcal{G}(\alpha_B, \beta_B)\) such that \((\alpha_A, \beta_A, \alpha_B, \beta_B) \in \mathbb{R}_+^4\), \(P[X_B > X_A]\) is given by
where \(_2F_1(a,b;c;z)\) is the Gauss hypergeometric function and \(I_x(a,b)\) is the regularized incomplete beta function.
Expected loss function¶
The expected loss function can easily be calculated from the definition yielding
A similar expression is obtained for \(\mathrm{EL}(X_A)\),
Credible intervals¶
Credible intervals are employed to account for uncertainty in the expected loss and relative expected loss measures. Let us considered the relative expected loss if variant B is chosen, which follows the distribution \((X_A - X_B)/X_B = X_A / X_B - 1\). This requires the distribution of the ratio of two random gamma variables, \(U = X_A / X_B\). The probability density function is given by
Note that this is the probability density function of the generalized beta prime distribution. The cumulative distribution function is given by
Note
Credible intervals are computed by solving \(F(u) = p\), \(p \in [0, 1]\). A reasonable starting point is the normal approximation of the gamma distribution.
The expected value and variance of the distribution \(Z = (X_A - X_B)/X_B = X_A / X_B - 1\) can be computed using
Proofs¶
Error probability¶
Integrating the joint distribution over all values of \(X_B > X_A\) we obtain the integral
where \(P(a,z)\) is the regularized lower incomplete gamma function defined by
and \(Q(a,z)\) is the regularized upper incomplete gamma function with series expansion
Hence, the integral is rewritten in the form
Interchange of integration and summation leads to a representation in terms of the Gauss hypergeometric function \(_2F_1(a,b;c;z)\), also expressible in terms of the incomplete beta function