FactorialMoment[data,r]
gives the order r
factorial moment
of data.
FactorialMoment[data,{r1,…,rm}]
gives the order {r1,…,rm} multivariate factorial moment
of data.
FactorialMoment[dist,…]
gives the factorial moment of the distribution dist.
represents the order r
formal factorial moment.
FactorialMoment
FactorialMoment[data,r]
gives the order r
factorial moment
of data.
FactorialMoment[data,{r1,…,rm}]
gives the order {r1,…,rm} multivariate factorial moment
of data.
FactorialMoment[dist,…]
gives the factorial moment of the distribution dist.
represents the order r
formal factorial moment.
Details
- Factorial moments are defined using FactorialPower[x,r] given by
. - For scalar order r and data being an array
: -
![x in TemplateBox[{Vectors, paclet:ref/Vectors}, RefLink, BaseStyle -> {3ColumnTableMod}][n] x in TemplateBox[{Vectors, paclet:ref/Vectors}, RefLink, BaseStyle -> {3ColumnTableMod}][n]](Files/FactorialMoment.en/7.png)

sum of r
factorial powers »![x in TemplateBox[{Matrices, paclet:ref/Matrices}, RefLink, BaseStyle -> {3ColumnTableMod}][{n,m}] x in TemplateBox[{Matrices, paclet:ref/Matrices}, RefLink, BaseStyle -> {3ColumnTableMod}][{n,m}]](Files/FactorialMoment.en/10.png)

columnwise sum of r
factorial powers »![x in TemplateBox[{Arrays, paclet:ref/Arrays}, RefLink, BaseStyle -> {3ColumnTableMod}][{n_(1),...,n_(k)}] x in TemplateBox[{Arrays, paclet:ref/Arrays}, RefLink, BaseStyle -> {3ColumnTableMod}][{n_(1),...,n_(k)}]](Files/FactorialMoment.en/13.png)

columnwise sum of r
factorial powers » - FactorialMoment[x,r] is equivalent to ArrayReduce[FactorialMoment[#,r]&,x,1].
- For vector order {r1,…,rm} and data being array
: -
![x in TemplateBox[{Matrices, paclet:ref/Matrices}, RefLink, BaseStyle -> {3ColumnTableMod}][{n,m}] x in TemplateBox[{Matrices, paclet:ref/Matrices}, RefLink, BaseStyle -> {3ColumnTableMod}][{n,m}]](Files/FactorialMoment.en/17.png)

sum the rj
factorial power in the j
column![x in TemplateBox[{Arrays, paclet:ref/Arrays}, RefLink, BaseStyle -> {3ColumnTableMod}][{n_(1),...,n_(k)}] x in TemplateBox[{Arrays, paclet:ref/Arrays}, RefLink, BaseStyle -> {3ColumnTableMod}][{n_(1),...,n_(k)}]](Files/FactorialMoment.en/21.png)

sum the rj
factorial power in the j
column » - FactorialMoment[x,{r1,…,rm}] is equivalent to ArrayReduce[FactorialMoment[#,{r1,…,rm}]&,x,{{1},{2}}].
- FactorialMoment handles both numerical and symbolic data.
- The data can have the following additional forms and interpretations:
-
Association the values (the keys are ignored) » WeightedData weighted mean, based on the underlying EmpiricalDistribution » EventData based on the underlying SurvivalDistribution » TimeSeries, TemporalData, … vector or array of values (the time stamps ignored) » Image,Image3D RGB channel's values or grayscale intensity value » Audio amplitude values of all channels » - For a distribution dist, the r
factorial moment is given by Expectation[x(r),xdist]. » - For a multivariate distribution dist, the {r1,…,rm}
factorial moment is given by Expectation[x1(r1)⋯ xm(rm),{x1,…,xm}dist]. » - For a random process proc, the factorial moment function can be computed for slice distribution at time t, SliceDistribution[proc,t], as
[t]=FactorialMoment[SliceDistribution[proc,t],r]. » - FactorialMoment[r] can be used in such functions as MomentConvert and MomentEvaluate, etc. »
Examples
open all close allBasic Examples (2)
Compute factorial moment from data:
data = RandomVariate[PoissonDistribution[4], 10 ^ 4];FactorialMoment[data, 3]FactorialMoment[{Subscript[k, 1], Subscript[k, 2], Subscript[k, 3]}, 3]Compute the second factorial moment
of a discrete univariate distribution:
FactorialMoment[BinomialDistribution[n, p], 2]The factorial moment
for a multivariate distribution:
FactorialMoment[MultinomialDistribution[n, {Subscript[p, 1], Subscript[p, 2], Subscript[p, 3]}], {2, 2, 2}]Scope (20)
Basic Uses (5)
Exact input yields exact output:
FactorialMoment[{1, 2, 3, 4}, 1]FactorialMoment[{π, E, 2}, 2]//TogetherApproximate input yields approximate output:
FactorialMoment[{1., 2., 3., 4.}, 2]FactorialMoment[N[{1, 2, 3, 4}, 30], 2]Find factorial moments of WeightedData:
FactorialMoment[WeightedData[{1, 2, 3}, {Subscript[w, 1], Subscript[w, 2], Subscript[w, 3]}], 1]data = {8, 3, 5, 4, 9, 0, 4, 2, 2, 3};
weights = {0.15, 0.09, 0.12, 0.10, 0.16, 0., 0.11, 0.08, 0.08, 0.09};FactorialMoment[WeightedData[data, weights], 2]Find a factorial moment of EventData:
e = {1.0, 2.1, 3.2, 4.5, 5.7};
ci = {0, 0, 0, 1, 0};FactorialMoment[EventData[e, ci], 2]Find a factorial moment of TimeSeries:
FactorialMoment[TemporalData[TimeSeries, {{{2.3, 1.2, 6.7, 5.8, 7.1, 4.6}}, {{0, 5, 1}}, 1, {"Discrete", 1},
{"Discrete", 1}, 1, {}}, False, 10.], 2]Factorial moment depends only on the values:
FactorialMoment[TemporalData[TimeSeries, {{{2.3, 1.2, 6.7, 5.8, 7.1, 4.6}}, {{0, 5, 1}}, 1, {"Discrete", 1},
{"Discrete", 1}, 1, {}}, False, 10.]["Values"], 2]Array Data (4)
For a matrix, FactorialMoment gives columnwise moments:
FactorialMoment[(| | |
| ----- | ----- |
| a1, 1 | a1, 2 |
| a2, 1 | a2, 2 |), 2]For an array, FactorialMoment gives columnwise moments at the first level:
FactorialMoment[Array[Subscript[a, ##]&, {2, 2, 2}], 2]//Simplify//MatrixFormMultivariate FactorialMoment for an array:
FactorialMoment[Array[Subscript[a, ##]&, {2, 2, 2}], {2, 2}]//Simplify//TraditionalForm%//FunctionExpand//SimplifyFactorialMoment[RandomReal[1, 10 ^ 7], 2]FactorialMoment[RandomReal[1, {10 ^ 6, 5}], 1]When the input is an Association, FactorialMoment works on its values:
mat = RandomReal[1, {2, 2}];
assoc = AssociationThread[Range[2], mat]FactorialMoment[assoc, 3]SparseArray data can be used just like dense arrays:
FactorialMoment[SparseArray[{{1} -> 1, {100} -> 1}], 1]FactorialMoment[SparseArray[{{1, 1} -> 1, {2, 2} -> 2, {3, 3} -> 3, {1, 3} -> 4}], 2]Image and Audio Data (2)
Channelwise factorial moment of an RGB image:
FactorialMoment[[image], 5]RGBColor[%]Factorial moment intensity value of a grayscale image:
FactorialMoment[[image], 4]On audio objects, FactorialMoment works channelwise:
a = ExampleData[{"Audio", "Bee"}]AudioMeasurements[a, "Channels"]FactorialMoment[a, 3]Distribution and Process Moments (5)
Scalar factorial moment for univariate distributions:
FactorialMoment[BinomialDistribution[n, p], 1]//TogetherFactorialMoment[NormalDistribution[μ, σ], 2]Scalar factorial moment for multivariate distributions:
FactorialMoment[BinormalDistribution[{Subscript[μ, 1], Subscript[μ, 2]}, {Subscript[σ, 1], Subscript[σ, 2]}, ρ], 2]FactorialMoment[DirichletDistribution[{a, b, c}], 2]//SimplifyJoint factorial moment for multivariate distributions:
FactorialMoment[MultinomialDistribution[n, {Subscript[p, 1], Subscript[p, 2], Subscript[p, 3]}], {1, 1, 1}]FactorialMoment[BinormalDistribution[{Subscript[μ, 1], Subscript[μ, 2]}, {Subscript[σ, 1], Subscript[σ, 2]}, ρ], {2, 2}]Compute a factorial moment for a symbolic order r:
FactorialMoment[PoissonDistribution[μ], r]A factorial moment may only evaluate for specific orders:
FactorialMoment[BorelTannerDistribution[𝒶, n], r]% /. {r -> 2}A factorial moment may only evaluate numerically:
FactorialMoment[VonMisesDistribution[Pi / 2, 2], 4]N[%]Factorial moments for derived distributions:
FactorialMoment[TransformedDistribution[x^2, xNormalDistribution[μ, σ]], 1]FactorialMoment[ProbabilityDistribution[(Sqrt[2] / π)(1 / (1 + (x - 2)^4)), {x, -∞, ∞}], 2]data = RandomVariate[NormalDistribution[], 10 ^ 3];FactorialMoment[HistogramDistribution[data], 4]Factorial moment function for a random process:
FactorialMoment[BrownianBridgeProcess[μ, σ][t], 2]Plot[Evaluate[% /. {μ -> 3, σ -> 1}], {t, 0, 1}, PlotRange -> All]Find a factorial moment of TemporalData at some time t=0.5:
td = RandomFunction[WienerProcess[1, 1], {0, 10, 0.05}, 500]FactorialMoment[td[0.5], 1]Find the corresponding factorial moment function together with all the simulations:
Show[ListLinePlot[td, PlotStyle -> Directive[Opacity[0.2], Thin]], Plot[FactorialMoment[td[t], 1], {t, 0, 10}, PlotStyle -> Thick]]Formal Moments (4)
TraditionalForm formatting for formal moments:
FactorialMoment[r]//TraditionalFormFactorialMoment[{p, q, r}]//TraditionalFormConvert combinations of formal moments to an expression involving FactorialMoment:
MomentConvert[Moment[2], FactorialMoment]//TraditionalFormMomentConvert[CentralMoment[2]Cumulant[2], FactorialMoment]//TraditionalFormEvaluate an expression involving formal moments
for a distribution:
MomentEvaluate[FactorialMoment[2] + FactorialMoment[3], PoissonDistribution[λ]]data = RandomVariate[PoissonDistribution[1], 10^4];MomentEvaluate[FactorialMoment[2] + FactorialMoment[3], data]Find a sample estimator for an expression involving FactorialMoment:
estimator = MomentConvert[FactorialMoment[2], "UnbiasedSampleEstimator"]Evaluate the resulting estimator for data:
data = RandomVariate[PoissonDistribution[1], 10^4];MomentEvaluate[estimator, data]Applications (4)
Estimate parameters of a distribution using the method of factorial moments:
data = RandomVariate[SkellamDistribution[2, 5], 10 ^ 4];NSolve[Table[FactorialMoment[data, k] == FactorialMoment[SkellamDistribution[m1, m2], k], {k, 1, 2}], {m1, m2}]Compare data and the estimated parametric distribution:
Show[Histogram[data, Automatic, "ProbabilityDensity"], DiscretePlot[Evaluate[PDF[SkellamDistribution[m1, m2], x] /. %], {x, -10, 10}, PlotStyle -> PointSize[Medium]]]Reconstruct probability mass function from the sequence of factorial moments:
fm[r_] = (7 / 3)^-r(3 + (-1)^r) / 4;Find the factorial moment-generating function (FMGF):
fmgf = Sum[fm[r](t - 1) ^ r / r!, {r, 0, Infinity}]Use equivalence of the FMGF and the probability generating function:
dist = ProbabilityDistribution[
SeriesCoefficient[fmgf, {t, 0, k}], {k, 0, Infinity, 1}]Verify that factorial moments of the found distribution match the originals:
Table[FactorialMoment[dist, r], {r, 0, 6}]Table[fm[r], {r, 0, 6}]Compute a moving factorial moment for some data:
data = TemporalData[TimeSeries, {{{0., -0.1658757846470872, -0.2728638398721067, -0.20572896599603147,
-0.10538217461042272, -0.05347321047935807, -0.09210914812542037, -0.19681903814874602,
-0.2868001703261339, -0.39654025546507443, -0.42843667 ... 4643, -0.020432977410382067, 0.061353433083862305,
-0.05763556841195196}}, {{0, 1., 0.01}}, 1, {"Continuous", 1}, {"Continuous", 1}, 1,
{ValueDimensions -> 1, ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False,
10.1];md = MovingMap[FactorialMoment[#, 2]&, data, .1];ListLinePlot[md, PlotRange -> All]Compute factorial moments for slices of a collection of paths of a random process:
data = RandomFunction[WienerProcess[], {0, 1, .01}, 10 ^ 3];times = Range[0, 1, .1];fm = Map[{#, FactorialMoment[data[#], 2]}&, times];Plot factorial moments over these paths:
Show[ListPlot[data], ListLinePlot[fm, PlotStyle -> StandardRed]]Properties & Relations (5)
Factorial moment
is equivalent to an expectation of FactorialPower:
FactorialMoment[PoissonDistribution[μ], 2]Expectation[FactorialPower[x, 2], xPoissonDistribution[μ]]First factorial moment is equivalent to Mean:
FactorialMoment[{Subscript[x, 1], Subscript[x, 2], Subscript[x, 3], Subscript[x, 4], Subscript[x, 5]}, 1]Mean[{Subscript[x, 1], Subscript[x, 2], Subscript[x, 3], Subscript[x, 4], Subscript[x, 5]}]FactorialMoment can be computed from Moment through
:
With[{r = 5, 𝒟 = BinomialDistribution[n, p]}, Subsuperscript[∑, k = 1, r]StirlingS1[r, k]Moment[𝒟, k]]With[{r = 5, 𝒟 = BinomialDistribution[n, p]}, FactorialMoment[𝒟, r]]Simplify[%% - %]MomentConvert produces the same result:
MomentConvert[FactorialMoment[5], Moment]Subsuperscript[∑, k = 1, r]StirlingS1[r, k]Moment[k] /. r -> 5Moment can be computed from FactorialMoment through
:
With[{r = 5, 𝒟 = ExponentialDistribution[λ]}, Underoverscript[∑, k = 0, r]StirlingS2[r, k]FactorialMoment[𝒟, k]]With[{r = 5, 𝒟 = ExponentialDistribution[λ]}, Moment[𝒟, r]]Simplify[%% - %]MomentConvert produces the same result:
MomentConvert[Moment[5], FactorialMoment]Subsuperscript[∑, k = 1, r]StirlingS2[r, k]FactorialMoment[k] /. r -> 5The multivariate factorial moment of an array of depth
has depth
:
arr = Array[Subscript[a, Row@{##}]&, {n = 4, m = 3, 2, 3}];
rs = {2, 2, 2};
Length[rs] == mFactorialMoment[arr, rs] ==
ArrayReduce[Mean,
ArrayReduce[Times@@FactorialPower[#, rs]&, arr, 2],
1]//SimplifyNeat Examples (1)
The distribution of FactorialMoment estimates for 30, 100, and 300 samples:
FactorialMoment[ExponentialDistribution[0.9], 2]SmoothHistogram[Table[FactorialMoment[RandomVariate[ExponentialDistribution[0.9], {s, 1000}], 2], {s, {30, 100, 300}}], Filling -> Axis, PlotLegends -> {30, 100, 300}, PlotRange -> {{0, 4}, Automatic}]Text
Wolfram Research (2010), FactorialMoment, Wolfram Language function, https://reference.wolfram.com/language/ref/FactorialMoment.html (updated 2024).
CMS
Wolfram Language. 2010. "FactorialMoment." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/FactorialMoment.html.
APA
Wolfram Language. (2010). FactorialMoment. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FactorialMoment.html
BibTeX
@misc{reference.wolfram_2026_factorialmoment, author="Wolfram Research", title="{FactorialMoment}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/FactorialMoment.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_factorialmoment, organization={Wolfram Research}, title={FactorialMoment}, year={2024}, url={https://reference.wolfram.com/language/ref/FactorialMoment.html}, note=[Accessed: 13-June-2026]}