# Calculate the mean and variance given a random variable of a beta distribution

Two quantities, $a$ and $b$, are estimated as the minimum and maximum length of time it will take for a project to be completed. Experience shows that the actual length of time it takes for a project to be completed is a random variable defined by $Y = a + (b-a)X$, where $X\sim \mathrm{Beta}(\alpha,\beta)$, where $\alpha$ and $\beta$ are also determined for each project. Suppose that for a particular project it is estimated $a=2$ years, $b=4$ years, $\alpha = 2$ and $\beta = 2$.

How do I find the mean and variance of the time it will take to complete the project?

What is the probability it will take less than 3 years to complete the project?

-

$\mathbf{E}Y=a+(b-a)\mathbf{E}X=a+(b-a)\frac{\alpha}{\alpha+\beta}=2+2 \cdot \frac{1}{2}=3$
$\mathbf{Var}Y=(b-a)^2 \mathbf{Var}X=(b-a)^2 \cdot \frac{\alpha \beta}{(\alpha+\beta)^2(\alpha+\beta+1)}=4 \cdot \frac{4}{4^2 \cdot 5}=\frac{1}{5}$
$\mathbf{P}(Y \leq 3)=\mathbf{P}(a+(b-a)X \leq 3)=\mathbf{P}(X\leq\frac{3-a}{b-a} )=P(X \leq \frac{1}{2})$