CovarianceFunction[data,hspec]
data からの遅れ hspec での共分散関数を推定する.
CovarianceFunction[proc,hspec]
ランダム過程 proc の遅れ hspec での共分散関数を表す.
CovarianceFunction[proc,s,t]
時間 s および t におけるランダム過程 proc の共分散関数を表す.
CovarianceFunction
CovarianceFunction[data,hspec]
data からの遅れ hspec での共分散関数を推定する.
CovarianceFunction[proc,hspec]
ランダム過程 proc の遅れ hspec での共分散関数を表す.
CovarianceFunction[proc,s,t]
時間 s および t におけるランダム過程 proc の共分散関数を表す.
詳細
- CovarianceFunctionは自己共分散関数としても知られている.
- hspec に使用可能な指定
-
τ 時間あるいは遅れ τ で {τmax} 0から τmaxまで等間隔で {τmin,τmax} τminから τmaxまで等間隔で {τmin,τmax,d τ} τminから τmaxまで刻み幅 d τ で {{τ1,τ2,…}} 明示的な{τ1,τ2,…}を使う - 平均
,データ値 xiの data について,遅れ h におけるCovarianceFunctionは以下で与えられる. -

(xi+h-
)(xi-
)スカラー値データについて 
ベクトル値データについて - data が経路集合を含むTemporalDataの場合,出力はすべての経路の平均を表す.
- 時間 t における平均関数 μ[t]および値 x[t]の過程 proc のCovarianceFunctionは以下で与えられる.
-
Expectation[(x[s]-μ[s])(x[t]-μ[t])] スカラー値過程について Expectation[(x[s]-μ[s])⊗(x[t]-μ[t])] ベクトル値過程について - 記号 ⊗ はKroneckerProductを表す.
- CovarianceFunction[proc,h]は proc が弱定常過程でCovarianceFunction[proc,h,0]と等しいときにのみ定義される.
- 過程 proc はARMAProcessやWienerProcessのような任意のランダム過程である.
例題
すべて開く すべて閉じる例 (4)
CovarianceFunction[{2, 3, 4, 3}, 2]自己回帰時系列からのランダムサンプルについてのサンプルの共分散関数:
data = RandomFunction[ARProcess[{.2, .3, .4}, 1], {1, 10 ^ 4}];ListPlot[CovarianceFunction[data, {20}], Filling -> Axis, PlotRange -> All]CovarianceFunction[BinomialProcess[p], s, t]DiscretePlot3D[Evaluate[% /. {p -> 2 / 3}], {s, 0, 10}, {t, 0, 10}, ExtentSize -> 1 / 2, ColorFunction -> "Rainbow"]CovarianceFunction[WienerProcess[μ, σ], s, t]Plot3D[Evaluate[% /. {μ -> 1, σ -> 2}], {s, 0, 10}, {t, 0, 10}, ColorFunction -> "Rainbow"]スコープ (13)
経験的推定値 (7)
CovarianceFunction[Range[10], 9]CovarianceFunction[Range[10], {9}]CovarianceFunction[Range[10], {1, 9, 2}]ts = TemporalData[TimeSeries, {{{-2.9904395734335427, -1.5547517217370468, -2.007044987914736,
-0.7114933373063236, -1.5920036118254968, 0.23183536513859127, 0.056774681349179124,
0.32394041932443046, 0.10382798659711348, -0.684046765274114, - ... 1687325555,
3.410933732368106, 2.5200924558212163, 2.008558601261935, 0.43151331467691206,
0.6249727955196763}}, {{1, 1000, 1}}, 1, {"Continuous", 1}, {"Discrete", 1}, 1,
{ValueDimensions -> 1, ResamplingMethod -> None}}, False, 10.1];複数の遅れについての時系列の共分散関数は,時系列として与えられる:
cov = CovarianceFunction[ts, {100}]ListPlot[cov, Filling -> Axis]data = RandomFunction[ARProcess[{.8}, 1], {0, 500}, 25]cov = CovarianceFunction[data, {50}];ListPlot[cov, Filling -> 0]proc = MAProcess[{.4, .3, .5, .6, .3}, 1.];data = RandomFunction[proc, {0, 5000}];ListPlot[CovarianceFunction[#, {10}]& /@ {proc, data}, Filling -> {1 -> {2}}, PlotStyle -> PointSize[Medium], PlotLegends -> {"process covariance", "sample covariance"}]proc = ARProcess[{{{.3, .1}, {.6, .3}}}, {{1, .3}, {.3, .6}}];
data = RandomFunction[proc, {100}];
cov = CovarianceFunction[data, {-6, 6}];Table[ListPlot[cov["Values"][[All, i, j]], Filling -> 0, PlotLabel -> {i, j}], {i, 1, 2}, {j, 1, 2}]ランダム過程 (6)
CovarianceFunction[ARProcess[{a}, σ^2], s, t]DiscretePlot3D[Evaluate[% /. {a -> 2 / 3, σ -> 1}], {s, 0, 10}, {t, 0, 10}, ExtentSize -> 1 / 2, ColorFunction -> "Rainbow"]CovarianceFunction[ARProcess[{a}, σ^2], h]DiscretePlot[Evaluate[% /. {a -> 2 / 3, σ -> 1}], {h, 0, 10}, ExtentSize -> 1 / 2, ColorFunction -> "Rainbow", AxesLabel -> {h, None}]CovarianceFunction[OrnsteinUhlenbeckProcess[μ, σ, θ], s, t]Plot3D[Evaluate[% /. {μ -> 1, σ -> 2, θ -> 1 / 3}], {s, 0, 10}, {t, 0, 10}, ColorFunction -> "Rainbow"]CovarianceFunction[OrnsteinUhlenbeckProcess[μ, σ, θ], h]Plot[Evaluate[% /. {μ -> 1, σ -> 2, θ -> 1 / 3}], {h, 0, 10}, ColorFunction -> "Rainbow", Filling -> Axis, AxesLabel -> {h, None}]CovarianceFunction[BinomialProcess[p], s, t]DiscretePlot3D[Evaluate[% /. p -> 1 / 3], {s, 0, 10}, {t, 0, 10},
ExtentSize -> 1 / 2, ColorFunction -> "Rainbow"]antidiagonals = CovarianceFunction[BinomialProcess[1 / 3], t, t + h]DiscretePlot[Evaluate@Table[antidiagonals, {t, 1, 4}], {h, 0, 6}, ExtentSize -> 1 / 2, PlotLegends -> (Row[{"t = ", #}]& /@ Range[1, 4]), AxesLabel -> {h, None}]CovarianceFunction[PoissonProcess[μ], s, t]Plot3D[Evaluate[% /. μ -> 3], {s, 0, 10}, {t, 0, 10}, ColorFunction -> "Rainbow"]antidiagonals = CovarianceFunction[PoissonProcess[3], t, t + h]Plot[Evaluate@Table[antidiagonals, {t, 1, 4}], {h, 0, 6}, AxesLabel -> {h, None}, PlotLegends -> (Row[{"t = ", #}]& /@ Range[1, 4])]proc1 = ARProcess[{.8}, 1];
proc2 = MAProcess[{-.4, -.7, .6, -1}, 1];
proc3 = SARMAProcess[{}, {}, {3, {.6}, {.1}}, 1];
proc4 = FARIMAProcess[{}, 1 / 3, {}, 1];DiscretePlot[CovarianceFunction[#, h], {h, 0, 15}, ExtentSize -> 1 / 2, PlotRange -> All, PlotLabel -> Head[#]]& /@ {proc1, proc2, proc3, proc4}ベクトルARProcessについての相互共分散プロット:
proc = ARProcess[{{{.3, .1}, {.6, .3}}}, {{1, .3}, {.3, .6}}];
cov = CovarianceFunction[proc, h];Table[DiscretePlot[cov[[i, j]], {h, -6, 6}, ExtentSize -> 1 / 2, PlotLabel -> {i, j}], {i, 1, 2}, {j, 1, 2}]アプリケーション (1)
次のデータはMAProcessあるいはARProcessのどちらを使った場合に最もうまくモデル化ができるかを考える:
ListLinePlot[data = TemporalData[TimeSeries, {{{-1.4735257611469446, -0.9158187257309729, -1.9060205147226934,
-1.6174582169404574, -2.633459084244463, -2.104839842098871, -2.8701276893108894,
-2.4118183939601607, -0.5125633448622677, -1.2356329399850385, 1. ... 26394036266876, -0.16380797769527589, 0.3559909972777121,
1.5343047104249412, 0.10763337590714506}}, {{0, 100, 1}}, 1, {"Continuous", 1},
{"Discrete", 1}, 1, {ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False,
10.1]]candidates = {MAProcess[{.5, .4}, 1], ARProcess[{.5, .4}, 1]};SeedRandom[2];ListLinePlot[RandomFunction[#, {0, 100}]]& /@ candidatesListPlot[CovarianceFunction[data, {10}], Filling -> 0]ARProcessは明らかにMAProcessよりもよいモデル候補である:
ListPlot[CovarianceFunction[#, {10}], PlotLabel -> Head[#], Filling -> 0]& /@ candidates特性と関係 (14)
サンプル共分散関数は,過程の共分散関数のバイアス推定器である:
proc = ARMAProcess[1, {5 / 6, -1 / 6}, {2 / 3}, 1];
paths = RandomFunction[proc, {0, n = 10}, 10 ^ 3];CovarianceFunction[paths, {10}]scov = TimeSeriesMapThread[#2(n + 1) / (n + 1 - #1)&, %]cov = CovarianceFunction[proc, {10}]ListPlot[{scov, cov}, Filling -> 0, PlotLegends -> {"sample covariance", "process covariance"}]過程の共分散関数はCovariance行列の非対角項である:
𝒫 = WienerProcess[μ, σ];Covariance[𝒫[{s, t}], 1, 2]CovarianceFunction[𝒫, s, t]Simplify[%% - %, 0 < s < t]data = Range[10];
evar1 = CovarianceFunction[data, 0]Varianceを使って推定値と比べる:
evar2 = Variance[data](10 evar1) / (9evar2)サンプルの共分散関数は,CorrelationFunctionに関連している:
data = Range[10];CovarianceFunction[data, {9}]CorrelationFunction[data, {9}] (CovarianceFunction[data, 0])% - %%サンプルの共分散関数は,AbsoluteCorrelationFunctionに関連している:
data = Range[10];
n = Length[data];CovarianceFunction[data, {n - 1}]AbsoluteCorrelationFunction[data - Mean[data], {n - 1}]% - %%Expectationを使って共分散関数を計算する:
𝒫 = WienerProcess[μ, σ];
m[s_] := Mean[𝒫[s]]Expectation[(x[s] - m[s])(x[t] - m[t]), x𝒫, Assumptions -> s > 0 && t > 0]CovarianceFunction[𝒫, s, t]Simplify[% - %%, 0 < s < t]等しい時間に対する共分散関数は,Varianceに簡約される:
𝒫 = OrnsteinUhlenbeckProcess[μ, σ, θ];CovarianceFunction[𝒫, t, t]Variance[𝒫[t]]% - %%共分散関数
は,AbsoluteCorrelationFunction
に関連している:
𝒫 = WienerProcess[μ, σ];AbsoluteCorrelationFunction[𝒫, s, t]CovarianceFunction[𝒫, s, t] + Mean[𝒫[s]] Mean[𝒫[t]]% - %%共分散関数はCovarianceに関連している:
𝒫 = WienerProcess[μ, σ];CovarianceFunction[𝒫, s, t]Covariance[𝒫[{s, t}], 1, 2]Simplify[%% - %, 0 < s < t]共分散関数
は,CorrelationFunction
に関連している:
𝒫 = PoissonProcess[μ];
sd[s_] := StandardDeviation[𝒫[s]]CorrelationFunction[𝒫, s, t]CovarianceFunction[𝒫, s, t] / (sd[s] sd[t])% - %%//FullSimplify[#, s > 0 && t > 0]&共分散関数は,ToInvertibleTimeSeriesについては不変である:
TimeSeriesInvertibility[proc = MAProcess[{2, 4}, 1]]iproc = ToInvertibleTimeSeries@procCovarianceFunction[#, s, t]& /@ {proc, iproc}data = RandomFunction[ARIMAProcess[{}, 1, {}, 1], {0, 100}];Mean[data]newdata = Standardize[data, Mean, 1&];ListPlot[CovarianceFunction[#, {20}], Filling -> 0]& /@ {data, newdata}時系列のPowerSpectralDensityは共分散関数を変換したものである:
proc = ARProcess[c, {a}, σ^2];
cf = CovarianceFunction[proc, h]ft = FourierSequenceTransform[cf, h, z]PowerSpectralDensity[proc, z]FullSimplify[% - ft]データのPowerSpectralDensityはサンプル共分散関数を変換したものである:
sample = Range[20];
n = Length[sample];
cov = CovarianceFunction[sample, {n - 1}];
cov = Join[Reverse[Rest[cov]], cov];ListFourierSequenceTransformを適用する:
ListFourierSequenceTransform[cov, w, -n + 1]//ExpToTrigSamplePowerSpectralDensityと比較する:
PowerSpectralDensity[sample, w]% - %%//FullSimplify考えられる問題 (1)
CovarianceFunctionの出力にはDifferenceRootが含まれることがある:
CovarianceFunction[ARProcess[{a, b}, σ^2], t] //Simplify[#, t > 0]&FunctionExpandを使って明示的なベキを回復する:
%//FunctionExpandテキスト
Wolfram Research (2012), CovarianceFunction, Wolfram言語関数, https://reference.wolfram.com/language/ref/CovarianceFunction.html.
CMS
Wolfram Language. 2012. "CovarianceFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CovarianceFunction.html.
APA
Wolfram Language. (2012). CovarianceFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CovarianceFunction.html
BibTeX
@misc{reference.wolfram_2026_covariancefunction, author="Wolfram Research", title="{CovarianceFunction}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/CovarianceFunction.html}", note=[Accessed: 12-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_covariancefunction, organization={Wolfram Research}, title={CovarianceFunction}, year={2012}, url={https://reference.wolfram.com/language/ref/CovarianceFunction.html}, note=[Accessed: 12-September-2026]}