T-Test Calculator
Perform one-sample, two-sample (independent), and paired t-tests. Calculate t-statistics, p-values, and determine statistical significance.
T-Test Calculator
Test if the sample mean differs from a hypothesized population mean.
How to Use the T-Test Calculator
Enter your data values separated by spaces, commas, or newlines. Choose the appropriate test type based on your research design and set the significance level (alpha).
Types of T-Tests
One-Sample T-Test
Tests whether a sample mean differs from a hypothesized population mean:
- H₀: μ = μ₀ (sample mean equals hypothesized mean)
- H₁: μ ≠ μ₀ (two-tailed) or μ < μ₀ / μ > μ₀ (one-tailed)
- Example: Testing if average test scores differ from 75
Two-Sample (Independent) T-Test
Compares means of two independent groups:
- Student's t-test: Assumes equal variances
- Welch's t-test: Does not assume equal variances (recommended)
- Example: Comparing treatment vs. control group
Paired T-Test
Compares two related measurements on the same subjects:
- Before/After studies: Same subjects measured twice
- Matched pairs: Subjects paired on relevant characteristics
- Example: Blood pressure before and after treatment
Interpreting Results
- t-Statistic: Measures how many standard errors the sample mean is from H₀
- p-Value: Probability of observing results as extreme under H₀
- Significant if: p-value < α (reject null hypothesis)
- Not significant if: p-value ≥ α (fail to reject null hypothesis)
Choosing the Right Test
- One sample vs. known value: Use one-sample t-test
- Two independent groups: Use two-sample t-test
- Same subjects, two conditions: Use paired t-test
- Large samples (n > 30): T-test approximates z-test
Assumptions
- Normality: Data should be approximately normally distributed
- Independence: Observations should be independent (except paired)
- Equal variances: For Student's t-test (use Welch's if uncertain)
- Random sampling: Data should come from random samples
Common Applications
- Medical research (drug effectiveness)
- Psychology experiments (treatment effects)
- Quality control (process comparisons)
- Education research (teaching methods)
- A/B testing (conversion rates)
Formula Reference
One-sample: t = (x̄ - μ₀) / (s/√n)
Two-sample (pooled): t = (x̄₁ - x̄₂) / √(sp² × (1/n₁ + 1/n₂))
Paired: t = d̄ / (sd/√n)