Statistics & probability

Welch two-sample t test

Compare independent sample means without assuming equal variances.

Welch two-sample t test
Esc to restore

Your inputs

Up to 50,000 values. No thousands separators. Absolute values up to 1 trillion; non-zero values must be at least 1e-100 in magnitude.

Up to 50,000 values. No thousands separators. Absolute values up to 1 trillion; non-zero values must be at least 1e-100 in magnitude.

Results update as you type. Larger files run when you press Update result.

Your result

LOCAL & PRIVATE

Your result will appear here.

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Uses (mean₁−mean₂)/sqrt(s₁²/n₁+s₂²/n₂) and Welch–Satterthwaite degrees of freedom. Each independent sample needs at least two values and the combined standard error must be positive. Assumes suitable sampling and normal/large-sample behaviour. The directional alternative refers to first minus second; p-values do not establish causation.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

First sample
10, 12, 9, 11, 13
Second sample
8, 9, 11, 7, 10
Alternative hypothesis
Different (two-sided)

Example result

First sample mean
11
Second sample mean
9
Mean difference (first − second)
2
t statistic
2
Degrees of freedom
8
p-value
0.0805162379573

A p-value is conditional on the stated null model and sampling assumptions; it is not the probability that the null hypothesis is true.