▚DATAJIN

t test calculator (unpaired, Welch and paired)

A t test asks whether the means of two groups differ by more than you would expect from random variation. DATAJIN runs all three common versions: Student’s unpaired t test (equal variances), Welch’s unpaired t test (no equal-variance assumption) and the paired t test for before/after or matched measurements.

No sign-up, nothing to install. Calculations run in your browser; the worksheets, results and charts you create are stored by AI Walay to improve DATAJIN.

When to use it

  • Comparing a treated and a control group (unpaired).
  • Comparing the same subjects before and after an intervention (paired).
  • Comparing two groups whose spreads look different (Welch).

Assumptions

  • The outcome is numeric and roughly normally distributed in each group (or the samples are large).
  • Unpaired: the two groups are independent. Student’s version also assumes equal variances; Welch’s does not.
  • Paired: each row holds two measurements from the same subject, and it is the differences that should be roughly normal.

How to run it in DATAJIN

  1. Put group A in one column and group B in another (for a paired test, keep each subject on the same row).
  2. Open Analyze and choose t test (two groups).
  3. Select the two columns, pick Unpaired (Student), Unpaired (Welch) or Paired, and click Run.

Example: open the Anagrams experiment dataset (anagram scores of the same subjects under two conditions (num1 vs num2, paired)) and follow the steps above.

What you get

  • Mean of each group and the mean difference
  • Standard error and 95% confidence interval of the difference
  • t statistic, degrees of freedom and two-tailed p-value
  • Cohen's d effect size

How to interpret the result

If p < 0.05 the difference between means is statistically significant. The 95% CI tells you the plausible size of the difference: if it excludes 0 the result is significant. Cohen's d expresses the difference in standard deviations; about 0.2 is small, 0.5 medium and 0.8 large. Report all three, for example: t(18) = 2.61, p = 0.018, d = 1.17.

Frequently asked questions

Should I use Student’s or Welch’s t test?

Welch’s t test is the safer default: it gives almost the same answer as Student’s when variances are equal and stays accurate when they are not. Use Student’s only if you have a reason to assume equal variances.

When should I use a paired t test?

When each value in one column is linked to a value in the other: the same person measured twice, matched pairs, or left vs right. Using an unpaired test on paired data throws away information and loses power.

What if my data are not normal?

For small, clearly non-normal samples use the Mann–Whitney test (unpaired) or the Wilcoxon matched-pairs test (paired). Both are available in DATAJIN.

Is this a one-tailed or two-tailed test?

DATAJIN reports the two-tailed p-value, which is the standard choice for most research. If you pre-registered a one-tailed hypothesis and the effect is in the predicted direction, halve the p-value.