Hypothesis Testing

T-Test Calculator

Perform one-sample and two-sample t-tests online. Calculate t-statistics, p-values, and determine statistical significance instantly.

What is a T-Test?

A t-test is a statistical test used to compare means. It helps determine whether there’s a significant difference between group means or between a sample mean and a known value.

Types of T-Tests

One-Sample T-Test

Compares a sample mean to a known or hypothesized population mean.

Use when: Testing if your sample differs significantly from a standard or expected value.

Two-Sample T-Test (Independent)

Compares the means of two independent groups.

Use when: Comparing two separate groups (e.g., treatment vs. control).

Paired T-Test

Compares means from the same group at different times or under different conditions.

Use when: Comparing before/after measurements on the same subjects.

T-Test Formulas

One-Sample T-Test

t = (x̄ - μ₀) / (s / √n)

Two-Sample T-Test (Welch’s)

t = (x̄₁ - x̄₂) / √(s₁²/n₁ + s₂²/n₂)

Understanding the Results

  • T-statistic: Measures the size of the difference relative to variation
  • Degrees of freedom: Related to sample size(s)
  • P-value: Probability of observing results if null hypothesis is true
  • Significance: If p-value < α (e.g., 0.05), the result is statistically significant

Assumptions of T-Tests

  1. Data is approximately normally distributed
  2. Random sampling from the population
  3. Independence of observations
  4. For two-sample: Similar variances (unless using Welch’s t-test)
Advertisement

Want to learn the theory?

Our lessons explain the statistical concepts behind this calculator with clear examples.

Browse Lessons →