1function f = moment_factorial_from_upfactorial(fp)
2% f = moment_factorial_from_upfactorial(fp)
4% Converts
the upward-factorial moments f_n^+ = E[N(N+1)...(N+n-1)] of a
5% discrete random variable N into
the 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} (-1)^(n-k) * L(n,k) * f_k^+
for n >= 1
12% fp: vector of length n+1 holding f_0^+,...,f_n^+, i.e. fp(i)
is the moment
13% of order i-1 and fp(1) = f_0^+ = 1
16% f: vector of length n+1 holding f_0,...,f_n, with
the same orientation
20% A. Heindl and A. van de Liefvoort. Moment conversions
for discrete
21% distributions. PMCCS, 2003, Section 4.
24% f = moment_factorial_from_upfactorial([1,2,8,44])
33 f(i+1) = f(i+1) + (-1)^(i-k) * L(i+1,k+1) * fpcol(k+1);