A one-sample test assesses whether a population mean differs from a specified value when the population standard deviation is unknown. Paired-data tests use the same procedure after reducing each pair to one difference.
State the parameter and hypotheses
For a single quantitative population, let be its mean. Test against a directional or two-sided alternative chosen from the research question.
The test statistic is
with degrees of freedom. The numerator is the observed departure from the null; the denominator estimates how much sample means vary. Use the t-distribution rather than the standard normal because the population standard deviation is estimated.
Check random sampling or a suitable randomized design, independence, and an approximately normal population for small samples or sufficient robustness for larger samples. Inspect skewness and outliers rather than relying only on a sample-size rule.
Example: test a claimed mean
A random sample of 25 packages has mean weight 503 grams and standard deviation 10 grams. Test against
The standard error is so with 24 degrees of freedom. The two-sided P-value is about 0.147. At the 5% level, fail to reject the null.
The data do not provide convincing evidence that the population mean differs from 500 grams. They do not prove exact equality. A three-gram observed difference can be compatible with sampling variability at this sample size and spread.
Paired data contain a natural matching
Measurements are paired when each observation in one condition is meaningfully linked to one in the other: before and after for the same person, left and right measurements, or deliberately matched subjects.
Define one difference per pair, such as Then the parameter is the population mean difference and the sample size is the number of pairs. Analyze the differences as one quantitative sample.
Do not treat the two columns as independent samples. Their dependence is the reason pairing can improve precision: stable person-to-person differences can cancel within each subtraction.
Example: a paired improvement test
Twelve students take a test before and after a course. Let Suppose the differences have mean 4.2 points and standard deviation 5.0 points, with no serious skewness or outliers.
To test against compute
with 11 degrees of freedom. The one-sided P-value is about 0.007. At 5%, there is evidence of a positive mean difference in the population represented by the sampling design.
If there was no randomized control condition, the improvement cannot automatically be attributed entirely to the course. Practice effects, maturation, or other changes could contribute. The statistical test of change and the causal interpretation are separate matters.
Conditions apply to the differences
For a paired procedure, examine the distribution of differences, not whether each original column is normal. Independence is required between pairs; dependence within each pair is expected.
Reversing the subtraction order negates every difference, the estimated mean difference, and the statistic. The alternative must reverse too if it is still meant to represent improvement. State the order before calculating to avoid a correct number with an incorrect conclusion.
Match the P-value to the alternative
For a greater-than alternative, use the upper tail; for a less-than alternative, use the lower tail. For a two-sided alternative, use both tails beyond the magnitude of the observed statistic. A large negative is not evidence for a greater-than claim.
A P-value is calculated assuming the null model. It is not the probability that the null is true or the probability that an observed improvement is practically important. Report the estimated difference and its units along with the decision.
Try it yourself
Nine paired differences have mean and standard deviation 3. Test against zero and compute the statistic and degrees of freedom.
Answer: The standard error is so with 8 degrees of freedom. The P-value depends on whether the prespecified alternative is less than, greater than, or different from zero.
What to remember
A paired test is a one-sample test on differences. Define the subtraction order, use the number and standard deviation of differences, and keep evidence of change distinct from evidence of causation.