<s>[INST] Mean and mode of a Beta random variable A continuous random variable is said to have a $Beta(a,b)$ distribution if its density is given by 
$f(x) = (1 / \text{B}(a,b))x^{a-1} (1-x)^{b-1}$ if $0 < x < 1$
Find mean , var, mode if $a = 3, b = 5.$
This is throwing me off with the beta distribution. I'm not sure if it changes the way i solve for the mean, var , mode.
My approach is that since mean of a continuous random variable which is basically the Expected value of X (EX), so we can just do $\int x * f(x) dx$. We can find $ f(x) = (105) x^{2} (1-x)^{4} $ and then $\int x *f(x) dx =  1/105 \int_{0}^{1} x^3 * (1-x)^4 dx  = 105 * \beta(4,5)  =  105 * ((6*24 )/ 40320)$
 [/INST] \begin{equation}
\begin{array}{rcl} f^\prime(x)=\dfrac{df(x)}{dx}& = & \dfrac{1}{B(a,b)}\dfrac{d}{dx}x^{a-1}(1-x)^{b-1}\\
& = & \dfrac{1}{B(a,b)}\left[(a-1)x^{a-2}(1-x)^{b-1}-x^{a-1}(b-1)(1-x)^{b-2}\right]\\
& = & \dfrac{1}{B(a,b)}x^{a-2}(1-x)^{b-2}\left[(a-1)(1-x)-(b-1)x\right]\\
\end{array}
\end{equation}
\begin{equation}
\begin{array}{rcl}
f^\prime(x)=0 & \Rightarrow & (a-1)(1-x)-(b-1)x=0 \Rightarrow a-1-x(a-1+b-1)=0\\
& \Rightarrow & x=\dfrac{a-1}{a+b-2} \quad \text{exists when } \;\; a>1\;\; \& \;\;b>1
\end{array}
\end{equation}
Mode exists when $a>1$ and $b>1$ and is equals to $\dfrac{a-1}{a+b-2}$
</s>