# After the fact hypothesis testing

I'm not really a statistician, but rather in need of statistical guidance, so I hope this is not too much of an off-topic question.

I'm writing a master's thesis (computational linguistics/NLP), and I've got several result sets I'm comparing. Now, I didn't really formulate a null and an alternative hypothesis before I ran the experiments, which I understand means that ideally I shouldn't really go about using the T-test on my datasets. But some of the different results are so close that I've given in to the temptation and T-tested them. How unclean is this? Is it bad enough that I should leave it out of my thesis entirely, or is it less severe?

In case it matters, the data are the error rates of different language models, by 10-fold cross-validation.

• Some people will hang you out to dry for this. But in reality, you still need a metric that tells your story. – Brandon Bertelsen Apr 15 '11 at 17:43
• No, you need a metric that reveals the truth, which isn't necessrily the same thing. – Dikran Marsupial Jun 29 '11 at 17:59

It's not necessarily a problem that you didn't formulate hypotheses before running the study, but you may be doing a post-hoc analysis, which would be relevant. Also consider whether what your tests mean.

The population

I feel the need to point out that the population is sort of bizarre in this situation. If I understand your study correctly, you have 10 error rates for each model. If you were just interested in the performance for this particular partitioning scheme, you would not need to use statistical tests; these 10 error rates would be the population.

The entire corpus would interest you more. There are (N choose N/10) ways you could partition the data into 90% training set and 10% test set, and you could run the models on a random sample of these partitioning schemes. It seems that this approach is called repeated random sub-sampling validation.

Differences between models

If I understand your dataset, the tests that I am about to describe may not really be valid because the 10 error rates are sort of dependent on each other; they are all taken from the same partitioning scheme.

But here we go anyway! I assume that you are trying to see whether any of the models perform significantly differently from than the others. This is a valid hypothesis, but you'll need to use something like ANOVA because you have more than two models.

On the other hand, if you are just trying to tell the difference between two models because they are the two best models, you have to account for how you decided to compare these two after the fact. Look at post-hoc tests and p-value adjustments.

I did a Google search and bumped into the following title:

"A study of cross-validation and bootstrap for accuracy estimation and model selection"

I would post the link but it's one of those citeseerx.ist.psu.edu links that comes across with an IP number for the URL. If you do the search, you should be able to find it. In that article, they give a calculation for a confidence interval.

Here's a similar article:

http://www.public.asu.edu/~ltang9/papers/ency-cross-validation.pdf

If those don't help, here are some links on "Multiple Comparison Tests":

http://www.itl.nist.gov/div898/handbook/prc/section4/prc47.htm

http://www.uvm.edu/~dhowell/StatPages/More_Stuff/RepMeasMultComp/RepMeasMultComp.html

http://www.utdallas.edu/~herve/Abdi-Bonferroni2007-pretty.pdf

http://www.csub.edu/~psmith3/Teaching/310-8.pdf