Two-Sample T-Test

Compare two independent means (2-SampTTest and 2-SampTInt).

Inputs

Enter

Sample 1

Sample 2

Alternative hypothesis Ha
Significance level α
Confidence level

Results update as you type.

Results

Fail to reject H₀: t = 1.7838, p-value = 0.0798

The p-value (0.0798) is greater than α = 0.05, so the data do not give enough evidence to conclude that the mean of population 1 is different from the mean of population 2.

t-distribution with 57.2419 degrees of freedom curve. The shaded p-value region is both tails beyond t = 1.78, with area 0.0798. Dashed lines mark the critical values −2.002 and 2.002.−4−2024t = 1.78critical −2.002critical 2.002

Results

x̄1 − x̄24.1
Test statistic t1.7838
df57.2419
p-value0.0798
Standard error2.2985
95% CI for μ1 − μ2(−0.5022, 8.7022)
Decision at α = 0.05Fail to reject H₀

On the TI-84

STAT → TESTS → 4:2-SampTTest. Data or Stats, alternative, Pooled: No.

2-SampTTest 78.2, 8.4, 35, 74.1, 9.9, 30, ≠, 0

Interval: STAT → TESTS → 0:2-SampTInt.

2-SampTInt … C-Level 0.95

Show steps
  1. Hypotheses. H₀: μ1 = μ2   Ha: μ1 ≠ μ2
  2. Standard error. SE = √(s1²/n1 + s2²/n2) = √(8.4²/35 + 9.9²/30) = 2.2985
  3. Test statistic. t = (x̄1 − x̄2) ÷ SE = 4.1 ÷ 2.2985 = 1.7838, df = 57.2419 (the TI-84's formula; some textbooks use the smaller of n1 − 1 and n2 − 1).
  4. p-value. Two-tailed test, so double the tail area beyond the test statistic: p-value = 0.0798. Since 0.0798 > 0.05, fail to reject H₀.
  5. Critical-value method. At α = 0.05, the rejection region is t ≤ −2.002 or t ≥ 2.002. The test statistic t = 1.7838 is not in the rejection region, so we fail to reject H₀. (Same decision as the p-value method.)
  6. Confidence interval. (x̄1 − x̄2) ± t* · SE = 4.1 ± 2.0023 · 2.2985 → (−0.5022, 8.7022).
  7. Conclusion. The p-value (0.0798) is greater than α = 0.05, so the data do not give enough evidence to conclude that the mean of population 1 is different from the mean of population 2.

About this calculator

When to use this

Use a two-sample t-test to compare the means of two independent groups, such as online vs. in-person sections or a treatment group vs. a control group. If the same people are measured twice (before and after), the samples are paired; use the Paired T-Test instead.

Degrees of freedom

By default this calculator does not pool the variances and uses the same degrees-of-freedom formula as the TI-84 (Welch's formula), which usually isn't a whole number. Some textbooks use the smaller of n1 − 1 and n2 − 1 instead, which gives a slightly larger p-value.

The confidence interval for μ1 − μ2 tells the same story: if it doesn't contain 0, the two-sided test rejects H0.