Рассмотрим гамма случайная величина . Есть аккуратные формулы для среднего значения, дисперсии и асимметрии:
Теперь рассмотрим лог-преобразованную случайную величину . Википедия дает формулы для среднего значения и дисперсии:
с помощью функций дигаммы и тригаммы, которые определены как первая и вторая производные логарифма гамма-функции.
Какая формула для асимметрии?
Появится ли функция тетрагаммы?
(Что заставило меня задуматься об этом, так это выбор между логнормальным и гамма-распределением, см. Гамма и логнормальное распределения . Среди прочего, они отличаются по своим свойствам асимметрии. В частности, асимметрия лог-логарифма тривиально равна нулю. Тогда как Асимметрия логарифма гаммы отрицательна. Но насколько отрицательна? ..)
gamma-distribution
skewness
logarithm
амеба говорит восстановить монику
источник
источник
Ответы:
В этом случае полезна функция генерирования момента для Y = ln X , поскольку она имеет простой алгебраический вид. По определению mgf имеем M ( t )M(t) Y=lnX
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.
источник
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
источник