T-testA T-test is performed to compare the averages of two groups of
data. How do you know that the difference between the averages you observed is
"real"? It could be that you just happened to see a difference because your
sample size is small and by chance you ended up with larger numbers in one group
and smaller numbers in the other. The T-test allows us to say with 95% certainty
whether they are truly different. Using Microsoft Excel, the following function
returns the probability associated with a Student's t-test:
The number that you
get from the function is called the P-value, which ranges from 0 to 1 (if you
get a number outside these limits, then you have not set up the function
properly.) P represents the probablility that the two means are the same. If P
is high, then there is probably no difference between the two groups; if P is
low, then there may be a difference. By convention, we us 5% as a cut-off, so if
P is less than 0.05, we say that the difference between the means is
statistically significant because the chance that the averages are the
same is less than 5%. We can live with that level of uncertainty.
- Array1 is the range of data for the first group
- Array2 is the range of data for the second group
- Tails refers to a one-tailed test or a two-tailed test. If we have
background information that would allow us to predict that one group should
have a higher value, we use 1. If we really don't know which one should end up
being higher, we use 2.
- Type can be one of three things
- paired T-test: Used when the same animals are used in groups 1 and 2,
and the measurement is repeated. Example: you measure respiration rate in
fish at rest, then the same fish during exercise.
- unpaired, equal variance: different animals are in each group, and the
variation within each group is about the same. To examine the variance of
each group, use =VAR(array1) and =VAR(array2) and eyeball the results.
Technically, an F-test should be performed, but let's not go there right
- unpaired, unequal variance: different animals are in each group, and the
variation within each group is different.
ExampleSuppose we do an experiment wherein we measure respiration rate
in 17 fish at rest, then the same fish during exercise. We get the following
Our experiment and data are set up as follows:
Our formula is completed as follows:
- Array1 is the range of data for the rest group (A3:A19)
- Array2 is the range of data for the exercise group (B3:B19)
- We know that exercise causes increased respiration in many species, so we
choose a one-tailed test (1)
- The same animals are used both groups. A3 is for fish1 at rest, B3 is for
fish1 during exercise, and so on. Therefore we use a paired T-test
The result is 6.82779E-05, or 6.82779 x 10-5, which translates as
0.0000683. This P-value means that we would expect to get these results by
random chance only about 0.007% of the time. The difference between the means is
highly significant. We can say that the two means are significantly
different. This is a term of art--we must never say this unless a
statistical test has actually shown it to be so.
[ 8/23/01 jrc]