Skip to content

T-test calculator

Paste your data or enter each sample's mean, standard deviation and size. Get the t statistic, degrees of freedom and p-value, with the working.

t-test
Test
Enter
t(47.05) = 2.015datasciencetrivia.com
P-value by tail. Choose one to see its working.
  1. H₀: μ₁ = μ₂, H₁: μ₁ ≠ μ₂
  2. t = (5.2 − 4.4) / √(1.5²/25 + 1.3²/25) = 0.8 / 0.397 = 2.015
  3. df = 47.05 (Welch–Satterthwaite)
  4. p = 2 × P(T ≥ 2.015) = 0.0496
α = 0.05Significant (|t| ≥ 2.012)
Difference (95% CI)0.8 (0.001 to 1.599)
Cohen's d0.57
Equal variancest(48) = 2.015, p = 0.0495

The example

Two page designs are each shown to 25 users, with mean session lengths of 5.2 and 4.4 minutes and standard deviations of 1.5 and 1.3. Welch's t-test gives t = 0.8 / 0.397 = 2.015 with 47.05 degrees of freedom, and a two-tailed p-value of 0.0496.

FAQ

Which t-test should I use?
One sample compares a mean with a fixed value. Two samples compares the means of two independent groups. Paired compares two measurements of the same subjects, such as before and after.
How do you calculate the t statistic?
Divide the difference by its standard error. For one sample, t = (x̄ − μ₀) / (s / √n). For two samples, t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂).
What is the difference between Welch's and Student's t-test?
Student's test assumes both groups have the same variance and pools them. Welch's doesn't, and loses little when they are equal, so it is the default here and in R.

Flashcards

More calculators

Created by santiviquez

About · Quizzes · Tools · History of AI · To suggest new questions or report an error send me a dm.