Increase the sample size

An invented blood-pressure study has 25 people, a mean reduction of 3 mmHg and a sample SD of 6 mmHg. Test a population mean reduction of zero.

Keep the mean and SD fixed. Compare 25 with 100 people. The uncertainty bars shrink while the estimated reduction stays at 3 mmHg.

Follow the maths
Estimated mean...
95% confidence interval...
Signed Cohen's d...
Selected p-value...

t = …; estimated SE = …

1 · Compare the sample estimate with the null value

The circle is the sample estimate. The diamond is the null value. The blue horizontal bar extends one standard error on either side of the estimate. The thinner teal bar is the two-sided 95% confidence interval. The axis uses original measurement units. A two-sided 95% interval corresponds to a two-sided 5% test; directional tests use different rejection regions.

2 · Read the p-value under the null hypothesis

Imagine repeating the study when the null hypothesis is true. This curve shows the distribution of the resulting t scores, not the distribution of individual measurements. The vertical line marks your t score. The shaded area is the p-value for your chosen alternative.

Worked comparison

Follow the calculation

t=x¯−μ0sn
What the symbols mean

x̄ is the sample mean and μ₀ is the null population mean. s is the sample standard deviation and n is the sample size. The denominator estimates the standard error, or SE.

Assumptions and full calculation

The sliders set sample statistics. Exact t-test p-values assume independent observations from a normal population. The test uses n − 1 degrees of freedom. With small samples, skewness and outliers can make its p-values unreliable. Plot 1 shows the sample mean and its estimated standard error. Plot 2 shows the distribution of t when the null is true. Choose the alternative before looking at the data.

Degrees of freedom and other tail probabilities
Degrees of freedom...
Lower-tail p...
Upper-tail p...
Two-sided p...

The selected p-value above uses your chosen alternative hypothesis. The other p-values use the alternatives shown here. Divide the observed difference by the sample standard deviation to get the effect size. Its sign follows the order of subtraction.