The two tests
One sample: t is the gap between the sample mean and the claim, divided by the standard error of the mean.
Two samples: t is the gap between the two means, divided by the standard error of the difference.
Worked example
A sample of 20 with mean 52 and standard deviation 8, tested against a claim of 50, gives a standard error of 1.788854 and t = 1.118034.
With 19 degrees of freedom the two-tailed p value is 0.27749, so the difference is not significant at the 5% level.
Why Welch's correction
The two-sample test here does not assume the groups are equally spread out. It adjusts the degrees of freedom instead, which is safer when they are not.
With equal spreads the answer is very close to the classic pooled test, so nothing is lost by using it.
What a t test assumes
The readings should be independent, and roughly symmetric rather than heavily skewed. With small samples, check for outliers first.
A t test compares means. If the question is about medians, or the data are ranks, a different test is needed.
Inputs for the t test calculator
Which test?
One sample against a claim, or two samples against each other.
Mean, standard deviation and size
Summary statistics for each sample. The standard deviation must be above zero and each sample needs at least two readings.
Claimed mean
Only for the one-sample test: the value you are testing against.
CALCULATOR QUESTIONS
T test calculator questions
What is the t value for a mean of 52 against a claim of 50?
1.118034, with a sample of 20 and a standard deviation of 8.
What does the p value tell me?
How likely a difference this large would be if there were no real difference. 0.27749 is not significant at 5%.
What are degrees of freedom?
Roughly, how much independent information the sample carries. For one sample it is the size minus one.
Should I use a one-tailed or two-tailed test?
Two-tailed is the default here, because it tests for any difference. A one-tailed test halves the p value but must be chosen in advance.
