New in Wolfram
Mathematica
8: Probability and Statistics Solvers and Properties
◄
previous
|
next
►
Core Algorithms
Compute a Two-Tailed Probability
Compute a two-tailed probability for the standard normal distribution.
In[1]:=
X
prob = Probability[x^2 > 2, x \[Distributed] NormalDistribution[0, 1]];
In[2]:=
X
{p1, p2, p3} = {Plot[PDF[NormalDistribution[0, 1], x], {x, -3, 3}, Filling -> Axis, PlotStyle -> Thick, FillingStyle -> Hue[.15, .6, .95]], Plot[PDF[NormalDistribution[0, 1], x], {x, Sqrt[2], 3}, AxesOrigin -> {0, 0}, Filling -> Axis, PlotStyle -> Thick, FillingStyle -> Hue[.2, .7, .7]], Plot[PDF[NormalDistribution[0, 1], x], {x, -3, -Sqrt[2]}, AxesOrigin -> {0, 0}, Filling -> Axis, PlotStyle -> Thick, FillingStyle -> Hue[.2, .7, .7]]};
In[3]:=
X
Labeled[Show[p1, p2, p3, Ticks -> False, ImageSize -> 400], Style[Row[{TraditionalForm[Pr[\!\(TraditionalForm\` \*SuperscriptBox[\(x\), \(2\)] > 2\)]], TraditionalForm[prob], N[prob]}, "="], FontFamily -> "Verdana"]]
Out[3]=