LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
moment_stirling1.m
1function s = moment_stirling1(n)
2% s = moment_stirling1(n)
3%
4% Triangle of the signed Stirling numbers of the first kind s(i,j), defined as
5% the coefficients of x^j in the falling factorial
6%
7% sum_{j=0}^{i} s(i,j) x^j = x(x-1)(x-2)...(x-i+1)
8%
9% These numbers are the coefficients that convert power moments into factorial
10% moments. They relate to the Stirling cycle numbers via
11% s(i,j) = (-1)^(i-j) * sigma(i,j).
12%
13% Input:
14% n: maximum order (n >= 0)
15%
16% Output:
17% s: (n+1)x(n+1) matrix with s(i+1,j+1) = s(i,j) in the 0-based notation of
18% the reference. Entries with j > i are zero.
19%
20% Reference:
21% A. Heindl and A. van de Liefvoort. Moment conversions for discrete
22% distributions. PMCCS, 2003, eq. (10) and eq. (12).
23%
24% Example:
25% s = moment_stirling1(3)
26
27sigma = moment_stirlingcycle(n);
28s = zeros(n+1,n+1);
29for i = 0:n
30 for j = 0:i
31 s(i+1,j+1) = (-1)^(i-j) * sigma(i+1,j+1);
32 end
33end
34end
Definition Station.m:245