Novos Recursos do
Mathematica
8: Distribuições não-paramétricas, derivadas e de fórmulas
◄
anterior
|
próximo
►
Principais Algoritmos
Use distribuições não-paramétricas como qualquer outra distribuição
O comprimento de palavras em inglês oral são estimadas e o tamanho esperado de um substantivo é computado a partir de um
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]=