SnDispersion[list]
list 中の要素の
統計量を与える.
SnDispersion[list,c]
尺度係数 c を使って
統計量を与える.
SnDispersion
SnDispersion[list]
list 中の要素の
統計量を与える.
SnDispersion[list,c]
尺度係数 c を使って
統計量を与える.
詳細とオプション
- SnDispersionはロバストな分散測度である.
- SnDispersionは,その統計量がペアごとの絶対差に基づく,順序に基づいた推定器である.この統計には位置推定は必要ない.
- リスト{x1,x2,…,xn}についての
推定器の値は,{zi,1≤i≤n}の中央値に尺度係数 c を掛けたもので与えられる.ziは j 上の{xi– xj,1≤j≤n}の中央値である. - c が指定されていない場合は,
統計量が正規分布に従うデータについての尺度母数の一定した推定器となるように,
を満足する正の尺度係数 c*が適用される.また,サンプル量が少ない場合に推定器に偏りが生まれないように,デフォルトで有限サンプル修正が使われる. - SnDispersion[{{x1,y1,…},{x2,y2,…},…}]は{SnDispersion[{x1,x2,…}],SnDispersion[{y1,y2,…}],…}を与える.
- SnDispersionはMethodオプションをサポートする.次は,指定可能な明示的設定である.
-
"FiniteSample" 有限サンプル修正を使う(デフォルト) "None" 修正は行わない - 尺度係数 c が入力で指定されている場合は,オプションMethodは無視される.
例題
すべて開く すべて閉じる例 (4)
リストのSnDispersion:
SnDispersion[{6.5, 3.8, 6.6, 5.7, 6.0, 6.4, 5.3}]行列の列のSnDispersion:
SnDispersion[{{1., 2.}, {4., 8.}, {5., 3.}, {2., 15.}}]尺度係数が1のリストのSnDispersion:
SnDispersion[{1, 2, 3, 2, 1}, 1]日付のリストのSnDispersion:
SnDispersion[{Yesterday, Today, Tomorrow}]スコープ (8)
厳密な入力は,尺度係数が厳密である場合は厳密な出力を与える:
SnDispersion[{1, 20, 3, 4}, 1]SnDispersion[{Sqrt[2], E, Pi, Pi ^ 2, 1, 2, 3}, 2]尺度母数が異なるSnDispersion:
SnDispersion[{1.2, 3.8, 4.2, -0.5, -5.2}, 3]SnDispersion[{1.2, 3.8, 4.2, -0.5, -5.2}, 4]行列についてのSnDispersionは列ごとの推定を与える:
SnDispersion[RandomReal[1, {50, 3}]]大きい配列のSnDispersion:
SnDispersion[RandomReal[1, 10 ^ 6]]SnDispersion[RandomReal[1, {10 ^ 6, 2}]]TimeSeriesのSnDispersionを求める:
ts = TemporalData[TimeSeries, {{{3, 8, 4, 11, 9, 2}}, {{{1, 3, 5, 7, 8, 10}}}, 1, {"Continuous", 1},
{"Discrete", 1}, 1, {ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False,
10.1];SnDispersion[ts]SnDispersionは値のみに依存する:
SnDispersion[ts["Values"]]SnDispersionは単位付き数量を含むデータに使うことができる:
data = Quantity[RandomReal[1, 6], "Meters"]SnDispersion[data]日付のSnDispersionを計算する:
dates = WolframLanguageData[All, "DateIntroduced"];DateHistogram[dates]SnDispersion[dates]UnitConvert[%, "Years"]時間のSnDispersionを計算する:
RandomTime[3]SnDispersion[%]{TimeObject[{12}, TimeZone -> 0], TimeObject[{12}, TimeZone -> 2], TimeObject[{12}, TimeZone -> "Asia/Tokyo"]}SnDispersion[%]オプション (1)
アプリケーション (6)
SnDispersion[{3, 10, 10 ^ 6, 20, 5, 6}]StandardDeviation[{3, 10, 10 ^ 6, 20, 5, 6}]//N5年間の移動
分散を使って株式データの大幅変動周期を特定する:
data = TemporalData[«4»];smooth = Sqrt[MovingMap[SnDispersion, data, {Quantity[5, "Year"]}]];DateListPlot[smooth]data = RandomFunction[WienerProcess[], {0, 1, .01}, 10 ^ 3];times = Range[0, 1, .1];sd = Map[{#, SnDispersion[data["SliceData", #]]}&, times];Show[ListPlot[data], ListLinePlot[sd, PlotStyle -> Black]]heights = Quantity[{134, 143, 131, 140, 145, 136, 131, 136, 143, 136, 133, 145, 147,
150, 150, 146, 137, 143, 132, 142, 145, 136, 144, 135, 141}, "Centimeters"];ListPlot[heights, Filling -> Axis, AxesLabel -> Automatic]snd = SnDispersion[heights]md = Median[heights];
n = Length[heights];ListPlot[{heights, {{0, md}, {n, md}}, {{0, md - snd}, {n, md - snd}}, {{0, md + sd}, {n, md + sd}}}, Filling -> {1 -> 0, 3 -> {4}}, Joined -> {False, True, True, True}, PlotStyle -> {Automatic, Automatic, Gray, Gray}, PlotLegends -> {"heights", "median", "Sn-bands"}, AxesLabel -> Automatic]広がりが大きい別の正規分布で外れ値がモデル化された,標準正規分布からのデータについて考察する:
BlockRandom[
SeedRandom[10];
data = RandomVariate[MixtureDistribution[{0.95, 0.05}, {NormalDistribution[], NormalDistribution[0, 10]}], 10 ^ 4];
]DistributionFitTest[data, NormalDistribution[], "TestConclusion"]sd = SnDispersion[data]サンプル中央値から
分散の3倍内にあるデータ点を選択することで外れ値を除く:
med = Median[data];ndata = Pick[data, Sign[Abs[data - med] - 3 sd], -1];DistributionFitTest[ndata, NormalDistribution[], "TestConclusion"]data = RandomVariate[StudentTDistribution[1, 2, 1], 10 ^ 4];Histogram[data, {0.5}]標準偏差,刈込み分散の平方根,
分散の3つの測度でデータの分散を計算する:
ests = {StandardDeviation, Sqrt[TrimmedVariance[#]]&, SnDispersion};{sd, tsd, sn} = Through[ests[data]]ブートストラップ法を使ってこれら3つの分散推定器の確度を査定する:
res = Table[Through[ests[RandomChoice[data, Length[data]]]], {10 ^ 3}];StandardDeviation[res]特性と関係 (2)
SnDispersionは順序に基づいた分散推定器で,その統計量はペアごとの絶対差に基づいている:
data = RandomReal[1, 100];
diffs = Abs[Outer[Subtract, data, data]];RankedMinを使って高中央値の低中央値を計算する:
RankedMin[RankedMin[#, 51]& /@ diffs, 50]尺度係数が1に等しいSnDispersionと比較する:
SnDispersion[data, 1]QnDispersion,SnDispersion,StandardDeviationはNormalDistributionの尺度母数の推定器である:
data = RandomVariate[NormalDistribution[1, 2], 10 ^ 4];
est = {QnDispersion, SnDispersion, StandardDeviation};TableForm[Through[est[data]], TableHeadings -> {est}]{qnerror, snerror, stderror} = Variance[Table[Through[est[RandomChoice[data, 10 ^ 4]]], {10 ^ 3}]];推定された結果を使ってStandardDeviationについての相対効率を計算する:
{stderror / qnerror, stderror / snerror}テキスト
Wolfram Research (2017), SnDispersion, Wolfram言語関数, https://reference.wolfram.com/language/ref/SnDispersion.html (2024年に更新).
CMS
Wolfram Language. 2017. "SnDispersion." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/SnDispersion.html.
APA
Wolfram Language. (2017). SnDispersion. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SnDispersion.html
BibTeX
@misc{reference.wolfram_2026_sndispersion, author="Wolfram Research", title="{SnDispersion}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/SnDispersion.html}", note=[Accessed: 15-July-2026]}
BibLaTeX
@online{reference.wolfram_2026_sndispersion, organization={Wolfram Research}, title={SnDispersion}, year={2024}, url={https://reference.wolfram.com/language/ref/SnDispersion.html}, note=[Accessed: 15-July-2026]}