The motivating properites of beta distribution and how its density function is developed? The density of beta distribution is given by the following 
$$f(x\mid \alpha ,\beta ) = \frac 1 {\operatorname{B}(\alpha,\beta)} x^{\alpha  - 1} (1 - x)^{\beta  - 1}$$
where 
$$ \operatorname{B}(\alpha,\beta) = \int_0^1 x^{\alpha  - 1} (1 - x)^{\beta  - 1} \,dx $$
is the Beta function as the normalizing constant. 
I understand one use of Beta distribution is to draw random probabilities from it. I am interested in what gives rise to this distribution? In particular, why it is "$x^{\alpha  - 1} (1 - x)^{\beta  - 1}$", not something else? What kinds of desired properties uniquely determine this density? And how the density formula is derived?

I have googled but could not find a good explanation. Many text books just throw this in front of you like it comes from nowhere.
 A: *

*One way in which the Beta distribution arises is as the distribution of the order statistics of a random sample from the uniform distribution. Suppose $X_1,\ldots, X_n$ are i.i.d. and uniformly distributed in $[0,1]$. Let $X_{(1)} < \cdots < X_{(n)}$ be the corresponding order statistics, i.e. the observations sorted into increasing order. Then $X_{(k)} \sim\operatorname{Beta}(k,n-k+1).$

*Another way in which the Beta distribution arises is as the arrival times in a Poisson process, conditioned on the number of arrivals in a specified time interval. For example, suppose it is given that there were exactly $n$ arrivals between times $0$ and $T$. Let $S$ be the time of the $k$th arrival. Then $S/T \sim\operatorname{Beta}(k,n-k+1).$

*Suppose $R\sim\operatorname{Uniform}(0,1)$ and $X_1,\ldots,X_n\mid R \sim \operatorname{i.i.d.} \operatorname{Bernoulli}(R),$ i.e. $$\begin{cases} \Pr(X_1=1\mid R) = R, \\  \Pr(X_1=0\mid R) = 1-R. \end{cases}$$ Then $$ R \mid (X_1+\cdots +X_n = k) \sim \operatorname{Beta}(k+1,n-k+1).$$

*Suppose $X$ has the Gamma distribution $\displaystyle \frac 1 {\Gamma(\alpha)} (x/\mu)^{\alpha-1} e^{-(x/\mu)} (dx/\mu)$ and $Y$ is independent of $X$ and has the Gamma distribution $\displaystyle \frac 1 {\Gamma(\beta)} (x/\mu)^{\beta-1} e^{-(x/\mu)} (dx/\mu). \vphantom{\frac {\displaystyle\int} {\displaystyle\int}} $ The $X/(X+Y)$ is independent of $X+Y$ and $X/(X+Y) \sim\operatorname{Beta}(\alpha,\beta).$
