t Test or z Test? A Plain-English Guide to Hypothesis Testing
Which hypothesis test to use for one group, two groups, paired data or proportions, how to read p-values and confidence intervals, and common mistakes.

t Test or z Test? A Plain-English Guide to Hypothesis Testing
You changed something, a teaching method, a web page, a manufacturing setting, and the numbers moved. Is the change real, or just random variation? Hypothesis tests answer that question in a disciplined way. The free Hypothesis Test Calculator runs the common z and t tests from summary statistics or raw data and explains the result in plain English.
The logic in one paragraph
A test starts by assuming nothing changed: the null hypothesis. It then asks how surprising your data would be if that were true. That probability is the p-value. A small p-value, conventionally below 0.05, means data like yours would be rare without a real effect, so you reject the null hypothesis. A large p-value means the data is consistent with no effect. It does not prove there is no effect; you may simply not have enough data.
Choosing the right test
- One group compared with a target, such as whether the average fill weight equals 500 g: the one-sample t test. The z test is only for the rare case where you know the population's true standard deviation.
- Two independent groups, such as two classes or two versions of a website: Welch's two-sample t test. It does not assume the groups have the same spread, which makes it the safe default. The classic pooled t test assumes equal variances.
- The same people measured twice, such as blood pressure before and after a programme: the paired t test, which analyses the differences within each person and is much more sensitive than treating the measurements as two separate groups.
- Proportions, such as the share of visitors who buy: the one- or two-proportion z test.
One-sided or two-sided?
A two-sided test asks whether there is any difference; a one-sided test asks only about one direction. Choose one-sided only if you decided before seeing the data that a difference in the other direction would be meaningless. Switching after seeing the results halves the p-value dishonestly.
Read the confidence interval
The confidence interval shows the range of plausible values for the true difference. If a 95% interval for a difference excludes zero, the two-sided test is significant at 5%. More importantly, the interval shows the size of the effect: a difference that is significant but tiny may not matter in practice.
Effect size
Cohen's d expresses a difference in standard deviations: around 0.2 is small, 0.5 medium and 0.8 large. It lets you compare effects across studies and judge practical importance.
Common mistakes
- Treating p = 0.06 as "no effect" and p = 0.04 as "proof". The threshold is a convention; look at the interval.
- Testing many things and reporting only what came out significant. With twenty tests, one will usually be significant by chance.
- Ignoring assumptions. t tests want roughly normal data or reasonably large samples, and independent observations. Proportion tests need enough successes and failures in each group.
- Stopping early when a result looks good.
A worked example
Eight people scored 72, 75, 68, 80, 77, 71, 69 and 74 before a training session and 70, 72, 69, 76, 73, 70, 66 and 71 after it. A paired t test gives a mean difference of 2.4 points, t = 3.99 with 7 degrees of freedom and p = 0.005, so the change is unlikely to be chance.
Step by step
- Choose the test that matches your data.
- Enter summary statistics or paste raw values.
- Set the hypothesised value, the alternative and the significance level.
- Read the p-value, confidence interval and effect size.
- Interpret the result with the plain-English explanation.
Privacy
Calculations run in your browser; your data is not uploaded.


