BiweightMidvariance[list]
list 中の要素のバイウェイト中間分散の値を与える.
BiweightMidvariance[list,c]
尺度母数 c のバイウェイト中間分散の値を与える.
BiweightMidvariance
BiweightMidvariance[list]
list 中の要素のバイウェイト中間分散の値を与える.
BiweightMidvariance[list,c]
尺度母数 c のバイウェイト中間分散の値を与える.
詳細
- BiweightMidvarianceはロバストな分散推定器である.
- BiweightMidvarianceは,Medianを中心とする重み付きの2次中心モーメントで与えられる.要素が中心から遠ざかるほど,その重みは小さくなる.
- 重み関数の幅尺度は母数 c で制御される.大きい c は統計の計算によりたくさんのデータ値が含まれることを意味し,逆もまた真である.
- リスト{x1,x2,…,xn}については,バイウェイト中間分散推定器の値は
で与えられる.ただし,
であり,
はMedian[{x1,…,xn}],
はMedianDeviation[{x1,…,xn}]である. - BiweightMidvariance[list]はBiweightMidvariance[list,9]に等しい.
- BiweightMidvariance[{{x1,y1,…},{x2,y2,…},…}]は{BiweightMidvariance[{x1,x2,…}],BiweightMidvariance[{y1,y2,…}],…}を与える.
- BiweightMidvarianceでは,c は任意の正の実数でよい.
例題
すべて開く すべて閉じる例 (4)
リストのBiweightMidvariance:
BiweightMidvariance[{6.5, 3.8, 6.6, 5.7, 6.0, 6.4, 5.3}]行列の列のBiweightMidvariance:
BiweightMidvariance[{{1., 2.}, {4., 8.}, {5., 3.}, {2., 15.}}]尺度因数が8であるリストのBiweightMidvariance:
BiweightMidvariance[{1, 2, 3, 2, 1}, 8]日付のリストのBiweightMidvariance:
BiweightMidvariance[{Yesterday, Today, Tomorrow}]スコープ (9)
BiweightMidvariance[{1, 20, 3, 4}]BiweightMidvariance[{1., 2., 3., 4.}]BiweightMidvariance[N[{1, 2, 3, 4}, 30]]BiweightMidvariance[{1.2, 3.8, 4.2, -0.5, -5.2}, 10]BiweightMidvariance[{1.2, 3.8, 4.2, -0.5, -5.2}, 100]BiweightMidvariance[RandomReal[1, {50, 3}]]BiweightMidvariance[RandomReal[1, 10 ^ 6]]BiweightMidvariance[RandomReal[1, {10 ^ 6, 3}]]TimeSeriesのバイウェイト中間分散を求める:
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];BiweightMidvariance[ts]//NBiweightMidvariance[ts["Values"]//N]バイウェイト中間分散は単位付きの数量を含むデータに使うことができる:
data = Quantity[RandomReal[1, 6], "Meters"]BiweightMidvariance[data]dates = WolframLanguageData[All, "DateIntroduced"];DateHistogram[dates]BiweightMidvariance[dates]UnitConvert[%, "Years" ^ 2]RandomTime[3]BiweightMidvariance[%]{TimeObject[{12}, TimeZone -> 0], TimeObject[{12}, TimeZone -> 2], TimeObject[{12}, TimeZone -> "Asia/Tokyo"]}BiweightMidvariance[%]アプリケーション (5)
BiweightMidvariance[{3, 10, 10 ^ 6, 20, 5, 6}]//NVariance[{3, 10, 10 ^ 6, 20, 5, 6}]//Ndata = TemporalData[«4»];DateListPlot[data]5年間の移動バイウェイト中間分散の平方根を使ってデータを平滑化する:
smooth = Sqrt[MovingMap[BiweightMidvariance, data, {Quantity[5, "Year"]}]];DateListPlot[smooth]ランダム過程の経路集合のスライスについてのバイウェイト中間分散を計算する:
data = RandomFunction[WienerProcess[], {0, 1, .01}, 10 ^ 3];times = Range[0.1, 1, .1];md = Map[{#, BiweightMidvariance[data["SliceData", #]]}&, times]Show[ListPlot[data], ListLinePlot[md, 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]bmv = BiweightMidvariance[heights]//N中央値についてのバイウェイト中間分散の平方根をプロットする:
m = Median[heights];
n = Length[heights];
sbmv = Sqrt[bmv];ListPlot[{heights, {{0, m}, {n, m}}, {{0, m - sbmv}, {n, m - sbmv}}, {{0, m + sbmv}, {n, m + sbmv}}}, Filling -> {1 -> 0, 3 -> {4}}, Joined -> {False, True, True, True}, PlotStyle -> {Automatic, Automatic, Gray, Gray}, PlotLegends -> {"heights", "median", "bands"}, AxesLabel -> Automatic]外れ値が広がりが大きい他の正規分布でモデル化された標準正規分布からのデータについて考察する:
BlockRandom[
SeedRandom[10];
data = RandomVariate[MixtureDistribution[{0.95, 0.05}, {NormalDistribution[], NormalDistribution[0, 10]}], 10 ^ 4];
]QuantilePlot[data]DistributionFitTest[data, NormalDistribution[], "TestConclusion"]bmv = BiweightMidvariance[data]サンプルの平均値からバイウェイト中間分散の平方根の3倍以内にあるデータ点を拾い出すことで外れ値を削除する:
bound = 3Sqrt[bmv];
med = Median[data];ndata = Pick[data, Sign[Abs[data - med] - bound], -1];QuantilePlot[ndata]DistributionFitTest[ndata, NormalDistribution[], "TestConclusion"]特性と関係 (3)
data = {-1000, 3, 10, 20, 1, -3, 5, 0, 6, 1000};bw1 = N@BiweightMidvariance[data]区間
外の値は統計に影響しない.ここで,
はサンプルの中央値,
は中央値の絶対偏差,
はデフォルト値が9に等しい尺度母数である:
{x0, δ} = {Median[data], MedianDeviation[data]}バイウェイト中間分散の計算に使用される重み関数 w(x)の形:
Plot[Max[1 - ((x - x0) / (9 δ)) ^ 2, 0] ^ 2, {x, -60, 70}]サンプルの最小値と最大値を2倍して,再度バイウェイト中間分散を計算する:
data[[{1, -1}]] *= 2;bw2 = N@BiweightMidvariance[data]bw1 == bw2BiweightMidvarianceとVarianceは,データの分散推定器である:
data = RandomVariate[StudentTDistribution[2], 10 ^ 4];
est = {BiweightMidvariance, Variance};TableForm[Through[est[data]], TableHeadings -> {est}]データのサンプルを再度取ってブートストラップ推定を生成する:
{bmvbootstrap, varbootstrap} = Transpose[Table[Through[est[RandomChoice[data, 10 ^ 4]]], {10 ^ 3}]];各推定器についてブートストラップ推定の標準偏差と平均の比を計算する.より小さい値はより正確な分散測度を意味する:
StandardDeviation[bmvbootstrap] / Mean[bmvbootstrap]StandardDeviation[varbootstrap] / Mean[varbootstrap]BiweightMidvarianceは,母数 c の大きい値については2次中心モーメントに収束する:
data = RandomReal[StudentTDistribution[1], 1000];cm = CentralMoment[data, 2]Plot[{BiweightMidvariance[data, c], cm}, {c, 5, 10 ^ 4}, AxesLabel -> {c}, PlotRange -> All, PlotLegends -> {"biweight mid-variance", "second central moment"}]考えられる問題 (1)
バイウェイト中間分散は,尺度母数が小さく要素数が偶数のベクトルについては定義されないことがある:
data1 = {1., 2., 3., 4.};BiweightMidvariance[data1, 0.5]長さが奇数で c が比較的小さいベクトルについては,バイウェイト中間分散は非常に大きい値を仮定することがある:
data2 = {1., 2., 3., 4., 5.};Plot[BiweightMidvariance[data2, c], {c, 1, 2}, PlotRange -> All]BiweightMidvariance[data2, 1.678245]テキスト
Wolfram Research (2017), BiweightMidvariance, Wolfram言語関数, https://reference.wolfram.com/language/ref/BiweightMidvariance.html (2024年に更新).
CMS
Wolfram Language. 2017. "BiweightMidvariance." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/BiweightMidvariance.html.
APA
Wolfram Language. (2017). BiweightMidvariance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BiweightMidvariance.html
BibTeX
@misc{reference.wolfram_2026_biweightmidvariance, author="Wolfram Research", title="{BiweightMidvariance}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/BiweightMidvariance.html}", note=[Accessed: 19-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_biweightmidvariance, organization={Wolfram Research}, title={BiweightMidvariance}, year={2024}, url={https://reference.wolfram.com/language/ref/BiweightMidvariance.html}, note=[Accessed: 19-August-2026]}