You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IH moments are difficult to calculate explicitly, but the cumulants are easy. We can use the functional definition of the cumulant generating function to 'invert' back to the moments.
By definition, the moment generating function $M_X(t)$ of a random variable $X$ is:
$$M_{X}(t) \equiv \mathop{\mathbb{E}}e^{tX}$$
and the cumulant generating function $C_X(t)$ is:
If $X$ and $Y$ are independent, $M_{X+Y} = M_X M_Y$ so $C_{X+Y} = C_X + C_Y$ by taking $\log$ of both sides. Thus the cumulants of a sum of independent variables is the sum of their cumulants:
$$ \kappa^{X+Y}_n = \kappa^X_n + \kappa^{Y}_n $$
Now expanding to their exponential series forms ($\mu_0=1$ and $\kappa_0=0$)
Taking the Cauchy product of $C'_X$ and $M_X$ as exponential generating functions and collecting like terms of $x^n$, we get the umbral convolution formula for the moments:
For the cumulants of the $\mathrm{Uniform}(0, 1)$ distribution, we have
$\kappa^{U}_{n} = \frac{B_{n}}{n}$ where $B_n$ = Bernoulli(n)
with Bernoulli(1) := 1/2 and Bernoulli(2j+1) = 0 for j > 0.
Therefore the cumulants of the $\mathrm{IH}(m)$ distribution, as the sum of $m$ standard uniform random variables, are:
$$\kappa^{IH(m)}_n = \frac{mB_n}{n}$$
Python
Note
In this code, n is the moment order and m is parameter of the IH distribution (swapped from above)
Scipy's scipy.special.bernoulli uses the convention that $B_1$ is $-1/2$ so we adjust for that in the code below.