Course contentsShow
← Data Science
Lesson 365 of 2,14510. Hypothesis Tests for MeansFree lesson

Conducting Two-Sample t-Tests by Hand

Work through the manual calculation of test statistics, p-values, and confidence intervals.

Conducting Two-Sample t-Tests by Hand

What you'll learn: How to manually calculate test statistics, p-values, and confidence intervals for comparing two independent sample means.

When you conduct a two-sample t-test by hand, you're walking through each computational step that statistical software does behind the scenes. This deepens your understanding of what the test actually measures and helps you catch errors or interpret unusual results.

The Manual Calculation Process

Step 1: Calculate the test statistic

Using either the pooled or Welch's approach (depending on whether variances are equal), compute:

  • Sample means (x̄₁ and x̄₂)
  • Sample standard deviations (s₁ and s₂)
  • Standard error of the difference
  • The t-statistic: t = (x̄₁ - x̄₂) / SE

Step 2: Determine degrees of freedom

For pooled: df = n₁ + n₂ - 2

For Welch's: Use the complex formula you learned previously

Step 3: Find the p-value

Look up your calculated t-statistic in a t-distribution table with the appropriate df. For a two-tailed test, double the tail probability. For one-tailed, use the single tail.

Step 4: Construct the confidence interval

CI = (x̄₁ - x̄₂) ± t* × SE

Where t* is the critical value from the t-table for your confidence level.

Think of It Like This

Imagine you're a detective examining evidence piece by piece rather than accepting a computer's verdict. Each calculation reveals something: the test statistic shows how many "standard errors apart" your groups are, the p-value quantifies surprise, and the confidence interval shows plausible differences.

Key Takeaway: Working through two-sample t-tests by hand—calculating test statistics, looking up p-values in t-tables, and constructing confidence intervals manually—builds deep intuition about what these tests actually measure and how sensitive they are to your data's characteristics.