Considere la variable aleatoria gamma . Hay fórmulas claras para la media, la varianza y la asimetría:
Considere ahora una variable aleatoria transformada logarítmica . Wikipedia da fórmulas para la media y la varianza:
mediante funciones digamma y trigamma que se definen como la primera y la segunda derivada del logaritmo de la función gamma.
¿Cuál es la fórmula para la asimetría?
¿Aparecerá la función tetragamma?
(Lo que me hizo preguntarme sobre esto es una elección entre las distribuciones lognormal y gamma, ver Distribuciones gamma vs. lognormal . Entre otras cosas, difieren en sus propiedades de asimetría. En particular, la asimetría del logaritmo de lognormal es trivialmente igual a cero. Mientras que la asimetría del logaritmo de gamma es negativa. Pero, ¿qué tan negativa? ..)
fuente
Respuestas:
La función generadora de momentos de Y = ln X es útil en este caso, ya que tiene una forma algebraica simple. Por la definición de mgf, tenemos M ( t )M(t) Y=lnX
Verifiquemos la expectativa y la varianza que diste. Tomando derivados, tenemos
To find the skewness, note the cumulant generating function (thanks @probabilityislogic for the tip) is
As a side note, this particular distribution appeared to have been thoroughly studied by A. C. Olshen in his Transformations of the Pearson Type III Distribution, Johnson et al.'s Continuous Univariate Distributions also has a small piece about it. Check those out.
fuente
I. Direct computation
Gradshteyn & Ryzhik [1] (sect 4.358, 7th ed) list explicit closed forms for
Details of the derivation of the formulas in 4.358 are in [2]. I'll quote the formulas given there since they're slightly more succinctly stated and put 4.352.1 in the same form.
Letδ=ψ(a)−lnμ . Then:
whereζ(z,q)=∑∞n=01(n+q)z is the Hurwitz zeta function (the Riemann zeta function is the special case q=1 ).
Now on to the moments of the log of a gamma random variable.
Noting firstly that on the log scale the scale or rate parameter of the gamma density is merely a shift-parameter, so it has no impact on the central moments; we may take whichever one we're using to be 1.
IfX∼Gamma(α,1) then
We can setμ=1 in the above integral formulas, which gives us raw moments; we have E(Y) , E(Y2) , E(Y3) , E(Y4) .
Since we have eliminatedμ from the above, without fear of confusion we're now free to re-use μk to represent the k -th central moment in the usual fashion. We may then obtain the central moments from the raw moments via the usual formulas.
Then we can obtain the skewness and kurtosis asμ3μ3/22 and μ4μ22 .
A note on terminology
It looks like Wolfram's reference pages write the moments of this distribution (they call it ExpGamma distribution) in terms of the polygamma function.
By contrast, Chan (see below) calls this the log-gamma distribution.
II. Chan's formulas via MGF
Chan (1993) [3] gives the mgf as the very neatΓ(α+t)/Γ(α) .
(A very nice derivation for this is given in Francis' answer, using the simple fact that the mgf oflog(X) is just E(Xt) .)
Consequently the moments have fairly simple forms. Chan gives:
and the central moments as
and so the skewness isψ′′(α)/(ψ′(α)3/2) and kurtosis is ψ′′′(α)/(ψ′(α)2) . Presumably the earlier formulas I have above should simplify to these.
Conveniently, R offers digamma (ψ ) and trigamma (ψ′ ) functions as well as the more general polygamma function where you select the order of the derivative. (A number of other programs offer similarly convenient functions.)
Consequently we can compute the skewness and kurtosis quite directly in R:
Trying a few values ofα in the above), we reproduce the first few rows of the table at the end of Sec 2.2 in Chan [3], except that the kurtosis values in that table are supposed to be excess kurtosis, but I just calculated kurtosis by the formulas given above by Chan; these should differ by 3.
a
((E.g. for the log of an exponential, the table says the excess kurtosis is 2.4, but the formula forβ2 is ψ′′′(1)/ψ′(1)2 ... and that is 2.4.)
Simulation confirms that as we increase sample size, the kurtosis of a log of an exponential is converging to around 5.4 not 2.4. It appears that the thesis possibly has an error.
Consequently, Chan's formulas for central moments appear to actually be the formulas for the cumulants (see the derivation in Francis' answer). This would then mean that the skewness formula was correct as is; because the second and third cumulants are equal to the second and third central moments.
Nevertheless these are particularly convenient formulas as long as we keep in mind that
kurt.eg
is giving excess kurtosis.References
[1] Gradshteyn, I.S. & Ryzhik I.M. (2007), Table of Integrals, Series, and Products, 7th ed.
Academic Press, Inc.
[2] Victor H. Moll (2007)
The integrals in Gradshteyn and Ryzhik, Part 4: The gamma function
SCIENTIA Series A: Mathematical Sciences, Vol. 15, 37–46
Universidad Técnica Federico Santa María, Valparaíso, Chile
http://129.81.170.14/~vhm/FORM-PROOFS_html/final4.pdf
[3] Chan, P.S. (1993),
A statistical study of log-gamma distribution,
McMaster University (Ph.D. thesis)
https://macsphere.mcmaster.ca/bitstream/11375/6816/1/fulltext.pdf
fuente