1function fp = moment_upfactorial_from_factorial(f)
2% fp = moment_upfactorial_from_factorial(f)
4% Converts
the factorial moments f_n = E[N(N-1)...(N-n+1)] of a discrete
5% random variable N into
the upward-factorial moments
6% f_n^+ = E[N(N+1)...(N+n-1)] by means of
the Lah numbers,
8% f_n^+ = sum_{k=1}^{n} L(n,k) * f_k
for n >= 1
12% f: vector of length n+1 holding f_0,...,f_n, i.e. f(i)
is the moment of
13% order i-1 and f(1) = f_0 = 1
16% fp: vector of length n+1 holding f_0^+,...,f_n^+, with
the same
20% A. Heindl and A. van de Liefvoort. Moment conversions
for discrete
21% distributions. PMCCS, 2003, Section 4.
24% fp = moment_upfactorial_from_factorial([1,2,4,8])
33 fp(i+1) = fp(i+1) + L(i+1,k+1) * fcol(k+1);