Cumulant
Details
- Formally, the r
cumulant
is defined as the coefficient of the Taylor series
of the CumulantGeneratingFunction. - The first few cumulants expressed in terms of moments:
-






- In general, MomentConvert[Cumulant[r],"Moment"] gives the
in terms of moments. - Cumulant[data,r] effectively uses MomentConvert to compute it in terms of other moments for data.
- For x∈Arrays[{n1,n2,… ,nk}], Cumulant[x,r] is equivalent to ArrayReduce[Cumulant[#,r]&,data,1]. »
- For x∈Arrays[{n1,n2,… ,nk}], Cumulant[x,{r1,…,rm}] is equivalent to ArrayReduce[Cumulant[#,{r1,…,rm}]&,x,{{1},{2}}]. »
- Cumulant 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 » DateObject, TimeObject list of dates or list of times » - For a distribution dist with G=CumulantGeneratingFunction[
,…]: -
Cumulant[
,r]
»Cumulant[dist,{r1,…,rm}]
» - For a random process proc, the cumulant function can be computed for slice distribution at time t, SliceDistribution[proc,t], as
[t]=Cumulant[SliceDistribution[proc,t],r]. » - Cumulant[r] can be used in such functions as MomentConvert and MomentEvaluate, etc. »
Examples
open all close allBasic Examples (3)
data = RandomVariate[LogisticDistribution[0, 1], 10 ^ 5];Cumulant[data, 2]Cumulant[{Subscript[x, 1], Subscript[x, 2], Subscript[x, 3]}, 2]Cumulant[{Yesterday, Today, Tomorrow}, 4]Compute the second cumulant
of a continuous univariate distribution:
Cumulant[GammaDistribution[α, β], 2]The cumulant
for a multivariate distribution:
Cumulant[DirichletDistribution[{α, β, γ}], {1, 2}]Scope (26)
Basic Uses (6)
Exact input yields exact output:
Cumulant[{1, 2, 3, 4}, 2]Cumulant[{π, E, 2}, 1]Approximate input yields approximate output:
Cumulant[{1., 2., 3., 4.}, 2]Cumulant[N[{1, 2, 3, 4}, 30], 2]Find cumulants of WeightedData:
Cumulant[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};Cumulant[WeightedData[data, weights], 2]Find a cumulant of EventData:
e = {1.0, 2.1, 3.2, 4.5, 5.7};
ci = {0, 0, 0, 1, 0};Cumulant[EventData[e, ci], 1]Find a cumulant of TimeSeries:
Cumulant[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]The cumulant depends only on the values:
Cumulant[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]Find a cumulant for data involving quantities:
data = Quantity[RandomReal[1, 6], "Meters"]Cumulant[data, 2]Array Data (5)
For a matrix, Cumulant gives columnwise cumulants:
Cumulant[(| | |
| ----- | ----- |
| a1, 1 | a1, 2 |
| a2, 1 | a2, 2 |), 4]//SimplifyFor an array, Cumulant gives columnwise cumulants at the first level:
Cumulant[Array[Subscript[a, ##]&, {2, 2, 2}], 4]//Simplify//MatrixFormCumulant[Array[Subscript[a, ##]&, {2, 2, 2}], {4, 4}]//SimplifyCumulant[RandomReal[1, 10 ^ 7], 2]Cumulant[RandomReal[1, {10 ^ 6, 5}], 2]When the input is an Association, Cumulant works on its values:
mat = RandomReal[1, {3, 2}];
assoc = AssociationThread[Range[3], mat]Cumulant[assoc, 3]SparseArray data can be used just like dense arrays:
Cumulant[SparseArray[{{1} -> 1, {100} -> 1}], 4]Cumulant[SparseArray[{{1, 1} -> 1, {2, 2} -> 2, {3, 3} -> 3, {1, 3} -> 4}], 2]Compute the multivariate cumulant of an array in terms of its raw moments:
(f = MomentConvert[Cumulant[{3, 3}], Moment])//Simplify//TraditionalForm//Shortarr = RandomReal[1, {2, 2, 2}, WorkingPrecision -> 50];c1 = Cumulant[arr, {3, 3}]c2 = (f /. Moment[l_] :> Moment[arr, l])c1 == c2Image and Audio Data (2)
Channelwise cumulant of an RGB image:
Cumulant[[image], 5]RGBColor[%]Cumulant intensity value of a grayscale image:
Cumulant[[image], 4]On audio objects, Cumulant works channelwise:
a = ExampleData[{"Audio", "Bee"}]AudioMeasurements[a, "Channels"]Cumulant[a, 3]Date and Time (4)
dates = WolframLanguageData[All, "DateIntroduced"];DateHistogram[dates]Cumulant[dates, 4]UnitConvert[%, "Decades" ^ 4]Compute the weighted cumulant of dates:
dates = RandomDate[4]weights = {1, 1, 1, 3};Cumulant[WeightedData[dates, weights], 3]UnitConvert[%, "Months" ^ 3]Cumulant[dates, 3]UnitConvert[%, "Months" ^ 3]Compute the cumulant of dates given in different calendars:
dates = {DateObject[{2024, 2, 29}, CalendarType -> "Julian"], DateObject[{1524, 1, 1}, CalendarType -> "Islamic"], DateObject[{6024, 1, 15}, CalendarType -> "Jewish"]}Cumulant[dates, 3]UnitConvert[%, "Centuries" ^ 3]Compute the cumulant of times:
RandomTime[3]Cumulant[%, 4]List of times with different time zone specifications:
{TimeObject[{12}, TimeZone -> 0], TimeObject[{12}, TimeZone -> 2], TimeObject[{12}, TimeZone -> "Asia/Tokyo"]}Cumulant[%, 3]Distribution and Process Cumulants (5)
Scalar cumulant for univariate distributions:
Cumulant[BinomialDistribution[n, p], 1]Cumulant[NormalDistribution[μ, σ], 2]Scalar cumulant for multivariate distributions:
Cumulant[BinormalDistribution[{Subscript[μ, 1], Subscript[μ, 2]}, {σ1, σ2}, ρ], 2]Cumulant[DirichletDistribution[{a, b, c}], 2]//SimplifyJoint cumulant for multivariate distributions:
Cumulant[MultivariateHypergeometricDistribution[n, {Subscript[m, 1], Subscript[m, 2]}], {1, 1}]Cumulant[BinormalDistribution[{Subscript[μ, 1], Subscript[μ, 2]}, {σ1, σ2}, ρ], {1, 1}]Compute a cumulant for a symbolic order r:
Cumulant[PoissonDistribution[μ], r]A cumulant may only evaluate for specific orders:
Cumulant[BetaDistribution[α, β], r]% /. r -> 2A cumulant may only evaluate numerically:
Cumulant[VonMisesDistribution[Pi / 2, 2], 4]N[%]Cumulants for derived distributions:
Cumulant[TransformedDistribution[x^2, xNormalDistribution[μ, σ]], 2]Cumulant[ProbabilityDistribution[(Exp[1 - x] x (1 - x)/3 - E), {x, 0, 1}], 3]data = RandomVariate[NormalDistribution[], 10 ^ 3];Cumulant[HistogramDistribution[data], 1]Cumulant function for a random process:
Cumulant[QueueingProcess[λ, μ, ∞][t], 2]Plot[Evaluate[% /. {λ -> 1, μ -> 3}], {t, 0, 1}, PlotRange -> All]Find a cumulant of TemporalData at time t=0.5:
td = RandomFunction[WienerProcess[1, 1], {0, 10, 0.05}, 100]Cumulant[td[0.5], 1]Find the corresponding cumulant function together with all the simulations:
Show[ListLinePlot[td, PlotStyle -> Directive[Opacity[0.7], Thin]], Plot[Cumulant[td[t], 1], {t, 0, 10}, PlotStyle -> Thick]]Formal Cumulants (4)
TraditionalForm formatting for formal cumulants:
Cumulant[r]//TraditionalFormCumulant[{p, q, r}]//TraditionalFormConvert combinations of formal moments to an expression involving Cumulant:
MomentConvert[Moment[4], Cumulant]//TraditionalFormMomentConvert[CentralMoment[2]Moment[2], Cumulant]//TraditionalFormEvaluate an expression involving formal cumulants
for a distribution:
MomentEvaluate[Cumulant[1] + Cumulant[2], BetaDistribution[α, β]]data = RandomVariate[BetaDistribution[2, 3], 10^4];MomentEvaluate[Cumulant[1] + Cumulant[2], data]Find a sample estimator for an expression involving Cumulant:
estimator = MomentConvert[Cumulant[1], "UnbiasedSampleEstimator"]Evaluate the resulting estimator for data:
data = RandomVariate[PoissonDistribution[1], 10^4];MomentEvaluate[estimator, data]Applications (5)
Estimate parameters of a distribution using the method of cumulants:
data = RandomVariate[BetaDistribution[3, 6], 10 ^ 4];NSolve[Table[Cumulant[data, k] == Cumulant[BetaDistribution[a, b], k], {k, 1, 2}], {a, b}]The law of large numbers states that a sample moment approaches the population moment as the sample size increases. Use Histogram to show the probability distribution of sample cumulant
of standard normal random variates for different sample sizes:
Histogram[Table[Cumulant[RandomReal[NormalDistribution[], {n, 10 ^ 3}], 3], {n, {10, 10^2, 10^4}}], 50, "ProbabilityDensity", ChartLegends -> {10, 10^2, 10^4}]Edgeworth's expansion of order
:
EdgeworthSeries[p_ /; p ≥ 2, y_] := With[{z = (y - Cumulant[1]), σ = Sqrt[Cumulant[2]]}, PDF[NormalDistribution[0, σ], z](1 + Sum[(σ^s/2^(s/2) + rs!)HermiteH[s + 2r, (z/Sqrt[2]σ)]BellY[s, r, Table[(Cumulant[k]/(k - 1)k σ^2k - 2), {k, 3, p}]], {s, p - 2}, {r, s}])]Approximate SechDistribution:
dist = SechDistribution[1, 2];pdf = MomentEvaluate[EdgeworthSeries[4, y], dist]Plot[{pdf, PDF[dist, y]}, {y, -5, 5}, PlotRange -> All]Compute a moving cumulant for some data:
data = TemporalData[TimeSeries, {{{0., 0.06114665305643561, 0.23896662440972682, 0.30268800326923,
0.35534116766660545, 0.42472631677502126, 0.3966448861155263, 0.41578142003045876,
0.3468861633239847, 0.3381046650827597, 0.38002782955469216, 0. ... 208767424126402, 2.118103218029293, 2.18195782653722,
2.087973123089836}}, {{0, 1., 0.01}}, 1, {"Continuous", 1}, {"Continuous", 1}, 1,
{ValueDimensions -> 1, ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False,
10.1];mc = MovingMap[Cumulant[#, 2]&, data, .1];ListLinePlot[mc, PlotRange -> All]Compute cumulants for slices of a collection of paths of a random process:
data = RandomFunction[WienerProcess[], {0, 1, .01}, 10 ^ 3];times = Range[0, 1, .1];cm = Map[{#, Cumulant[data[#], 2]}&, times];Plot cumulants over these paths:
Show[ListPlot[data], ListLinePlot[cm, PlotStyle -> Green]]Properties & Relations (5)
First cumulant
is equivalent to the first moment
:
MomentConvert[Cumulant[1], Moment]Second cumulant
is equivalent to the second central moment
:
MomentConvert[Cumulant[2], CentralMoment]Third cumulant
is equivalent to the third central moment
:
MomentConvert[Cumulant[3], CentralMoment]Cumulant
is equal to the ![]()
derivative of the cumulant-generating function at zero
:
cgf = CumulantGeneratingFunction[ExponentialDistribution[λ], t]SeriesCoefficient[cgf r!, {t, 0, r}]Use Cumulant directly:
Cumulant[ExponentialDistribution[λ], r]Find the cumulant-generating function using GeneratingFunction:
Cumulant[PoissonDistribution[μ], r]cgf = GeneratingFunction[% / r!, r, t]Check using CumulantGeneratingFunction:
CumulantGeneratingFunction[PoissonDistribution[μ], t]Formally, cumulants can be computed using the fact that CumulantGeneratingFunction[dist,t] is given by Log[MomentGeneratingFunction[dist,t]]:
Clear[mgf];
Series[Log@mgf[x], {x, 0, 3}]
coeff = SeriesCoefficient[%, 3]3!Plug in the definition for the moments in terms of their generating function:
rep = {mgf[0] -> 1, Derivative[n_][mgf][0] :> Moment[n]};(coeff /. rep) == MomentConvert[Cumulant[3], Moment]Sample estimator of Cumulant on data is biased:
(se = MomentConvert[Cumulant[4], "SampleEstimator"])//TraditionalFormFind a sampling population expectation, assuming size
:
see = MomentConvert[se, {Cumulant, n}]Construct an unbiased sample estimator using PowerSymmetricPolynomial:
(ue = MomentConvert[Cumulant[4], "UnbiasedSampleEstimator", PowerSymmetricPolynomial])//TraditionalFormVerify unbiasedness on a small sample size:
Expand[MomentEvaluate[ue, {Subscript[x, 1], Subscript[x, 2], Subscript[x, 3], Subscript[x, 4], Subscript[x, 5]}]] /. Subscript[x, i_]^r_. :> Moment[r]MomentConvert[%, Cumulant]The sample estimator is biased:
MomentConvert[Expand[Cumulant[{Subscript[x, 1], Subscript[x, 2], Subscript[x, 3], Subscript[x, 4], Subscript[x, 5]}, 4]] /. Subscript[x, i_]^r_. :> Moment[r], Cumulant]Compare with the sampling population expectation of the sample estimator:
see /. n -> 5Possible Issues (1)
Neat Examples (2)
Find an unbiased estimator for a product of cumulants:
MomentConvert[Cumulant[1]Cumulant[2]Cumulant[3], {"UnbiasedEstimator", n}, "PowerSymmetricPolynomial"]//FullSimplify//TraditionalFormCheck the sampling population expectation:
MomentConvert[%, {Cumulant, n}]The distribution of Cumulant estimates for 20, 100, and 300 samples:
Cumulant[ExponentialDistribution[0.9], 2]SmoothHistogram[Table[Cumulant[RandomVariate[ExponentialDistribution[0.9], {s, 1000}], 2], {s, {20, 100, 300}}], Filling -> Axis, PlotLegends -> {20, 100, 300}, PlotRange -> {{0, 4}, Automatic}]Related Workflows
- Analyze a Computable Dataset
History
Introduced in 2010 (8.0) | Updated in 2024 (14.0) ▪ 2024 (14.1)
Text
Wolfram Research (2010), Cumulant, Wolfram Language function, https://reference.wolfram.com/language/ref/Cumulant.html (updated 2024).
CMS
Wolfram Language. 2010. "Cumulant." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/Cumulant.html.
APA
Wolfram Language. (2010). Cumulant. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Cumulant.html
BibTeX
@misc{reference.wolfram_2026_cumulant, author="Wolfram Research", title="{Cumulant}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/Cumulant.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_cumulant, organization={Wolfram Research}, title={Cumulant}, year={2024}, url={https://reference.wolfram.com/language/ref/Cumulant.html}, note=[Accessed: 12-June-2026]}