I know it sounds abysmally ignorant, but here we go.
I understand the basic logic behind the t-test: you want to know whether the difference in the mean of two samples is due to chance or not. To this end, you need to take variability into account. But variability at which level?
Suppose I want to run a dependent t-test on an experiment I've made. I have 20 athletes who each run 10 races without EPO, then 10 races with EPO in their blood. My question is whether EPO makes any difference in their performance.
I have two levels of variability in my data: intra-subject variability (the difference in performance between two races run by the same athlete) and inter-subject variability (the variability in the athlete's average performances).
What shall I do? Compute the average performance of each athlete for each condition, and then compute the t-test from this, or work directly from the raw data?