One-Sample t-Test
Hypothesis TestingTests whether the mean of a single sample differs significantly from a known or hypothesised population value.
When to Use
Use this test when you have one group of observations and want to compare their mean to a specific reference value. For example, testing whether the average reaction time in your sample differs from a published norm of 250 ms, or whether a manufacturing process produces items with a mean weight equal to the target specification.
Assumptions
- The dependent variable is continuous.
- Observations are independent.
- The data are approximately normally distributed, or the sample size is large enough for the Central Limit Theorem to apply.
Required Inputs
| Input | Type | Notes |
|---|---|---|
| Values | Numeric | Sample values to test against the hypothesised mean |
| Parameter | Default | Options |
|---|---|---|
| Population Mean | 0 | Any numeric value |
Output Metrics
| Metric | What it means |
|---|---|
| N | Number of observations in the sample. |
| Mean | Sample mean. |
| Std Dev | Sample standard deviation. |
| Std Error | Standard error of the sample mean. |
| t | Test statistic: (sample mean - hypothesised mean) / standard error. |
| DF | Degrees of freedom (N - 1). |
| Pr > |t| | Two-tailed p-value for the null hypothesis that the population mean equals the hypothesised value. |
| Hypothesised Mean | The reference value being tested against. |
| 95% CL Lower | Lower bound of the 95% confidence interval for the population mean. |
| 95% CL Upper | Upper bound of the 95% confidence interval for the population mean. |
Interpretation
- If Pr > |t| is less than alpha, the sample mean is significantly different from the hypothesised value.
- The confidence interval for the population mean provides a range of plausible values. If the hypothesised mean falls outside this interval, the result is significant.
- The sign and magnitude of the t-statistic indicate the direction and strength of departure from the hypothesised mean.
- Consider whether the observed difference is practically meaningful, not just statistically significant.
Common Pitfalls
- The test assumes the hypothesised value is a fixed constant, not estimated from data. Using a value derived from the same sample invalidates the test.
- With very large samples, even trivially small deviations from the hypothesised mean can be statistically significant. Always examine the effect size.
- Non-normal data with small samples can produce misleading results. Consider the Wilcoxon signed-rank test as a non-parametric alternative.
How It Works
- Compute the sample mean, standard deviation, and standard error.
- Calculate the t-statistic as (sample mean - hypothesised mean) / standard error.
- Look up the p-value from the t-distribution with N - 1 degrees of freedom.
Citations
References
- Student (1908). The probable error of a mean. Biometrika, 6(1), 1-25.