Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ inv_inc_beta() [4/4]

template<typename T1 , typename T2 , typename T3 , require_all_stan_scalar_t< T1, T2, T3 > * = nullptr, require_any_var_t< T1, T2, T3 > * = nullptr>
var stan::math::inv_inc_beta ( const T1 &  a,
const T2 &  b,
const T3 &  p 
)
inline

The inverse of the normalized incomplete beta function of a, b, with probability p.

Used to compute the inverse cumulative density function for the beta distribution.

\[ \frac{\partial }{\partial a} = (1-w)^{1-b}w^{1-a} \left( w^a\Gamma(a)^2 {}_3\tilde{F}_2(a,a,1-b;a+1,a+1;w) - B(a,b)I_w(a,b)\left(\log(w)-\psi(a) + \psi(a+b)\right) \right)/;w=I_z^{-1}(a,b) \]

\[ \frac{\partial }{\partial b} = (1-w)^{-b}w^{1-a}(w-1) \left( (1-w)^{b}\Gamma(b)^2 {}_3\tilde{F}_2(b,b,1-a;b+1,b+1;1-w) - B_{1-w}(b,a)\left(\log(1-w)-\psi(b) + \psi(a+b)\right) \right)/;w=I_z^{-1}(a,b) \]

\[ \frac{\partial }{\partial z} = (1-w)^{1-b}w^{1-a}B(a,b)/;w=I_z^{-1}(a,b) \]

Parameters
aShape parameter a >= 0; a and b can't both be 0
bShape parameter b >= 0
pRandom variate. 0 <= p <= 1
Exceptions
ifconstraints are violated or if any argument is NaN
Returns
The inverse of the normalized incomplete beta function.

Definition at line 57 of file inv_inc_beta.hpp.