Wolfram
Mathematica
8의 신기능: 비모수 분포, 파생 분포, 포뮬라 분포
◄
이전
|
다음
►
핵심 알고리즘
다른 분포와 비슷한 비모수 분포 사용
영어 단어 길이의 추정과
HistogramDistribution
로부터 연산된 기대 길이를 연산해 봅니다.
In[1]:=
X
partOfSpeech = WordData[All, "PartsOfSpeech"]; data = Table[ StringLength /@ i, {i, (WordData[All, #] & /@ partOfSpeech)}];
In[2]:=
X
Framed[Grid[ Partition[ Table[Plot[ Evaluate[PDF[HistogramDistribution[data[[i]]], x]], {x, 0, 30}, PlotLabel -> Style[partOfSpeech[[i]], Bold, FontFamily -> "Verdana"], PlotRange -> All, Exclusions -> None, PlotPoints -> 500, Filling -> Axis, PlotStyle -> {Thick, Black}, FillingStyle -> ColorData[14, 8], ImageSize -> 175, Ticks -> {Range[0, 30, 10], None}, Axes -> {True, False}], {i, Length[partOfSpeech]}], 3]], RoundingRadius -> 10, FrameMargins -> 10, Background -> GrayLevel[.95]]
Out[2]=
In[3]:=
X
Expectation[len, len \[Distributed] HistogramDistribution[data[[1]]]] // N
Out[3]=