Geoscience Reference
In-Depth Information
true normal distribution. If we increase the sample size the histogram looks
much more like a true Gaussian distribution.
Instead of simulating discrete distributions we can use the probability
density function (PDF) or the cumulative distribution function (CDF) to
compute a theoretical distribution. MATLAB also provides a GUI-based
function for generating PDFs and CDFs with a specii c statistic, which is
called disttool .
Movie
3.2
disttool
We c h o o s e Normal as the distribution and PDF as the function type, and then
dei ne the mean as mu=12.3448 and the standard deviation as sigma=1.1660 .
Although the function disttool is GUI-based, it uses non-GUI functions
such as normpdf and normcdf to calculate the probability density function
and the cumulative distribution function. h e MATLAB Help gives an
overview of the available theoretical distributions. As an example we can use
the functions normpdf(x,mu,sigma) and normcdf(x,mu,sigma) to compute the
PDF and CDF of a Gaussian distribution with mu=12.3448 and sigma=1.1660 ,
evaluated for the values in x , to compare the results with those from our
sample data set.
clear
mu = 12.3448;
sigma = 1.1660;
x = 5 : 0.001 : 20;
pdf = normpdf(x,mu,sigma);
cdf = normcdf(x,mu,sigma);
plot(x,pdf,x,cdf)
We can use these functions to familiarize ourselves with the properties
of distributions. h is will be important when we deal with the testing of
hypotheses in the following sections. h e test statistics used there follow the
theoretical frequency distributions introduced in the previous sections of
this chapter. In particular, the integral (or in the discrete case, the sum) of the
theoretical distribution within a certain range a x b is of great importance,
as it helps in calculating the probability that a measurement will fall within
this range.
As an example we can calculate the probability that a measurement
will fall within the range of ʼ-˃≤ x ≤ʼ+˃, where ʼ is the mean and ˃ is the
standard deviation of a Gaussian distribution. Using the PDF of the Gaussian
distribution with mu=12.3448 and sigma=1.1660 , we i nd
pdf = pdf/sum(pdf);
Search WWH ::




Custom Search