5
2.6. Show that the mean and variance of the gamma pdf
Gamma(x|a, b) = ba
Γ(a)xa−1e−bx, a, b, x > 0.
are given by
E[x] = a
b,
σ2
x=a
b2.
Solution: We have that
E[x] = ba
Γ(a)Z∞
0
xae−bxdx.
Set bx =y. Then
E[x] = ba
Γ(a)
1
ba+1 Z∞
0
yae−ydy
2.7. Show that the mean and variance of a Dirichlet pdf with Kvariables,
xk, k = 1,2, . . . , K and parameters ak, k = 1,2, . . . , K, are given by
E[xk] = ak
a, k = 1,2, . . . , K
σ2
k=ak(a−ak)
a2(1 + a), k = 1,2, . . . , K,
cov[xixj] = −aiaj
a2(1 + a), i 6=j,