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% Applied to a moment sequence m_i = E[X^i] it returns the moments of the
9% unit downshift, y_i = E[(X-1)^i]. It
is not an involution: its inverse
is
10% moment_binotransinv, the unsigned transform.
13% x: vector of length n+1 holding x_0,...,x_n, i.e. x(i)
is the element of
17% y: vector of length n+1 holding y_0,...,y_n, with the same orientation
21% A. Heindl and A. van de Liefvoort. Moment conversions for discrete
22% distributions. PMCCS, 2003, eq. (8).
25% y = moment_binotrans([1,2,5,15])
32 y(i+1) = y(i+1) + (-1)^(i-k) * nchoosek(i,k) * xcol(k+1);