One-Sample and Two-Sample t-Tests
The workhorse test for 'is this average actually different from zero (or from another average), or could ordinary sampling noise explain it?' — built for the realistic case where you don't know the true noise level and have to estimate it from the same small sample.
Prerequisites: The Student's t Distribution, Degrees of Freedom
A strategy's daily returns average +0.05% over the last year. Is that a real edge, or exactly the kind of average you'd get from pure noise centered at zero? If you knew the true underlying volatility of the noise with certainty, this would be a simple calculation. In practice you never know it — you only have the same handful of data points to estimate both the average and how noisy that average's estimate is. The t-test is what you get when you honestly account for that extra layer of uncertainty, and it is the single most common hypothesis test in applied statistics.
An analogy: judging a shaky hand with a shaky ruler
Imagine measuring how far off-center a dart lands, but your ruler itself is slightly unreliable and you don't know exactly how unreliable — you have to estimate the ruler's own wobble from the same handful of measurements you're using to judge the dart. That double layer of uncertainty — not knowing the true average and not knowing the true noise level, estimating both from the same small sample — makes your confidence in "the dart missed center" weaker than if you had a perfectly calibrated ruler. The t-distribution is exactly this: a version of the normal (bell curve) with fatter tails, built to honestly reflect that extra layer of not-knowing when you must estimate your own noise level.
The one-sample formula, one symbol at a time
Testing whether a sample's true mean equals some hypothesized value (often zero), with sample mean , sample standard deviation , and sample size :
In plain English: take the gap between what you observed and what you're testing against, and divide by the estimated standard error of your mean — how much your sample mean would naturally bounce around from sample to sample, estimated from the same data. Compare against the t-distribution with Degrees of Freedom; a far from zero, beyond the relevant critical value, means the observed mean is unlikely under the null.
The two-sample formula, one symbol at a time
Comparing two independent groups' means, and , with sample sizes and a pooled standard deviation combining both groups' spread:
In plain English: the gap between the two group averages, divided by the estimated standard error of that gap. The logic is identical to the one-sample case; only the quantity being tested (a difference of two means, instead of one mean against a fixed value) and the degrees of freedom (roughly ) change.
The t-distribution looks like the bell curve pictured above but with visibly heavier tails, especially at small degrees of freedom — a concrete penalty for having estimated the noise level from the same limited sample instead of knowing it in advance.
Worked example 1: one-sample t-test on a strategy's daily returns
Twenty-five days of returns average with sample standard deviation . Test against :
With degrees of freedom, the two-sided critical value at is about . Since , this result is not statistically significant — 25 days of data is not enough to distinguish this average from pure noise around zero.
Worked example 2: two-sample t-test comparing strategies
Strategy A: , mean . Strategy B: , mean . Pooled standard deviation .
With roughly degrees of freedom, the critical value at is close to . Since , the difference between the two strategies' average returns is not statistically significant at this sample size, even though Strategy A's raw average is more than three times Strategy B's.
The t-test measures a gap between observed and hypothesized means in units of estimated standard error, using the t-distribution instead of the normal distribution specifically because the noise level itself had to be estimated from the same sample. Small samples and noisy data both widen the standard error, making it harder for any given gap to clear the significance bar.
What this means in practice
The t-test is the default first check for "did this strategy actually make money on average, or is the headline number indistinguishable from noise?" and the two-sample version is the default check for "is Strategy A actually better than Strategy B?" Both examples above show a common and important pattern in quant research: a strategy or comparison can look impressive in raw numbers (a 0.08% daily average, more than triple the comparison's average) and still fail to clear statistical significance, because daily return noise is large relative to typical edges.
The t-test assumes the underlying data (or, by the The Central Limit Theorem, the sample mean) is approximately normally distributed and that observations are independent — both routinely violated by financial returns, which exhibit fat tails and autocorrelation (especially at high frequency). A "significant" t-statistic computed on serially correlated returns without correcting the standard error is often wildly overconfident, understating the true uncertainty and overstating significance; this is precisely the failure mode robust standard errors exist to fix.
Related concepts
Practice in interviews
Further reading
- Gosset ("Student") (1908), The Probable Error of a Mean
- Wasserman, All of Statistics, ch. 10