Maximum likelihood estimators for gamma distribution I'm having trouble with an exercise about maximum likelihood estimators. 
Specifically, the exercise gives me values of a protein which was found in 50 adults. We assumed that the data follow a gamma distribution: 
$X \sim \Gamma(r,\lambda)= \frac {\lambda^{r}}{\Gamma(r)}x^{r-1}e^{-\lambda x} $ if $x\ge0$.
It asks me to find the maximum likelihood estimators of parameters $\lambda$ and $r$.
How can I find those parameters given that from the data I have $E(X),Var(X)$? 

We know that $\Gamma(r,\lambda)= \frac {1}{\Gamma(r)}\lambda^{r}x^{r-1}e^{-\lambda x} $ if $x\ge0$.
In this case the likelihood function $L$ is $$\prod_i \Gamma(r,\lambda)_{x_i}=\frac{1}{\Gamma(r)^{n}}\lambda^{nr}x_1^{r-1}x_2^{r-1}...x_n^{r-1}e^{-\lambda T}$$
where $T=x_1+...+x_n$;
By apllying the logaritmic function to $L$ we semplificate the problem so  
$$logL=(r-1)\sum_ilogx_i-\lambda T +(nr)log\lambda -nlog(\Gamma(r))$$
and now we must find the point of  max of $logL$, so $\frac{\partial L}{\partial\lambda}= -T+\frac{nr}{\lambda}=0$ which have as solution $\hat\lambda = \frac{nr}{T}$.
With the same method you can obtain the extimation for $r$. (Find $\frac {\partial L}{\partial r}$ and put it equal to $0$). 
