Probability Computations

Use the PDF to compute probability,whereaandbare the lower and upper bounds of the interval of interest.

In[10]:=

a = 12 ;

b = 24 ;

PDFProb = ∫_a^b f[x, μ, σ] x ;

Print["P(", a, " ≤ X ≤ ", b, ") = ", N[PDFProb]]

P(12 ≤ X ≤ 24) = 0.289073

Use the CDF to compute probability.

In[14]:=

a = 12 ;

b = 24 ;

Off[General :: spell1]

CDFProb = F[b, μ, σ] - F[a, μ, σ] ;

On[General :: spell1]

Print["P(", a, " ≤ X ≤ ", b, ") = ", N[CDFProb]]

P(12 ≤ X ≤ 24) = 0.289073


Created by Mathematica  (July 20, 2006) Valid XHTML 1.1!