Geoscience Reference
In-Depth Information
the 5% signii cance level. h is is a two-sample
t
-test, i.e., the means are not
equal. Computing the two-tailed critical
tcrit
value by entering 1-0.05/2
yields the upper (positive)
tcrit
value, which we compare with the absolute
value of the dif erence between the means.
tcrit = tinv(1-0.05/2,na+nb-2)
tcrit =
1.9803
Since the
tcalc
value calculated from the data is smaller than the critical
tcrit
value, we cannot reject the null hypothesis without another cause. We
conclude therefore that the two means are identical at a 5% signii cance
level. Alternatively, we can apply the function
ttest2(x,y,alpha)
to the two
independent samples
corg1
and
corg2
at an
alpha=0.05
or a 5% signii cance
level. h e command
[h,p,ci,stats] = ttest2(corg1,corg2,0.05)
yields
h =
0
p =
0.4681
ci =
-0.3028
0.6547
stats =
tstat: 0.7279
df: 118
sd: 1.3241
h eresult
h=0
means that we cannot reject the null hypothesis without another
cause at a 5% signii cance level. h e
p
-value of 0.4681 or ~47% (which is
much greater than the signii cance level of 0.05 or 5%) suggests that the
chances of observing more extreme
t
-values than the values in this example
from similar experiments would be 4,681 in 10,000. h e 95% coni dence
interval on the mean is [-0.3028,0.6547], which includes the theoretical
(and hypothesized) dif erence between the means of 25.5-25.3=0.2.
h e second synthetic example shows the performance of the two-sample
t
-test in an example with very dif erent means of 24.3 and 25.5, while the
standard deviations are again 1.3 and 1.5, respectively.
clear