I'm trying to find the moments (or the pdf but I'm less confident there's a closed form) of $\frac X{X + Y}$ where $X$ and $Y$ are two independent random variables with a Beta distribution. There's a paper from Pham-Gia that I tried to read, and a similar (but yet different) [question posted here](https://mathoverflow.net/questions/147207/distribution-and-moments-of-ratio-of-two-beta-variables), but they didn't help. I find the resulting distribution to be a lot similar to the Beta distribution.



Statistical moments of $\frac X{X + Y}$ when $X$ and $Y$ are two independent random variables with a Beta distribution
Suppose that $X$ and $Y$ are independent beta random variables (r.v.'s) with parameters $(a,b)$ and $(c,d)$, respectively. Let 
\begin{equation\*}
 V:=\frac X{X+Y}. \tag{0}
\end{equation\*}
The transformation $(x,v)\mapsto(x,x\frac{1-v}v)$ transforms $(X,V)$ to $(X,Y)$. 
The Jacobian determinant of this transformation is $-x/v^2$. Also,
\begin{equation\*}
\Big(x,x\frac{1-v}v\Big)\in(0,1)\times(0,1)
\iff
 (0 < v<1\ \&\ 0 < x < s),
\end{equation\*}
where 
\begin{equation\*}
 s:=1\wedge\frac1r=\min\Big(1,\frac1r\Big),\quad r:=r\_v:=\frac{1-v}v. 
\end{equation\*}
The joint pdf of $(X,Y)$ is given by 
\begin{equation\*}
 f\_{X,Y}(x,y)=Cx^{a-1}(1-x)^{b-1}y^{c-1}(1-y)^{d-1}\,I\{0<x<1\ \&\ 0<y<1\}, 
\end{equation\*}
where $I$ denotes the indicator and 
\begin{equation\*}
 C:=\frac1{B(a,b)B(c,d)}. 
\end{equation\*}
So, joint pdf of $(X,V)$ is given by 
\begin{align\*}
 f\_{X,V}(x,v)&=f\_{X,Y}(x,xr)x/v^2 \\ 
 &=
 Cx^{a+c-1}(1-x)^{b-1}v^{-c-1}(1-v)^{c-1}(1-rx)^{d-1} \\ 
 &\times I\{0 < v<1\ \&\ 0 < x < s\}. 
\end{align\*}
So, the pdf of $V$ is given by 
\begin{align\*}
 f\_V(v)&=\int\_{\mathbb R}f\_{X,V}(x,v)\,dx \\ 
& =Cv^{-c-1}(1-v)^{c-1}J(v)I\{0 < v<1\}, \tag{1}
\end{align\*}
where 
\begin{equation\*}
 J(v):=\int\_0^s x^{a+c-1}(1-x)^{b-1}(1-rx)^{d-1}\,dx. 
\end{equation\*}
To evaluate $J(v)$, use formula 3.197.3 of *Table of Integrals, Series, and Products,
Seventh Edition* by Gradshteyn and Ryzhik: 
\begin{equation\*}
 \int\_0^1 x^{\lambda-1}(1-x)^{\mu-1}(1-\beta x)^{-\nu}\,dx
 =B(\lambda,\mu)\,\_2F\_1(\nu,\lambda;\lambda+\mu;\beta) \tag{\*}
\end{equation\*}
for $\lambda>0$, $\mu>0$, $|\beta|<1$, where $\_2F\_1$ is the hypergeometric function. 


If $1/2<v<1$, then $0<r<1$, $s=1$, and (\*) immediately yields 
\begin{equation\*}
 J(v)=B(a+c,b)\,\_2F\_1(1-d,a+c;a+c+b;r). \tag{2}
\end{equation\*}


If $0<v<1/2$, then $r>1$, $s=1/r\in(0,1)$, and the substitution $t=rx$ together with (\*) 
yields 
\begin{align\*}
 J(v)&=r^{-a-c}\int\_0^1 t^{a+c-1}(1-t/r)^{b-1}(1-t)^{d-1}\,dx \\ 
 &=r^{-a-c}B(a+c,d)\,\_2F\_1(1-b,a+c;a+c+d;1/r). \tag{3}
\end{align\*}


Formulas (1), (2) (for $v\in(1/2,1)$), and (3) (for $v\in(0,1/2)$) give the pdf $f\_V$ of $V$, defined by (0). 


