Compute a Two-Tailed Probability
Compute a Two-Tailed Probability
Compute a two-tailed probability for the standard normal distribution.
prob = Probability[x ^ 2 > 2, xNormalDistribution[0, 1]];{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]]};Labeled[Show[p1, p2, p3, Ticks -> False, ImageSize -> 400], Style[Row[{TraditionalForm[Pr[x^2 > 2]], TraditionalForm[prob], N[prob]}, "="], FontFamily -> "Verdana"]]