BiweightLocation[list]
list 中の要素のバイウェイト位置推定器の値を与える.
BiweightLocation[list,c]
尺度母数が c のバイウェイト位置推定器の値を与える.
BiweightLocation
BiweightLocation[list]
list 中の要素のバイウェイト位置推定器の値を与える.
BiweightLocation[list,c]
尺度母数が c のバイウェイト位置推定器の値を与える.
詳細とオプション
- BiweightLocationはロバストな位置推定器である.
- BiweightLocationは要素の重み付き平均によって与えられる.中心から遠い要素ほど重みが小さい.
- 重み関数の幅尺度は母数 c によって制御される.大きい c は統計計算により多くのデータ値が含まれることを意味し,逆もまた真である.
- リスト{x1,x2,…,xn}について,バイウェイト位置推定器の値は
で与えられる.ただし,
であり
はMedian[{x1-x*,x2-x*,…,xn-x*}]である.推定器の値 x*は,デフォルトで自動的に選択された初期値を使って反復的に計算される. - BiweightLocation[list]はBiweightLocation[list,6]に等しい.
- BiweightLocation[{{x1,y1,…},{x2,y2,…},…}]は{BiweightLocation[{x1,x2,…}],BiweightLocation[{y1,y2,…}],…}を与える.
- BiweightLocationでは c は任意の正の実数でよい.
- 次は使用可能なオプションである.
-
AccuracyGoal Automatic 目標確度 MaxIterations Automatic 使用する最大反復回数 Method Automatic 使用するメソッド PrecisionGoal Automatic 目標精度 WorkingPrecision MachinePrecision 内部計算に使用される精度 - Method{"InitialPoint"x0}の設定でカスタム初期値
を使うことができる.
例題
すべて開く すべて閉じる例 (4)
リストのBiweightLocation:
BiweightLocation[{6.5, 3.8, 6.6, 5.7, 6.0, 6.4, 5.3}]行列の列のBiweightLocation:
BiweightLocation[{{1., 2.}, {4., 8.}, {5., 3.}, {2., 15.}}]尺度母数が7のリストのBiweightLocation:
BiweightLocation[{1., 2., 3., 2., 1.}, 7]日付のリストのBiweightLocation:
RandomDate[4]BiweightLocation[%]スコープ (8)
BiweightLocation[N[{1, 2, 3, 4, 9, 10}]]BiweightLocation[N[{1, 2, 3, 4, 9, 10}, 20]]BiweightLocation[{1.2, 3.8, 4.2, -0.5, -5.2}, 10]BiweightLocation[{1.2, 3.8, 4.2, -0.5, -5.2}, 100]BiweightLocation[RandomReal[1, {50, 3}]]BiweightLocation[RandomReal[1, 10 ^ 6]]BiweightLocation[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];BiweightLocation[ts]BiweightLocation[ts["Values"]]バイウェイト位置は,単位付き数量を含むデータに使うことができる:
data = Quantity[RandomReal[1, 6], "Meters"]BiweightLocation[data]dates = WolframLanguageData[All, "DateIntroduced"];DateHistogram[dates]BiweightLocation[dates]RandomTime[3]BiweightLocation[%]{TimeObject[{12}, TimeZone -> 0], TimeObject[{12}, TimeZone -> 2], TimeObject[{12}, TimeZone -> "Asia/Tokyo"]}BiweightLocation[%]オプション (2)
MaxIterations (1)
BiweightLocationの値は反復的に計算される.計算で試みられる反復回数を制限する:
BiweightLocation[{1.2, -3., 4.1, 2.9, 6., -2.}, MaxIterations -> 5]BiweightLocation[{1.2, -3., 4.1, 2.9, 6., -2.}, MaxIterations -> 10]Method (1)
BiweightLocationの計算で初期値を調整する:
BiweightLocation[{1.2, -3., 4.1, 2.9, 6., -2.}, Method -> {"InitialPoint" -> 1.5}]BiweightLocation[{1.2, -3., 4.1, 2.9, 6., -2.}, Method -> {"InitialPoint" -> 1.56702}, MaxIterations -> 5]BiweightLocation[{1.2, -3., 4.1, 2.9, 6., -2.}, MaxIterations -> 5]アプリケーション (3)
BiweightLocation[{1, 5, 2, 6, 10, 10 ^ 5, 5, 4, -200, 5}, .1]//N極値はMeanに大きく影響する:
Mean[{1, 5, 2, 6, 10, 10 ^ 5, 5, 4, -200, 5}]//Ndist = MixtureDistribution[{0.98, 0.02}, {BinormalDistribution[0], BinormalDistribution[{0, 0}, {1000, 1000}, 0.5]}];
BlockRandom[SeedRandom[1];
data = RandomVariate[dist, 10 ^ 3];]Histogram3D[data, PlotTheme -> "Detailed"]Meanで中心を推定する:
Mean[data]サンプル平均推定器はガウス分布に従わないデータについては大きく広がる.推定器の標準偏差は以下の通りである:
StandardDeviation[dist] / Sqrt[Length[data]]BiweightLocationで中心を推定する:
BiweightLocation[data]ブートストラップ法を使ってバイウェイト位置推定器の広がりを見積もる:
StandardDeviation[res = Table[BiweightLocation[RandomChoice[data, 10 ^ 3]], {10 ^ 3}]]n[] := RandomVariate[CauchyDistribution[0, 1.2]]
f[] := {u Cos[u] + n[], u Sin[u] + n[]};
data = Table[f[], {u, 0, 6π, 1 / 100}];もとになっている信号とノイズがあるシミュレーション結果の経路:
{ParametricPlot[{u Cos[u], u Sin[u]}, {u, 0, 6π}], pd = ListPlot[data, AspectRatio -> 1]}移動BiweightLocationを使って軌跡を平滑化する:
td = TimeSeries[data, {0., 6π}, ValueDimensions -> 2];smooth[r_] := MovingMap[BiweightLocation, td, {Quantity[r, "Events"], Center}]Quiet@Table[ParametricPlot[Evaluate[smooth[r]["PathFunction"][t]], {t, 0, 6π}], {r, {25, 50, 100}}]特性と関係 (3)
data = {-1000, 3, 10, 20, 1, -3, 5, 0, 6, 1000};x0 = BiweightLocation[data]区間
外の値は統計に影響しない.ただし,
はバイウェイト位置の値,
は
についての中央値絶対偏差,
はデフォルト値が6に等しい尺度母数である:
δ = Median[Abs[data - x0]]バイウェイト位置の計算に使われている重み関数 w(x)の形:
Plot[Max[1 - ((x - x0) / (6 δ)) ^ 2, 0] ^ 2, {x, -60, 70}]サンプル中の最大値と最小値を2倍してバイウェイト位置を再び計算する:
data[[{1, -1}]] *= 2;nx0 = BiweightLocation[data]x0 == nx0正規分布に従うサンプルについては,BiweightLocationとMeanはほぼ等しい:
data1 = RandomVariate[NormalDistribution[1, 2], 10 ^ 5];Mean[data1]BiweightLocation[data1]CauchyDistributionからのデータのように正規分布に従わないサンプルについては,BiweightLocationは中心位置についてMeanよりよい推定を与える:
data2 = RandomVariate[CauchyDistribution[1, 2], 10 ^ 5];Mean[data2]BiweightLocation[data2]BiweightLocationは,c の大きい値についてはMeanに近付く:
data = RandomReal[StudentTDistribution[1], 1000];mean = Mean[data]Plot[{BiweightLocation[data, c], mean}, {c, 5, 5 10 ^ 3}, AxesLabel -> {c}, PlotRange -> All, PlotLegends -> {"biweight location", "mean"}]おもしろい例題 (2)
尺度係数 c に依存する一変量データの平均周囲のバイウェイト位置の変化:
data = RandomVariate[SkewNormalDistribution[1, .2, 2], 30];
cvals = {1 / 10, 1 / 2, 1, 3, 4, 5, 6, 8};
m = Mean[data];
loc = Table[{BiweightLocation[data, c]}, {c, cvals}];legend = PointLegend[Join[{"data"}, Row[{"c = ", #}]& /@ cvals], LegendLayout -> {"ReversedRow", 5}];NumberLinePlot[Join[{data}, loc], Epilog -> Line[{{m, 0}, {m, 9.5}}], Ticks -> {{{m, "Mean"}}, None}, PlotLegends -> legend]尺度係数 c に依存する二変量データの平均周囲のバイウェイト位置の変化:
Manipulate[
SeedRandom[12];data = Join[RandomPoint[Disk[{0, 0}, 1], 40], {{-2, .1}, {-1.6, -.1}, {-1.5, -.3}}];Legended[Graphics[{GrayLevel[.5], PointSize[.015], Point[data], Green, PointSize[.025], Point[Mean[data]], Red, PointSize[.025], Point[BiweightLocation[data, c]]}, ImageSize -> 300], PointLegend[{Green, Red}, {"Mean", "Biweight Location"}]], {{c, 1}, .01, 20}, SaveDefinitions -> True]テキスト
Wolfram Research (2017), BiweightLocation, Wolfram言語関数, https://reference.wolfram.com/language/ref/BiweightLocation.html (2024年に更新).
CMS
Wolfram Language. 2017. "BiweightLocation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/BiweightLocation.html.
APA
Wolfram Language. (2017). BiweightLocation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BiweightLocation.html
BibTeX
@misc{reference.wolfram_2026_biweightlocation, author="Wolfram Research", title="{BiweightLocation}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/BiweightLocation.html}", note=[Accessed: 17-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_biweightlocation, organization={Wolfram Research}, title={BiweightLocation}, year={2024}, url={https://reference.wolfram.com/language/ref/BiweightLocation.html}, note=[Accessed: 17-August-2026]}