The t-test: finally comparing golden retrievers vs pugs with proper statistical evidence.
When to use a t-test
📈Continuous variableHeight, weight, temperature
✚vs.
🐱🐕Categorical variableExactly 2 groups (pug vs golden retriever)
Is the average height different between the two breeds? That’s a t-test question.
One-tailed vs two-tailed
One-tailedDirectional questionAre golden retrievers taller than pugs? You only care about one direction.
Two-tailedAny differenceAre golden retrievers and pugs different in height? Either direction counts.
Two-tailed t-tests are more common in research — they’re more conservative.
Key assumptions
⚫Samples are independent (one dog’s height doesn’t affect another’s)
📈Data within each group is roughly normally distributed
⚖Similar variance in both groups (heights vary similarly in each breed)
The example: n=30 per breed
🐕Golden Retriever
Mean: 24″ SD: ±2″
🐱Pug
Mean: 11.5″ SD: ±1.5″
The t-test calculates a t-statistic from these means and SDs, then maps it to a p-value.
The result 🎉
t = 5.2 | p < 0.001
With df=59 and p < 0.001, we reject H₀. There is a statistically significant difference in height between golden retrievers and pugs. Less than 0.1% chance this is due to random chance.
What’s next?
What about 3+ groups?
T-tests compare exactly 2 groups. Want to compare golden retrievers, pugs, AND St. Bernards?