Graphics Programs Reference
In-Depth Information
tions
normpdf(x,mu,sigma)
and
normcdf(x,mu,sigma)
to compute
the PDF and CDF of a gaussian distribution with mean
Mu=12.3448
and
Sigma=1.1660
, evaluated at the values in
x
in order to compare the result
with our sample data set.
x = 9:0.1:15;
pdf = normpdf(x,12.3448,1.1660);
cdf = normcdf(x,12.3448,1.1660);
plot(x,pdf,x,cdf)
MATLAB also provides a GUI-based function for generating PDFs and
CDFs with specifi c statistics, which is called
disttool
.
disttool
We choose
pdf
as function type and
Mu=12.3448
and
Sigma=1.1660
.
The function
disttool
uses the non-GUI functions for calculating prob-
ability density functions and cumulative distribution functions, such as
normpdf
and
normcdf
.
3.6 The t-Test
The Student·s t-test by William Gossett (1876-1937) compares the means
of two distributions. Let us assume that two independent sets of
n
a
and
n
b
measurements that have been carried out on the same object. For instance,
they could be the samples taken from two different outcrops. The t-test can
now be used to test the hypothesis that both samples come from the same
population, e.g., the same lithologic unit (
null hypothesis
) or from two dif-
ferent populations (
alternative hypothesis
). Both, the sample and population
distribution have to be gaussian. The variances of the two sets of measure-
ments should be similar. Then the appropriate test statistic is
where
n
a
and
n
b
are the sample sizes,
s
a
2
and
s
b
2
are the variances of the two
samples
a
and
b
. The alternative hypothesis can be rejected if the measured
t
-value is lower than the critical
t
-value, which depends on the degrees of
freedom
. If this is the case, we can-
not reject the null hypothesis without another cause. The signifi cance level
Φ
=
n
a
+
n
b
-2 and the signifi cance level
α