Re: Estimating Gamma Parameters using MLE



In article <1129912850.457338.131520@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<kipper_fillet@xxxxxxxxxxx> wrote:
>A collegue needs to put together some Visual Basic (ideally) code to
>perform maximum likelihood estimation of the parameters of the gamma
>distribution (based on a series of observations passed across as an
>array).

>Does anyone have such a thing, or know where it could be obtained?

This is ancient history. The density function is

x^(q-1)*exp(-x/s)/(s^q*Gamma(q),

and

\int x^(q-1)*exp(-x/s) dx = s^q*Gamma(q).

The sufficient statistics are the sums of the X's and
the sums of their logarithms, and the MLE sets the
sample averages to their expected values. The expected
value of X is q*s, and the expected value of ln(X) is
ln(s)+Psi(q), the Psi function being the logarithmic
derivative of the Gamma function. So one sets the
average of ln(X_i) minus the logarithm of the average
of the X_i to be equal to Psi(q) - ln(q); this has a
unique positive solution if the X's are not all equal,
and finding the MLE of s is then easy from the average
of the X's.


--
This address is for information only. I do not claim that these views
are those of the Statistics Department or of Purdue University.
Herman Rubin, Department of Statistics, Purdue University
hrubin@xxxxxxxxxxxxxxx Phone: (765)494-6054 FAX: (765)494-0558
.



Relevant Pages

  • Re: What to do with "log of a zero rate"?
    ... taking logarithms of such q quantity. ... are those of the Statistics Department or of Purdue University. ... Herman Rubin, Department of Statistics, Purdue University ...
    (sci.stat.consult)
  • Re: Computing Pearson Type V pdf
    ... One does not need "nice identities"; just use logarithms. ... Any good computer package has the logarithm of the Gamma ... the normal approximation should do very ... simulate Gamma random variables for large shape parameters, ...
    (sci.stat.math)
  • Re: Randomness of digits within pi
    ... in tables of logarithms e.g.? ... fractions & powers of pi, gamma of pi etc. must also have this ...
    (sci.math)