Wolfram
Mathematica
8의 신기능: 확률과 통계의 해법 및 특성
◄
이전
|
다음
►
핵심 알고리즘
수식에 대한 기대값 연산
식의 기대값을 모수, 비모수, 미분, 공식화된 분포로 연산합니다.
In[1]:=
X
expectations = {HoldForm[ Expectation[E^(2 x), x \[Distributed] PoissonDistribution[\[Lambda]]]], HoldForm[ Expectation[(x - 1)^2 + Abs[x] - 3 x, x \[Distributed] NormalDistribution[0, 1]]], HoldForm[ Expectation[ x^10 + 11, {x, y} \[Distributed] MultivariatePoissonDistribution[1, {2, 3}]]], HoldForm[ Expectation[ x + y^2 + UnitBox[z - 2/3], {x, y, z} \[Distributed] DirichletDistribution[{2, 3, 4, 7}]]], HoldForm[ Expectation[x^2 + x + 54, x \[Distributed] CensoredDistribution[{3, 11}, ExponentialDistribution[\[Lambda]]]]], HoldForm[ Expectation[x^5 + 3 x + 166, x \[Distributed] EmpiricalDistribution[{1, 2, 4 E, 5, 7 Pi, 9}]]], HoldForm[ Expectation[E^x + 2, x \[Distributed] ProbabilityDistribution[3/4 (x^2 + 2 x), {x, 0, 1}]]], HoldForm[ NExpectation[ x^2 + E^(E^(-y^2)) + 1, {x, y} \[Distributed] BinormalDistribution[1/2]]]};
In[2]:=
X
FormulaGallery[forms_List] := Module[{vals = ParallelMap[ReleaseHold, forms]}, Text@TraditionalForm@ Grid[Table[{forms[[i]], vals[[i]]}, {i, Length[forms]}], Dividers -> All, Spacings -> {1, 2}, Alignment -> {Center, Center}, BaseStyle -> {FontFamily -> "Verdana"}, Background -> {None, {{Hue[.6, .15, .9], GrayLevel[.9]}}}, FrameStyle -> Directive[Thick, White]]]
In[3]:=
X
Pane[FormulaGallery[expectations] , 550]
Out[3]=