This calculator runs a two-sample \(t\) test of independent means for given sample data sets and specified null and alternative hypotheses. Enter the data in the text area to the left. The data must be formatted with one score for each row. Each row must start with a unique label that identifies the group for the given score. The first such label will be interpreted as corresponding to group "1" and the second such label with be interpreted as corresponding to group "2". Alternatively, enter the sample size, mean, and standard deviation for each sample in the fields below.

Enter a value for the null hypothesis. This value should indicate the absence of an effect in your data. Indicate whether your alternative hypothesis involves one-tail or two-tails. If it is a one-tailed test, then you need to indicate whether it is a positive (right tail) test or a negative (left tail) test.

Enter an \(\alpha\) value for the hypothesis test. This is the Type I error rate for your hypothesis test. It also determines the confidence level \(100 \times (1-\alpha)\) for a confidence interval.

Press the Run Test button and a table summarizing the computations and conclusions will appear below.

The test automatically switches between the standard test when the sample sizes are equal and Welch's test when the sample sizes are unequal.

Enter data:
Sample size for group 1 \(n_1=\)
Sample mean for group 1 \({\overline X}_1 =\)
Sample standard deviation for group 1 \(s_1 =\)
Sample size for group 2 \(n_2=\)
Sample mean for group 2 \({\overline X}_2 =\)
Sample standard deviation for group 2 \(s_2 =\)
Specify hypotheses:
\(H_0: \mu_1 - \mu_2=\)
\(H_a:\)
\(\alpha=\)
Test summary
Type of test Standard test
Null hypothesis \(H_0:\mu_1 - \mu_2=\)
Alternative hypothesis \(H_a: \mu_1 - \mu_2 \)
Type I error rate \(\alpha=\)
Label for group 1
Sample size 1 \(n_1=\)
Sample mean 1 \(\overline{X}_1=\)
Sample standard deviation 1 \(s_1=\)
Label for group 2
Sample size 2 \(n_2=\)
Sample mean 2 \(\overline{X}_2=\)
Sample standard deviation 2 \(s_2=\)
Pooled standard deviation \(s=\)
Sample standard error \(s_{{\overline X}_1 - {\overline X}_2}=\)
Test statistic \(t=\)
Degrees of freedom \(df=\)
\(p\) value \(p=\)
Decision
Confidence interval critical value \(t_{cv}=\)
Confidence interval CI95=