Definition
The t-test compares means: the one-sample version compares a mean with a fixed value, the two-sample version the means of two independent groups (control vs. treatment), and the paired version two measurements on the same units (before and after). The result is a p-value telling whether the difference of means exceeds what chance would explain.
Statistical tests
The test assumes roughly normal values within each group (not critical with larger samples thanks to the central limit theorem) and, for the two-sample version, equal variances — if they differ, use the Welch variant with corrected degrees of freedom. For ordinal or strongly skewed data reach for the nonparametric counterpart (Mann–Whitney, Wilcoxon).
A paired design is more powerful than independent groups because it removes between-unit variability: every patient serves as their own control. Besides the p-value, always report the difference of means with a confidence interval and an effect size (Cohen's d).
In Statistica
All three variants live in Statistics → Basic Statistics/Tables (t-test independent by groups or by variables, t-test dependent samples, single sample). Statistica automatically adds a test of variance equality (F-test, Levene) and the separate-variance result; box plots of the groups are one click away in the results dialog.
Related terms
- ANOVA (analysis of variance)ANOVA (analysis of variance) tests whether the means of three or more groups differ.
- Nonparametric testsNonparametric tests do not assume a normal distribution — they work with the ranks of values rather than the values themselves.
- p-valueThe p-value is the probability of obtaining a result at least as extreme as the one observed if the null hypothesis…
- Normality testA normality test checks whether data come from a normal distribution — an assumption of the t-test, ANOVA, regression and capability indices.
- Effect sizeEffect size expresses how large a difference is or how strong an association is — independently of sample size.
Knowledgebase guides
FAQ
- Should I use a t-test or ANOVA?
- A t-test for two groups, ANOVA for three or more. Repeated t-tests across many groups inflate the risk of a falsely significant result.
- What if the group variances differ?
- Use the separate-variance (Welch) t-test, which Statistica reports automatically next to the classic version.
- How large a sample does a t-test need?
- About 60–70 per group for a medium effect at 80 % power. The Power Analysis module computes it exactly.
Try it on your own data
Statistica free for 30 days
Full version, no credit card. Or get a pricing estimate in a minute.
Statistical tests
Updated: September 2026.