Calculator Suite
T-Test Calculator
Statistical Hypothesis TestingPerform one-sample, two-sample, and paired t-tests with comprehensive statistical analysis
One-Sample T-Test
SelectedCompare sample mean to a known value
Examples:
- • Testing if average height differs from 170cm
- • Checking if test scores differ from 75%
Two-Sample T-Test
Compare means of two independent groups
Examples:
- • Comparing test scores between two classes
- • Testing difference in sales between regions
Paired T-Test
Compare before/after or matched pairs
Examples:
- • Before/after training scores
- • Comparing performance of same subjects under different conditions
Educational Resources
One-Sample T-Test
= Sample mean
= Hypothesized mean
= Sample standard deviation
= Sample size
Two-Sample T-Test
Pooled standard deviation
Paired T-Test
= Mean of differences
= Standard deviation of differences
A t-test compares means to determine if differences are statistically significant. Choose one-sample (compare to known value), two-sample (compare two groups), or paired (before/after same subjects). If p-value < 0.05, the difference is significant.
Select Test Type
One-sample, two-sample (independent), or paired t-test based on your data.
Enter Your Data
Input sample values separated by commas. For two-sample, enter both groups.
Configure Test
Set confidence level (95% typical) and hypothesis direction (two-tailed recommended).
Interpret Results
Check p-value, t-statistic, confidence interval, and Cohen's d effect size.
📊 Example: Drug Trial Two-Sample T-Test
Control group (n=20): Mean = 4.2 | Treatment group (n=20): Mean = 5.8
t-statistic
2.84
p-value
0.007
Cohen's d
0.90 (large)
Result
Significant
Interpretation: Treatment group shows significantly higher scores (p = 0.007 < 0.05) with a large effect size.
Key Assumptions:
- • Continuous data (interval/ratio scale)
- • Independent observations
- • Approximately normal distribution (or n > 30)
- • Equal variances for two-sample (or use Welch's)
When to Use Alternatives:
- • Non-normal data: Mann-Whitney U test
- • >2 groups: ANOVA instead
- • Known population σ: Z-test
- • Very small n: Consider bootstrapping
What's the difference between a t-test and z-test?
Use a t-test when the population standard deviation is unknown (most real-world cases). Use a z-test when population σ is known and n > 30.
What does the p-value actually mean?
The p-value is the probability of observing results as extreme as yours if the null hypothesis were true. It is NOT the probability that the null hypothesis is true.
How many samples do I need?
A minimum of 15-30 observations per group is recommended. Larger samples provide more statistical power to detect real differences.
Should I use one-tailed or two-tailed?
Use two-tailed unless you have a specific directional hypothesis stated before data collection. Two-tailed is more conservative.
What is Cohen's d and why does it matter?
Cohen's d measures effect size: Small ≈ 0.2, Medium ≈ 0.5, Large ≈ 0.8. A significant p-value with tiny effect size may not be practically important.