Geoscience Reference
In-Depth Information
Instead of using
normpdf
and
normcdf
, we can use the general function
makedist
to create a probability distribution object for any type of distribution. As
an example we create a probability distribution object for a Gaussian
distribution by typing
clear
mu = 12.3448;
sigma = 1.1660;
pd = makedist('normal',mu,sigma)
which yields
pd =
NormalDistribution
Normal distribution
mu = 12.3448
sigma = 1.166
When we type
whos
we can then see that we have created an object with name
pd
and class
prob.NormalDistribution
. Using this object we can determine the
ʼ±1˃ range using the probabilities
(1-0.6827)/2
and
1-(1-0.6827)/2
with the
inverse cumulative distribution function
icdf
of the probability distribution
object
pd
:
y = icdf(pd,[(1-0.6827)/2,1-(1-0.6827)/2])
which yields
y =
11.1788 13.5108
We can calculate the ʼ±2˃ and ʼ±3˃ ranges in a similar manner. h efunction
normspec
p = normspec(y,mu,sigma,'inside')
which yields
p =
0.6827
plots the PDF and shades the region inside the ʼ±1˃ range (Fig. 3.12).