LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
moment_factorial_from_raw.m
1function f = moment_factorial_from_raw(m)
2% f = moment_factorial_from_raw(m)
3%
4% Converts the power (raw) moments m_n = E[N^n] of a discrete random variable
5% N into the factorial moments f_n = E[N(N-1)...(N-n+1)] by means of the
6% signed Stirling numbers of the first kind,
7%
8% f_n = sum_{k=0}^{n} s(n,k) * m_k
9%
10% Input:
11% m: vector of length n+1 holding m_0,...,m_n, i.e. m(i) is the moment of
12% order i-1 and m(1) = m_0 = 1
13%
14% Output:
15% f: vector of length n+1 holding f_0,...,f_n, with the same orientation
16% as m
17%
18% Reference:
19% A. Heindl and A. van de Liefvoort. Moment conversions for discrete
20% distributions. PMCCS, 2003, eq. (13).
21%
22% Example:
23% f = moment_factorial_from_raw([1,2,6,22])
24
25mcol = m(:);
26n = length(mcol)-1;
27f = moment_stirling1(n) * mcol;
28if isrow(m)
29 f = f.';
30end
31end
Definition Station.m:245