1function y = moment_binotrans(x)
2% y = moment_binotrans(x)
4% Binomial transform of
the sequence x_0,x_1,...,x_n into y_0,y_1,...,y_n,
6% y_n = sum_{k=0}^{n} (-1)^(n-k) * nchoosek(n,k) * x_k
8% The transform
is an involution, so moment_binotransinv undoes it.
11% x: vector of length n+1 holding x_0,...,x_n, i.e. x(i)
is the element of
15% y: vector of length n+1 holding y_0,...,y_n, with
the same orientation
19% A. Heindl and A. van de Liefvoort. Moment conversions
for discrete
20% distributions. PMCCS, 2003, eq. (8).
23% y = moment_binotrans([1,2,5,15])
30 y(i+1) = y(i+1) + (-1)^(i-k) * nchoosek(i,k) * xcol(k+1);