When to use t-test
A t-test is a way of determining whether two averages are the same (statistically speaking) or different. In order to do this, of course, you need to have data that can be averaged. Things like length, height, weight, speed, temperature ... you get the idea. This kind of data is called "quantitive", because you can measure the quantity. Data like color, shape, or emotion is called "qualitative" because you can only state the quality, not the quantity. Qualitative data cannot be evaluated with a t-test; instead, you need to use a qualitative test like a chi-square.
But let's get back to the t-test, with an example: a punkrockologist is trying to figure out whether different bands tend to write songs that are the same length or not.
First she has a random sample of the lengths of Green Day songs (in seconds) from the American Idiot CD:
548, 260, 285, 332, 246, 558
She also measured the lengths of 6 Nirvana songs, from the Bleach CD:
137, 162, 245, 250, 203, 222
It seems pretty clear by eyeballing the data that Green Day has, on average, longer songs. But when you're doing science or even government studies, you can't say “we eyeballed the data and it seems like …” Finally she measured 6 Linkin Park songs from the Meteora CD:
188, 175, 204, 198, 175, 145
These songs seem a little shorter than Nirvana's, but its pretty close. Maybe she just happened to pick the shorter songs for her sample?
Copyright University of Maryland, 2007
You may link to this site for educational purposes.
Please do not copy without permission
requests/questions/feedback email: mathbench@umd.edu