# Gamma distribution parameters estimation [closed]

I have a set of samples taken from a population distributed with a Gamma distribution, so $$$$f_X(x)=\frac{\beta^\alpha}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}$$$$ I should estimate $$\alpha$$ and $$\beta$$, so knowing that $$$$\alpha=\frac{E[X]^2}{\text{Var}[X]},\quad \beta=\frac{E[X]}{\text{Var}[X]}$$$$ My idea is to compute $$\hat \mu, \hat \sigma^2$$ from the set as estimators of the mean and average of the population, then find $$\hat \alpha,\hat \beta$$ as follows $$$$\hat \alpha=\frac{\hat \mu^2}{\hat \sigma^2},\quad \hat \beta=\frac{\hat \mu}{\sigma^2}$$$$

I'm trying to apply this logic to a task with a set of 10000 samples, but approximations seems to be not good enough. Is there any flaw in this reasoning?

EDIT: I've also tried the Newton-Raphson method to find alpha. This method leads to approximations very similar to the ones that I get from the method of moments.

EDIT 2: The logic is correct. Problem was a wrong understanding of the results of the implementation of this logic: in my task there was just half of the data needed to get all the estimators required. That is true for any possible method. Also approximation was fine.

## closed as unclear what you're asking by Stephan Kolassa, Michael Chernick, user158565, COOLSerdash, whuber♦Apr 23 at 14:37

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• You're using the method-of-moments estimators, afaik. In what way to you find them unsatisfying? Another possibility would be to use the maximum likelihood estimators. – COOLSerdash Apr 20 at 17:04
• What @COOLSerdash says. The gamma can be parameterized in two different ways, are you sure you are not confusing something there? That could be a simple explanation for why your results may be bad. – Stephan Kolassa Apr 20 at 17:07
• @COOLSerdash yes it is. I assume that for 10000 samples the method should work fine to have a good approximation. – ezy Apr 20 at 18:35
• FWIW, your expression for $f$ isn't quite correct. It's difficult to determine what you mean by "each letter with a unique ... combination" and it's impossible to determine what you mean by "unsatisfying." Could you clarify your question? – whuber Apr 23 at 4:00
• Without explanation of, or evidence for, "unsatisfying" results this question remains unclear. – Nick Cox Apr 24 at 8:16