CentralMoment[data,r]
data の r
次中心モーメント
を与える.
CentralMoment[data,{r1,…,rm}]
data の次数が{r1,…,rm}の多変量中心モーメント
を与える.
CentralMoment[dist,…]
分布 dist の中心モーメントを与える.
r
次の形式的な中心モーメントを表す.
CentralMoment
CentralMoment[data,r]
data の r
次中心モーメント
を与える.
CentralMoment[data,{r1,…,rm}]
data の次数が{r1,…,rm}の多変量中心モーメント
を与える.
CentralMoment[dist,…]
分布 dist の中心モーメントを与える.
r
次の形式的な中心モーメントを表す.
詳細
- CentralMomentは平均まわりのモーメントとしても知られている.
- 次数 r のスカラー,data は配列
,平均(最初の生のモーメント)
では以下のようになる. -
![x in TemplateBox[{Vectors, paclet:ref/Vectors}, RefLink, BaseStyle -> {3ColumnTableMod}][n] x in TemplateBox[{Vectors, paclet:ref/Vectors}, RefLink, BaseStyle -> {3ColumnTableMod}][n]](Files/CentralMoment.ja/3.png)

r 次ベキの和 » ![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/CentralMoment.ja/4.png)

列ごとの r 次中心ベキの和 » ![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/CentralMoment.ja/5.png)

列ごとの r 次中心ベキの和 » - CentralMoment[x,r]はArrayReduce[CentralMoment[#,r]&,x,1]に等しい.
- 次数{r1,…,rm}のベクトル, data は配列
,最初の生のモーメント
では以下のようになる. -
![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/CentralMoment.ja/6.png)

第 j 列の rj次中心ベキの和 ![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/CentralMoment.ja/7.png)

第 j 列の rj次中心ベキの和 » - CentralMoment[x,{r1,…,rm}]はArrayReduce[CentralMoment[#,
]&,x,{{1},{2}}]に等しい. - CentralMomentは数値データと記号データの両方を扱うことができる.
- data は,次の追加的な形式と解釈を持つことができる.
-
Association 値(キーは無視される) » WeightedData もとになっているEmpiricalDistributionに基づいた加重平均 » EventData もとになっているSurvivalDistributionに基づく » TimeSeries, TemporalData, … 値のベクトルまたは配列(タイムスタンプは無視される) » Image,Image3D RGBチャンネルの値またはグレースケールの強度値 » Audio すべてのチャンネルの振幅値 » DateObject, TimeObject 日付のリストまたは時間のリスト » - 分布 dist について,r 次中心モーメントはExpectation[(x-Mean[dist])r,xdist]で与えられる. »
- 多変量分布 dist について,{r1,…,rm}

次中心モーメントはExpectation[(x1-μ1)r1⋯(x2-μm)rm,{x1,…,xm}dist]および{μ1,…,μm}=Mean[dist]で与えられる. » - ランダム過程 proc については,中心モーメント関数は時点 t におけるスライス分布SliceDistribution[proc,t]について
[t]=CentralMoment[SliceDistribution[proc,t],r]として計算することができる. » - CentralMoment[r]は,MomentConvert,MomentEvaluate等の関数とともに使うことができる. »
例題
すべて開く すべて閉じる例 (3)
data = RandomVariate[LogNormalDistribution[1, 1], 10 ^ 5];CentralMoment[data, 3]CentralMoment[{Subscript[x, 1], Subscript[x, 2], Subscript[x, 3]}, 2]CentralMoment[{Yesterday, Today, Tomorrow}, 4]CentralMoment[GammaDistribution[α, β], 2]CentralMoment[DirichletDistribution[{Subscript[α, 1], Subscript[α, 2], Subscript[α, 3]}], {1, 1}]スコープ (26)
基本的な用法 (6)
CentralMoment[{1, 2, 3, 4}, 4]CentralMoment[{π, E, 2}, 2]//TogetherCentralMoment[{1., 2., 3., 4.}, 2]CentralMoment[N[{1, 2, 3, 4}, 30], 2]WeightedDataの中心モーメントを求める:
CentralMoment[WeightedData[{1, 2, 3}, {Subscript[w, 1], Subscript[w, 2], Subscript[w, 3]}], 2]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};CentralMoment[WeightedData[data, weights], 2]EventDataの中心モーメントを求める:
e = {1.0, 2.1, 3.2, 4.5, 5.7};
ci = {0, 0, 0, 1, 0};CentralMoment[EventData[e, ci], 2]TimeSeriesの中心モーメントを求める:
CentralMoment[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]CentralMoment[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]data = Quantity[RandomReal[1, 6], "Meters"]CentralMoment[data, 2]配列データ (5)
行列についてのCentralMomentは列ごとのモーメントを返す:
CentralMoment[(| | |
| ----- | ----- |
| a1, 1 | a1, 2 |
| a2, 1 | a2, 2 |), 4]//Simplify配列についてのCentralMomentは第1レベルの列ごとのモーメントを返す:
CentralMoment[Array[Subscript[a, ##]&, {2, 2, 2}], 2]//Simplify//MatrixForm配列についての多変量CentralMoment:
CentralMoment[Array[Subscript[a, ##]&, {2, 2, 2}], {2, 2}]//SimplifyCentralMoment[RandomReal[1, 10 ^ 7], 2]CentralMoment[RandomReal[1, {10 ^ 6, 5}], 2]入力がAssociationのとき,CentralMomentはその値に作用する:
mat = RandomReal[1, {3, 2}];
assoc = AssociationThread[Range[3], mat]CentralMoment[assoc, 3]SparseArrayデータは密な配列のように使うことができる:
CentralMoment[SparseArray[{{1} -> 1, {100} -> 1}], 4]CentralMoment[SparseArray[{{1, 1} -> 1, {2, 2} -> 2, {3, 3} -> 3, {1, 3} -> 4}], 2]QuantityArrayの中心モーメントを求める:
data = QuantityArray[RandomReal[1, 6], "Pounds"]CentralMoment[data, 5]画像データと音声データ (2)
CentralMoment[[image], 5]RGBColor[%]CentralMoment[[image], 4]CentralMomentは,音声オブジェクトについてはチャンネルごとに作用する:
a = ExampleData[{"Audio", "Bee"}]AudioMeasurements[a, "Channels"]CentralMoment[a, 3]日付と時間 (4)
dates = WolframLanguageData[All, "DateIntroduced"];DateHistogram[dates]CentralMoment[dates, 4]UnitConvert[%, "Decades" ^ 4]dates = RandomDate[4]weights = {1, 1, 1, 3};CentralMoment[WeightedData[dates, weights], 3]UnitConvert[%, "Years" ^ 3]dates = {DateObject[{2024, 2, 29}, CalendarType -> "Julian"], DateObject[{1524, 1, 1}, CalendarType -> "Islamic"], DateObject[{6024, 1, 15}, CalendarType -> "Jewish"]}CentralMoment[dates, 2]UnitConvert[%, "Years" ^ 2]Variance[dates]UnitConvert[%, "Years" ^ 2]RandomTime[3]CentralMoment[%, 4]{TimeObject[{12}, TimeZone -> 0], TimeObject[{12}, TimeZone -> 2], TimeObject[{12}, TimeZone -> "Asia/Tokyo"]}CentralMoment[%, 3]分布のモーメントと過程のモーメント (5)
CentralMoment[BinomialDistribution[n, p], 2]//TogetherCentralMoment[NormalDistribution[μ, σ], 2]CentralMoment[BinormalDistribution[{Subscript[μ, 1], Subscript[μ, 2]}, {Subscript[σ, 1], Subscript[σ, 2]}, ρ], 2]CentralMoment[DirichletDistribution[{a, b, c}], 3]CentralMoment[MultinomialDistribution[n, {Subscript[p, 1], Subscript[p, 2], Subscript[p, 3]}], {1, 1, 1}]CentralMoment[BinormalDistribution[{Subscript[μ, 1], Subscript[μ, 2]}, {Subscript[σ, 1], Subscript[σ, 2]}, ρ], {2, 2}]CentralMoment[BetaDistribution[a, b], r]中心モーメントは特定の次数についてしか評価できないことがある:
CentralMoment[ExtremeValueDistribution[a, b], r]% /. r -> 3CentralMoment[VonMisesDistribution[Pi / 2, 2], 4]N[%]CentralMoment[TransformedDistribution[x^2, xNormalDistribution[μ, σ]], 2]CentralMoment[ProbabilityDistribution[(Sqrt[2] / π)(1 / (1 + (x - 2)^4)), {x, -∞, ∞}], 2]data = RandomVariate[NormalDistribution[], 10 ^ 3];CentralMoment[HistogramDistribution[data], 4]CentralMoment[BrownianBridgeProcess[μ, σ][t], 4]Plot[Evaluate[% /. {μ -> 3, σ -> 1}], {t, 0, 1}, PlotRange -> All]ある時点 t=0.5におけるTemporalDataの中心モーメントを求める:
td = RandomFunction[WienerProcess[1, 1], {0, 10, 0.05}, 100]CentralMoment[td[0.5], 2]対応する中心モーメント関数をすべてのシミュレーションとともに求める:
Show[ListLinePlot[td, PlotStyle -> Directive[Opacity[0.2], Thin]], Plot[CentralMoment[td[t], 2], {t, 0, 10}, PlotStyle -> Thick]]形式的なモーメント (4)
形式的なモーメントのTraditionalFormによる表示:
CentralMoment[r]//TraditionalFormCentralMoment[{p, q, r}]//TraditionalForm形式的なモーメントの組合せをCentralMomentを含む式に変換する:
MomentConvert[Moment[2], CentralMoment]//TraditionalFormMomentConvert[Moment[2]Cumulant[2], CentralMoment]//TraditionalFormMomentEvaluate[CentralMoment[2] + CentralMoment[4], PoissonDistribution[λ]]data = RandomVariate[PoissonDistribution[1], 10^4];MomentEvaluate[CentralMoment[2] + Moment[4], data]CentralMomentを含む式のサンプル推定量を求める:
(estimator = MomentConvert[CentralMoment[2], "UnbiasedSampleEstimator"])//TraditionalFormdata = RandomVariate[PoissonDistribution[1], 10^4];MomentEvaluate[estimator, data]アプリケーション (11)
data = RandomReal[{-7, 3}, 100];CentralMoment[data, 1]𝒟 = NormalDistribution[0, σ];CentralMoment[𝒟, 2]Table[Plot[PDF[𝒟, x], {x, -4, 4}, PlotRange -> {0, 0.4}, Filling -> Axis, Ticks -> {Automatic, None}], {σ, {1, 1.5, 2}}]dists = {NormalDistribution[0, 2.5], ChiSquareDistribution[5], GumbelDistribution[3, 2]};Table[CentralMoment[dists[[i]], 3], {i, 3}]//NTable[Plot[PDF[dists[[i]], x], {x, -7, 15}, PlotRange -> {0, 0.2}, Filling -> Axis, Ticks -> {Automatic, None}], {i, 3}]data = RandomVariate[GammaDistribution[3, 6], 10 ^ 4];meq = Table[CentralMoment[data, k] == CentralMoment[GammaDistribution[α, β], k], {k, 2, 3}]NSolve[meq, {α, β}]Show[Histogram[data, Automatic, "ProbabilityDensity"], Plot[Evaluate[PDF[GammaDistribution[α, β], x] /. %], {x, 0, 100}, PlotStyle -> Thick]]モーメント法を使ってGammaDistributionの正規近似を求める:
gdist = GammaDistribution[α, β];meq = {Moment[gdist, 1] == Moment[NormalDistribution[μ, σ], 1], CentralMoment[gdist, 2] == CentralMoment[NormalDistribution[μ, σ], 2]}Solve[(And@@meq)∧σ > 0, {μ, σ}, Reals]{ndist} = Refine[NormalDistribution[μ, σ] /. %, β > 0∧α > 0]Plot[{PDF[gdist, x], PDF[ndist, x]} /. {α -> 13, β -> 3}, {x, 0, 80}, Evaluated -> True]estim = MomentConvert[CentralMoment[2], "SampleEstimator"]サンプルサイズが
であると仮定してサンプル分布の期待値を求める:
MomentConvert[estim, {CentralMoment, n}]MomentConvert[(estim - %) ^ 2, {CentralMoment, n}]MomentEvaluate[%, UniformDistribution[{0, 1}]]大数の法則にはサンプルサイズが増大するにつれてサンプルモーメントが母集団のモーメントに近付くとある.Histogramを使ってさまざまなサンプルサイズについて一様分布に従う確率変量のサンプルの二次中心モーメントの確率分布を示す:
Histogram[Table[CentralMoment[RandomReal[1, {n, 2 * 10 ^ 3}], 2], {n, {10, 10^2, 10^3}}], 30, "ProbabilityDensity", ChartLegends -> {10, 10^2, 10^3}]三次および四次中心モーメントを訂正するほぼ正規分布に従うデータのエッジワース(Edgeworth)展開 :
pdf = (Exp[-(x^2/2)]/Sqrt[2 π]) (1 + ((-6 Sqrt[2] x + 2 Sqrt[2] x^3) CentralMoment[3]/12 Sqrt[2]) + (1/576) (-120 + 360 x^2 - 120 x^4 + 8 x^6) CentralMoment[3]^2 + (1/96) (12 - 24 x^2 + 4 x^4) (-3 + CentralMoment[4]));data = Standardize[Total[RandomReal[1, {3, 10 ^ 5}]]];dist = ProbabilityDistribution[MomentEvaluate[pdf, data], {x, -∞, ∞}]{NExpectation[x ^ 3, xdist], NExpectation[x ^ 4, xdist]}{CentralMoment[data, 3], CentralMoment[data, 4]}Show[Histogram[data, Automatic, "ProbabilityDensity"], Plot[{PDF[dist, z], PDF[NormalDistribution[], z]}, {z, -3, 3}, PlotStyle -> {Directive[Thick], Directive[Dashed, Red]}]]Jarque–Bera統計サンプルを計算する関数 [リンク]:
JarqueBera[list_] := With[{cm2 = CentralMoment[list, 2]}, (Length[list]/6)((CentralMoment[list, 3]^2/cm2^3) + (1/4)((CentralMoment[list, 4]/cm2^2) - 3)^2)]data = Table[JarqueBera[RandomVariate[NormalDistribution[], 2 * 10^3]], {2 * 10^3}];Show[
Histogram[data, 30, "ProbabilityDensity"],
Plot[PDF[ChiSquareDistribution[2], x], {x, 0, 20}, PlotRange -> All]]data = TemporalData[TimeSeries, {{{0., 0.007220215826254015, -0.028898335552430553, -0.24236658577144637,
-0.05412788592296647, -0.03667481168713718, -0.17138823136819967, -0.3007558946785308,
-0.43687938826754796, -0.3573927720423709, -0.345586 ... 33201685, -1.2078738741401542, -1.1504147295751919,
-1.1306360665338737}}, {{0, 1., 0.01}}, 1, {"Continuous", 1}, {"Continuous", 1}, 1,
{ValueDimensions -> 1, ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False,
10.1];md = MovingMap[CentralMoment[#, 2]&, data, {.1}];ListLinePlot[md, PlotRange -> All]ランダム過程の経路集合のスライスについて,中心モーメントを計算する:
data = RandomFunction[WienerProcess[], {0, 1, .01}, 10 ^ 3];times = Range[0, 1, .1];cm = Map[{#, CentralMoment[data[#], 2]}&, times];Show[ListPlot[data], ListLinePlot[cm, PlotStyle -> Green]]特性と関係 (11)
CentralMoment[ExponentialDistribution[λ], 5]CentralMoment[TransformedDistribution[x + a, xExponentialDistribution[λ]], 5]二次中心モーメントはスケールされたVarianceである:
data = RandomReal[10, 20];Variance[data] (Length[data] - 1) / Length[data]CentralMoment[data, 2]CentralMoment[(| | |
| ----- | ----- |
| a1, 1 | a1, 2 |
| a2, 1 | a2, 2 |), 5]//SimplifyCentralMoment[(| | |
| ----- | ----- |
| a1, 1 | a1, 2 |
| a2, 1 | a2, 2 |), {2, 3}]//Simplifyarr = Array[Subscript[a, Row@{##}]&, {n = 4, m = 3, 2, 3}];
rs = {2, 2, 2};
Length[rs] == mCentralMoment[arr, rs] ==
ArrayReduce[Mean,
ArrayReduce[Times@@Power[#, rs]&,
(*Centralize*)
arr - TensorProduct[ConstantArray[1, n], Mean[arr]],
2],
1]//Simplify二次中心モーメントのSqrtはMeanからの偏差のRootMeanSquareである:
Sqrt[CentralMoment[{a, b, c, d}, 2]]RootMeanSquare[{a, b, c, d} - Mean[{a, b, c, d}]]Skewnessは三次中心モーメントと二次中心モーメントのベキの比である:
data = RandomReal[10, 10];Skewness[data]CentralMoment[data, 3] / CentralMoment[data, 2] ^ (3 / 2)Kurtosisは四次中心モーメントと二次中心モーメントのベキの比である:
data = RandomReal[10, 10];Kurtosis[data]CentralMoment[data, 4] / CentralMoment[data, 2] ^ 2CentralMomentはそれ自身の平均周辺にある確率変数のベキのExpectationに等しい:
list = Range[100];Expectation[(x - Mean[list]) ^ 5, xlist] == CentralMoment[list, 5]dist = PoissonDistribution[μ];Expectation[(x - Mean[dist]) ^ 5, xdist] == CentralMoment[dist, 5]次数
のCentralMomentと
が存在する場合,両者は等しい:
cmgf = CentralMomentGeneratingFunction[LaplaceDistribution[0, 1], t]SeriesCoefficient[cmgf, {t, 0, r}]r!CentralMomentを直接使う:
CentralMoment[LaplaceDistribution[0, 1], r]GeneratingFunctionを使って中心モーメント母関数を求める:
GeneratingFunction[CentralMoment[ExponentialDistribution[λ], r] / r!, r, t, Assumptions -> λ > 0]CentralMomentGeneratingFunctionの直接評価と比較する:
CentralMomentGeneratingFunction[ExponentialDistribution[λ], t]FullSimplify[% - %%]CentralMomentはMoment,Cumulant,FactorialMoment等によって表すことができる:
MomentConvert[CentralMoment[4], Cumulant]MomentConvert[CentralMoment[4], Moment]MomentConvert[CentralMoment[2], FactorialMoment]考えられる問題 (2)
高次数の中心モーメントは裾部が重い分布については定義されない:
Table[CentralMoment[StudentTDistribution[3], r], {r, 2, 5}]data = RandomVariate[StudentTDistribution[3], {10 ^ 5, 5}];ListLogPlot[Abs@Table[CentralMoment[data, r], {r, 2, 5}], Joined -> True]MomentConvert[CentralMoment[2], "SampleEstimator"]//TraditionalFormサイズ
のサンプルを仮定してサンプリング母集団の期待値を求める:
MomentConvert[%, {CentralMoment, n}]Limit[%, n -> ∞]MomentConvert[CentralMoment[2], "UnbiasedEstimator", "PowerSymmetricPolynomial"]//TraditionalForm推定器の期待値はすべてのサンプルサイズの中心モーメントである:
MomentConvert[%, {CentralMoment, n}]おもしろい例題 (1)
20個,100個,300個のサンプルについてのCentralMoment推定値の分布:
CentralMoment[ExponentialDistribution[0.9], 2]SmoothHistogram[Table[CentralMoment[RandomVariate[ExponentialDistribution[0.9], {s, 1000}], 2], {s, {20, 100, 300}}], Filling -> Axis, PlotLegends -> {20, 100, 300}, PlotRange -> {{0, 4}, Automatic}]テクニカルノート
-
▪
- 記述統計
関連するガイド
-
▪
- 統計モーメントと母関数 ▪
- 日付と時刻 ▪
- 記述統計 ▪
- 記号的なベクトル,行列,配列
関連するワークフロー
- 計算可能なデータ集合を分析する
テキスト
Wolfram Research (2007), CentralMoment, Wolfram言語関数, https://reference.wolfram.com/language/ref/CentralMoment.html (2024年に更新).
CMS
Wolfram Language. 2007. "CentralMoment." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/CentralMoment.html.
APA
Wolfram Language. (2007). CentralMoment. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CentralMoment.html
BibTeX
@misc{reference.wolfram_2026_centralmoment, author="Wolfram Research", title="{CentralMoment}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/CentralMoment.html}", note=[Accessed: 12-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_centralmoment, organization={Wolfram Research}, title={CentralMoment}, year={2024}, url={https://reference.wolfram.com/language/ref/CentralMoment.html}, note=[Accessed: 12-September-2026]}