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