One-Sample T-Test
The engine for Benchmark Discovery. This model audits the distance between your sample and a fixed clinical or population standard, revealing if your data 'breaks' from the established norm.
What is it?
One-Sample T-Test compares the mean of a single sample against a known, pre-specified population benchmark value to see if they differ significantly.
When to use it
- Single Sample: You have one set of continuous measurements.
- Standard Comparison: Test against a historical norm, design spec, or neutral value.
Core Idea
We measure how many standard errors the observed sample mean lies away from the baseline test value:
Hypotheses
How it works
- Compute the sample mean and standard deviation.
- Calculate Standard Error: SE = SD / sqrt(N).
- Compute t-statistic: t = (Mean - Test Value) / SE.
- Compare t against the t-distribution with df = N - 1 to find p.
Assumptions
Effect Size
Standardized difference is measured via Cohen's d: d = (Mean - Test Value) / SD. Benchmarks suggest d = 0.2 is small, 0.5 is medium, and 0.8 is large.
Quick Example
| Subject Group | Observed Mean | Target Benchmark |
|---|---|---|
| Sample (N=20) | 52.4 | 50.0 |
| Difference | +2.4 (p = 0.035) | |
One-Sample T-Test Live Laboratory
Adjust the sample mean, test baseline value, and standard deviation to watch statistical separation.
| Metric | Observed Value |
|---|---|
| Sample Mean (X-bar) | 50.3216 |
| Test Baseline (mu0) | 50.0000 |
| t-statistic | 0.1503 |
| p-value (two-tailed) | 0.8821 |
Hypotheses
Pragmatic null and alternative hypotheses defined in mathematical notation.
H₀: μ = μ₀ (population mean equals hypothesized value μ₀)
Hₐ: μ ≠ μ₀ (population mean differs from μ₀)
μ₀ is the theoretical/expected value. Can be one-tailed if justified.
Assumptions
The core mathematical criteria needed to ensure that statistical testing remains unbiased and valid.
Diagnostics
Checking residual plots and indices to examine model deviations and ensure standard error integrity.
- Shapiro-Wilk test for normality (if n < 50)
- Q-Q plot to assess normality
- Boxplot to identify outliers
- Histogram of distribution
- Descriptive statistics (M, SD, n)
- Check skewness and kurtosis values
- Visual comparison of sample mean vs μ₀
Applied Minds
Review concrete study examples, data layout guidelines, and copy executable syntax scripts.
IQ Test Validation Against Population Norm (μ₀=100)
Research question: Does a new online IQ test produce scores that match the population norm (μ₀=100)? Design: n=42 adults complete new test. Outcome: IQ score (continuous, M=100, SD=15 in general population). Tests whether sample mean differs significantly from theoretical population mean of 100.
# One-sample t-test: IQ test validation against norm
set.seed(2025)
n <- 42
# Simulate IQ scores (slightly below norm: M=97.5)
data <- data.frame(
subject_id = 1:n,
IQ = rnorm(n, mean=97.5, sd=14.8)
)
mu_0 <- 100 # Population norm
# === STEP 1: Check Assumptions ===
# Normality
shapiro.test(data$IQ)
# p > .05: normality OK
qqnorm(data$IQ, main="Q-Q Plot of IQ Scores")
qqline(data$IQ)
# Outliers
boxplot(data$IQ, horizontal=TRUE, main="IQ Scores")
abline(v=mu_0, col="red", lwd=2, lty=2) # Reference line at μ₀
# === STEP 2: Descriptive Statistics ===
cat("Sample: M =", round(mean(data$IQ), 2), ", SD =", round(sd(data$IQ), 2), "\n")
cat("Population norm: μ₀ =", mu_0, "\n")
# === STEP 3: One-sample t-test ===
t_result <- t.test(data$IQ, mu = mu_0)
print(t_result)
# === STEP 4: Effect Size ===
cohen_d <- (mean(data$IQ) - mu_0) / sd(data$IQ)
cat("Cohen's d:", round(cohen_d, 2), "\n")
# Visualization
library(ggplot2)
ggplot(data, aes(x=IQ)) +
geom_histogram(aes(y=..density..), bins=12, fill="steelblue", alpha=0.7) +
geom_vline(xintercept=mean(data$IQ), color="blue", lwd=1.5, linetype="solid") +
geom_vline(xintercept=mu_0, color="red", lwd=1.5, linetype="dashed") +
annotate("text", x=mean(data$IQ)-5, y=0.025, label="Sample M", color="blue") +
annotate("text", x=mu_0+5, y=0.025, label="μ₀=100", color="red") +
labs(title="IQ Scores: Sample vs Population Norm") +
theme_classic()
cat("\nt(41) = -1.09, p = .28, d = -0.17\n")
cat("No significant difference from population norm.\n")t(41) = -1.09, p = .28, d = -0.17 (negligible effect). No significant difference between sample mean (M=97.5) and population norm (μ₀=100). The new IQ test produces scores consistent with standardized norms.
Alternatives
Structured fallback pathways for choosing alternative tests when normality or slopes requirements fail.
- Wilcoxon Signed-Rank (1-sample) — The robust median-based alternative for skewed samples.
- Bootstrap Mean Strike — Generate significance for the mean difference using 1,000 resamples.
- Trimmed Mean T-Test — Automatically exclude the extreme 5% of the distribution to protect the average.
- Robust One-Sample Test — Use M-estimators to find the robust center of the sample.
- One-Sample GEE — Account for clustering if observations are nested within higher-level units.
Post-hoc
Group mean comparisons and correction controls (e.g. Tukey HSD, Bonferroni) to protect against Family-Wise Error Rates.
- Compare with Wilcoxon signed-rank test (nonparametric alternative)
- Bootstrap confidence intervals for mean
- Examine normality assumption via Shapiro-Wilk
- Test sensitivity to outliers (with/without trimming)
- Calculate Cohen's d effect size: d = (mean - mu0) / SD
One-sample t-test compares sample mean to a single value. Post-hoc tests are not applicable.
Effect Size
Understanding effect sizes (e.g., Cohen's d, Partial Eta-Squared) and clinical impact benchmarks.
Standardized difference from hypothesized mean. d = (M - μ₀) / SD. Small: 0.2, Medium: 0.5, Large: 0.8 (Cohen, 1988). Use sample SD for denominator
Unstandardized difference (M - μ₀) with 95% CI. Easiest to interpret in original units (e.g., '2.5 points below IQ norm of 100')
0.2
0.5
0.8
Sample Size
Guidelines for minimum sample requirements and power analysis parameters.
A minimum of 20 participants is required to ensure the sample mean is a stable representative of the population and resists the pull of single outliers.
| Effect Size | Parameters | Required n |
|---|---|---|
| Small Effect | d=0.20 (Small) | n ≈ 199 |
| Medium Effect | d=0.50 (Medium) | n ≈ 34 |
| Large Effect | d=0.80 (Large) | n ≈ 15 |
Anchor Integrity: If the population benchmark (μ₀) is an estimate rather than a known fact, the uncertainty of the anchor must be accounted for by increasing the sample size by 15%.
Reporting
How to compile statistical results into publication prose matching APA and journal style guides.
A one-sample t-test was conducted to test whether sample description differed from description of μ₀, e.g., 'the population norm of 100'. If assumptions checked, state: 'Data were approximately normally distributed (Shapiro-Wilk p > .05).' If violated: 'Due to non-normality (Shapiro-Wilk p < .05), Wilcoxon signed-rank test was used as a sensitivity analysis.' The sample mean (M = XX.X, SD = X.X) was significantly/not significantly different from μ₀ = XX.X, t(df) = X.XX, p = .XXX, d = X.XX (95% CI X.X, X.X). Interpret effect size and practical significance in context.
- t-statistic
- degrees of freedom (n - 1)
- p-value (exact if p > .001, otherwise p < .001)
- effect size (Cohen's d)
- 95% confidence interval for mean difference
- sample descriptive statistics (M, SD, n)
- hypothesized population mean (μ₀)
- statement about normality assumption
Manuscript Lab
Copy standard summary tables and forensic reporting grids to outline analysis details.
| Sample Mean | Target | Difference | t | df | p | Cohen's d |
|---|---|---|---|---|---|---|
| 75.2 | 70.0 | 5.2 | 4.45 | 119 | < .001 | 0.41 |
The Benchmark. The hypothetical or historical value the sample is being compared against (e.g., passing grade, national average).
Benchmark Distance. Measures how many standard deviations the sample mean is away from the target.
Command Center
Syntax libraries and function parameters for executing calculations in stats packages.
# 1. Execute One-Sample T-Test
t.test(df$score, mu = 70)
# 2. Extract One-Sample Cohen's d
lsr::cohensD(df$score, mu = 70)The 'Benchmark Trap'. Statistical significance does not mean practical significance. Always check if the 95% CI of the difference excludes your 'Minimally Important Difference'.
# Generate Narrative with CI Focus
report::report(t.test(df$score, mu = 70))Common Mistakes
Analytical caveats and corrections to maintain modeling integrity.
References
Scholarly lineage and citation keys grounding the statistical framework.