Wolfram
Mathematica
8의 신기능: 비모수 분포, 파생 분포, 포뮬라 분포
◄
이전
|
다음
►
핵심 알고리즘
정교한 혼합 모델에서의 비모수 분포
두꺼운 꼬리 데이터의 준 모수 모델입니다. 꼬리 부분은 최대 가능도를 통한 코시 분포 추정으로 절단된 것입니다. 모델의 중심 부분은 데이터의 비모수 핵 밀도로 추정된 것입니다.
In[1]:=
X
data = RandomVariate[CauchyDistribution[0, 1], 10000]; q10 = Quantile[data, .1]; q90 = Quantile[data, .9]; left = EstimatedDistribution[Select[data, # < q10 &], TruncatedDistribution[{-\[Infinity], q10}, CauchyDistribution[a, b]]]; right = EstimatedDistribution[Select[data, # > q90 &], TruncatedDistribution[{q90, \[Infinity]}, CauchyDistribution[a, b]]]; body = TruncatedDistribution[{q10, q90}, SmoothKernelDistribution[Select[data, q10 - 1 <= # <= q90 + 1 &]]];
In[2]:=
X
\[ScriptCapitalD] = MixtureDistribution[{.1, .8, .1}, {left, body, right}];
In[3]:=
X
Framed[Grid[ Partition[ Table[Plot[f[\[ScriptCapitalD], x], {x, -20, 20}, PlotRange -> All, Exclusions -> None, Axes -> {True, False}, Ticks -> {Range[-20, 20, 10], {}}, PlotLabel -> Style[ToString@f, Bold, FontFamily -> "Verdana"], Filling -> Axis, PlotStyle -> Black, FillingStyle -> (ColorData[35, #] & /@ Flatten[2 Position[{PDF, CDF, SurvivalFunction, HazardFunction}, f] + 1])[[1]], ImageSize -> 270], {f, {PDF, CDF, SurvivalFunction, HazardFunction}}], 2]], RoundingRadius -> 10, FrameMargins -> 10]
Out[3]=