Calculating the T-test for Comparing Two Means
Calculating the G-statistic | Critical values for G- and t-tests, and Chi-square
The t-test is often used to calculate the significance of observed differences
between the means of two samples. The t-test is generally used with scalar
variables, such as length and width, and so on. The null hypothesis is that
there are no significant difference between the means.
As in the G-test, we first calculate a test statistic, t, and then
compare that value to the critical t-value in a table for a given degrees
of freedom. To calculate your t-value, you need to first calculate the mean
(x bar) and the sample variance (s2) of EACH of your samples. Most hand-held
calculators will perform these calculations for you. However, if you do not
know how to use your calculator, you can do it by hand with the following
method:
1) First, calculate the variance in each of your samples:

2) Second, calculate the t-value
3) Third, calculate the degrees of freedom
Calculate the degrees of freedom by adding the samples of both means (n) which
leads to the overall sample size (N).
N
= n1 +n2 and df = N 1
4) Compare your t-value with the critical t-value
For a given df, if your t-value is larger than than the value in the table,
the null hypothesis of no difference between the means should be rejected.
Again, biologists use a p-value of 0.05 or less as an indicator of significance.
5) Report the results of your t-test
"We found no significant difference between the weights of the dominant
and subordinate males (t = 0.73, p > 0.05, d.f. = 15)."
OR if you did find an effect:
"Dominant males weighed significantly more than subordinates (t = 6.73, p < 0.05, d.f. = 15)."
© Cody Arenz, Garry Duncan, & Nebraska Wesleyan University