T-Test Calculator (One-Sample)
Calculate the one-sample t-statistic, degrees of freedom, standard error, and Cohen's d effect size to test whether a sample mean differs significantly from a known population mean.
Results
What is it?
The one-sample t-test determines whether a sample mean differs significantly from a known or hypothesized population mean. The t-statistic measures how many standard errors the sample mean is from the null hypothesis mean. The formula is: t = (x-bar - mu_0) / (s / sqrt(n)).
How to use
Enter your sample mean, the null hypothesis population mean, the sample standard deviation (s), and sample size (n). The calculator outputs the t-statistic and degrees of freedom. Look up the t-statistic in a t-distribution table with df degrees of freedom to find the p-value for your significance level.
Example scenario
A researcher tests whether a new drug changes IQ (mu_0 = 100). Sample of 30 people shows x-bar = 105, s = 15. SE = 15/sqrt(30) = 2.739. t = (105-100)/2.739 = 1.826, df = 29. From t-table, for df=29, |t| > 2.045 gives p < 0.05 (two-tailed). Since 1.826 < 2.045, the result is NOT significant at alpha = 0.05. Cohen's d = 5/15 = 0.333 (small-medium effect).
Pro tip
Critical t-values for common alpha levels (two-tailed, df=29): p<0.05 -> |t|>2.045; p<0.01 -> |t|>2.756; p<0.001 -> |t|>3.659. Cohen's d effect sizes: 0.2 = small, 0.5 = medium, 0.8 = large (Cohen, 1988). For large samples (n>30), the t-distribution approaches the z-distribution (z=1.96 for p<0.05). Always report both the test statistic and effect size -- statistical significance alone does not indicate practical importance.