[R] rgamma question
tlumley at u.washington.edu
Fri Feb 6 23:09:21 CET 2004
On Fri, 6 Feb 2004, Icabalceta, Jorge L. wrote:
> Sorry to bother you. I am sort of confused with the random number generation
> from a gamma distribution. For some reason, if a variable X~gamma(shape,
> scale)I have been told that the mean mu can be eithe mu=shape/scale or
> mu=shape*scale. Why is that so?
It isn't. The mean is always shape*scale. However, the notation
Gamma(alpha,beta) is ambiguous. Some people use beta=scale (in which
case mean=alpha*beta) and others use beta=1/scale (in which case
mean=alpha/beta). A few people even use use alpha=mean, beta=variance,
but they usually know who they are.
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
More information about the R-help