Empirical
Science
Workshop

Spring 2006
course
navigation

More statistics

This page contains a brief outline of some more sophisticated statistical ideas: Student's t-test, the χ2 -distribution, correlation coefficients and one-way ANOVA. These tests can be performed with the online stat tools from Tom Kirkman at College of St Benedict and St John's U [this is the same site recommended by Jim during the initial stats discussion].

In all cases we will have a null hypothesis, and obtain a number P that is the probability that our data could have been collected in a world where the null hypothesis holds. We usually use a significance level of 0.05 - this means that if P comes out to be less than 0.05 (i.e. there is a less than 1 in 20 chance of the null hypothesis being true, given our data) then we reject the null hypothesis.

Student's t-test

Student's t-test is used when we take a randomly chosen small sample from each of two normal populations that have similar variances. We want to determine whether the means of the two populations are different. Our null hypothesis is
H0: The two populations have the same mean.
You can apply the test online here. Simply input your data and you will get a value for P.
Suppose the two populations are "before treatment" and "after treatment," and we randomly choose the first sample and then use the same sample after the treatment. In this case our second sample is not random. However, we actually have more predictive power here. Use the "Paired Student's t-test" in this scenario.

The χ2 -distribution

The χ2 -test is used to determine whether two variables are independent. For example, we may conduct a survey to determine whether Marlboro students are in favor of a math requirement, and then ask whether the sex of the respondent is independent of the answer (not being independent would mean that women are more likely to want a math requirement than men, or vice versa).
Our null hypothesis is:
H0: The two variables are independent
The statistic χ2 measures how far our data is from what we would expect if the variables are independent. The larger χ2 is, the less likely it is that our variables are independent (so the null hypothesis could be restated as χ2 = 0 .

The χ2 -test can also be used when there is just one variable, and we want to test whether the data fit a particular model. In fact, this is the test that the online stat tools give.
These tools can't be used to find a P value for the more general case above, however they do give an estimate for χ2 , that can then be used in conjunction with statistical tables to find out whether the result is significant. To do this you will also need to know how many "degrees of freedom" your data have. This is given by (R − 1)(C − 1) where R and C are the number of rows and columns respectively in your table of data. In the math requirement vs. sex example, if the possible reponses are "yes, there should be a math requirement," "no, there shouldn't be a math requirement" and "undecided" then our table would look like:

Men Women Yes * * No * * Undecided * *

and have 2 degrees of freedom.

Correlation coefficients

Suppose we have two variables, such as height and weight of Marlboro students. We might conjecture that these are correlated - as height increases, so does weight (a positive correlation - if we expected weight to decrease as height increases that would be a negative correlation). Make a scatter plot of weight against height. If they are indeed correlated, then the points will fall approximately on a straight line. (Note: we are talking about linear correlation here - we are not going to test for more complicated relationships between the variables). We want to know to what extent our variables are correlated; this measure is the correlation coefficient r. If r = 1 then the variables are perfectly positively correlated. If r = − 1 then they are perfectly negatively correlated. If r = 0 then they are not correlated at all.
The number r can be calculated here, where you will also be given the equation of the straight line that best fits your data and a value of P. However, r is much more important than P. If r is small then the fact that our result is statistically significant means that we can be reasonably sure of a very small correlation between the variables. The null hypothesis is
H0: The two variables are not correlated.

ANOVA

ANOVA is short for ANalysis Of VAriance. Broadly speaking, the idea is that by looking at the variances of our samples we can try and determine the likelihood that they were all taken from populations with the same means and variances. We assume the variances of the populations are equal, and ournull hypothesis is:

H0: The populations have equal means.

If they did come from the same population then we expect the following two methods of estimating the variance to give roughly the same result:
1) Within samples: Estimate the variance using each sample individually, and then take a weighted mean of these estimates. Call this estimate sW2 .
2) Among samples: Using just the mean and the size of each sample, we can estimate the variance of the population. Call this estimate sA2 .
Now let F be the ratio of these two estimates, with sA2 in the numerator. The larger F is, the less the chance that the samples were from the same population. This page lets you plug in your data and gives you the values for F and P.
Question: Suppose we have seven samples. Why wouldn't it be a great idea to just use the Student t-test on each pair of samples?
http://cs.marlboro.edu/ courses/ spring2006/empirical_science/ wiki/ more_stats
last modified Thursday August 31 2006 2:26 am EDT