t Test
Calculate t and p for one sample or two independent samples from summary data. Choose the variance assumption for two samples.
Comparing means
A one sample test compares a sample mean with a hypothesized population mean. The two sample mode tests a difference between independent group means with a selectable variance assumption. Enter sample standard deviations calculated with divisor n − 1.
Calculation and example
For one sample, standard error is s/√n, the statistic is t = (x̄ − μ₀)/SE and degrees of freedom are n − 1. With n = 2, mean = 1, s = √2 and μ₀ = 0, t is 1 and the two sided p value is 0.5. Without an equal variance assumption, the standard error for two independent groups is √(s₁²/n₁ + s₂²/n₂).
Interpretation
Check sampling independence, normality and outliers separately. A small p value alone does not imply practical importance. For paired measurements, enter summary data for the pairwise differences in one sample mode. Without an equal variance assumption, degrees of freedom are retained as a fractional value.
From data to a decision
For one sample, take the mean, sample standard deviation and count from the same dataset. Standard error and standard deviation are not interchangeable. Standard error already includes the sample size effect. Entering it as a standard deviation reduces uncertainty twice.
For example, let the mean be 14, sample deviation 4, count 16 and hypothesized mean 12. Standard error is 4/√16 = 1, the statistic is (14−12)/1 = 2 and degrees of freedom are 15. The tool converts this statistic into a tail probability for the selected alternative. One sided and two sided choices do not test the same question. Avoid choosing the direction and significance level after seeing the result.
The p value is not the probability that the null hypothesis is true. Under that hypothesis and the model, it is the probability of a statistic at least as extreme as observed. Rejection alone does not establish a large or practically important effect. Consider the magnitude and units of the mean difference. Do not enter before and after measurements on the same subjects as independent groups. Use summary data for their pairwise differences.
Related calculators
-
Statistics and Data Analysis
Hypothesis Test and p Value
Calculate a p value from a known z, t, chi square or F statistic and compare it with your significance level. -
Statistics and Data Analysis
Normal Distribution and Z Score
Calculate a z score, normal lower and upper tail probabilities, and a quantile. -
Statistics and Data Analysis
Binomial and Poisson Distributions
Calculate exact count, cumulative and upper tail probabilities, plus the mean and variance of discrete event counts. -
Statistics and Data Analysis
Chi Square Goodness of Fit Test
Calculate a chi square goodness of fit statistic, degrees of freedom and approximate p value from observed and expected counts. -
Statistics and Data Analysis
Confidence Interval for a Mean
Calculate a confidence interval from summary statistics. Use a normal interval for known population deviation or a t interval for sample deviation. -
Statistics and Data Analysis
Data Charts and Moving Average
Create histograms, box plots, scatter plots and trailing moving averages. Download data as CSV and charts as SVG.
Found a mistake or something missing?
If a value looks wrong, a size is missing or you need a feature, write to us and we will fix it.