Analytical

Analytical statistics: mean, SD, and the t-test

12 min read Updated

Every analytical measurement is a random variable. Report only the mean and you have hidden half of the information; report the mean without a confidence interval and you have told the reader nothing about whether “0.253 mol/L” is 0.25 ± 0.01 or 0.25 ± 0.05. The three quantities that finish the job — standard deviation, standard error of the mean, and Student’s t confidence interval — are what turn a stack of raw numbers into a defensible measurement.

This guide walks the four statistics an analytical chemist needs (mean, SD, SE, CI), the two most common tests (t-test for a known reference, t-test between two data sets), and the rejection tests (Q-test, Grubbs) that decide whether an outlier is real or noise.

Prerequisites: none beyond high-school algebra. If calibration curves without lying to yourself is comfortable, this backfills the general-purpose statistics that calibration relies on.

The four numbers

Given a set of n measurements x₁, x₂, …, x_n:

Mean (average). The best point estimate of the true value:

xˉ=1n∑i=1nxi\bar{x} = \frac{1}{n} \sum_{i=1}^{n} x_i

Standard deviation (sample). How much the individual measurements scatter around the mean:

s=1n−1∑i=1n(xi−xˉ)2s = \sqrt{\frac{1}{n-1} \sum_{i=1}^{n} (x_i - \bar{x})^2}

The (n − 1) in the denominator, not n, is Bessel’s correction — it accounts for the fact that the mean was estimated from the same data, “using up” one degree of freedom. For n ≥ 20, dividing by n vs (n−1) is a 5% correction; for n = 3 it is 40%.

Standard error of the mean. How precisely you know the mean itself:

SE=snSE = \frac{s}{\sqrt{n}}

The mean of n independent measurements is known √n times more precisely than a single measurement. Doubling precision requires 4× the sample size.

Confidence interval. The range within which the true value most likely lies, at a chosen confidence level:

CI95%=xˉ±tn−1,0.05⋅SECI_{95\%} = \bar{x} \pm t_{n-1, 0.05} \cdot SE

where t is the Student’s t-value for n − 1 degrees of freedom at 95% confidence (two-tailed). For n = 5 (df = 4), t = 2.776. For n = 20 (df = 19), t = 2.093. For n → ∞, t → 1.96, matching the z-distribution.

Why t, not z

For small samples (typically n < 30), the sample standard deviation s is itself an estimate — it fluctuates. Using s in place of the true σ introduces extra uncertainty, which the Student’s t-distribution accounts for. As n grows, s → σ and t → z. For n = 3 the difference is huge (t₂,₀.₀₅ = 4.30 vs z₀.₀₅ = 1.96); for n = 30 the difference is 4%.

Always use t for chemistry sample sizes — a typical analytical replicate set is 3-10 measurements, well inside the range where t matters.

Worked example — reporting a titration result

95% confidence interval on triplicate titration
  1. Formula
  2. Substitute
  3. Note

    The 95% CI is ±0.0005 M — meaning if we repeated this five-replicate procedure many times, 95% of the resulting CIs would cover the true HCl concentration. The reported concentration goes to four decimal places because the CI width defines the last meaningful digit. Note that quoting '0.10294 M' with more decimals than the CI half-width supports is a common but wrong analytical practice — trailing digits below the CI resolution are noise.

  4. Result

The t-test — one sample vs a known reference

Question: does a measured mean differ significantly from a known value μ₀ (e.g., a certified reference material)?

Compute the t-statistic:

tcalc=∣xˉ−μ0∣s/nt_{calc} = \frac{|\bar{x} - \mu_0|}{s/\sqrt{n}}

Compare to the critical value t(n-1, α) at your chosen significance level α (usually 0.05). If t_calc > t_critical, reject the null hypothesis — the measured mean does differ significantly.

Example. A certified copper standard is 5.00 mg/L. Four measurements of the same sample give 5.08, 5.11, 5.03, 5.06 mg/L. Is the measurement biased?

x̄ = 5.070; s = 0.0356; SE = 0.0178; t_calc = |5.070 − 5.00|/0.0178 = 3.93. Critical t at df = 3, α = 0.05, two-tailed: 3.182. Since 3.93 > 3.182, the difference is significant at 95% confidence — the instrument has a small positive bias.

Note: “statistically significant” and “practically significant” are different. A 1% bias might be statistically significant but practically irrelevant if the required accuracy is 5%.

The two-sample t-test — comparing two data sets

Question: do two sets of measurements have the same mean, within statistical noise?

For samples with similar standard deviations (test with an F-test first), the pooled t-statistic:

tcalc=∣xˉ1−xˉ2∣sp1/n1+1/n2,  sp=(n1−1)s12+(n2−1)s22n1+n2−2t_{calc} = \frac{|\bar{x}_1 - \bar{x}_2|}{s_p \sqrt{1/n_1 + 1/n_2}}, \; s_p = \sqrt{\frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1+n_2-2}}

with df = n₁ + n₂ − 2. Compare t_calc to the critical t at df, α, two-tailed. If they differ, use Welch’s t-test (which handles unequal variances and non-integer df).

Practical uses of the two-sample t-test:

  • Method A vs Method B on the same sample.
  • Batch 1 vs Batch 2 of the same product.
  • Lab A vs Lab B in an inter-lab comparison.

Q-test — rejecting outliers, carefully

If one measurement in a small set looks anomalous, the Q-test (Dixon) decides whether the drop is justified. Order the data; compute Q = (suspect − nearest neighbour) / (max − min); compare to Q_critical (0.829 at n = 4, 0.710 at n = 5, 0.466 at n = 10; all at 95% confidence). If Q_calc > Q_critical, the suspect can be discarded. The related Grubbs’ test uses G = |suspect − x̄|/s and is preferred in modern practice. Both tests come with a warning: never drop a data point without documenting the reason, and never drop more than one from a small set (cascade rejections break the assumptions of every subsequent test).

Uncertainty propagates

When a result depends on two measured quantities, their uncertainties combine in quadrature: absolute uncertainties add for sums, relative uncertainties add for products. This is why a calibration curve’s slope and intercept both carry uncertainties, and how those translate into an uncertainty in the reported concentration of an unknown (Harris 10e §4.3).

Common pitfalls

Reporting more digits than the CI supports. If the 95% CI is ±0.5 mg, report 12.3 mg (or 12 mg), never 12.318 mg.

Confusing accuracy and precision. Accuracy = closeness to the true value (bias). Precision = closeness among replicates (random noise).

Using n instead of (n−1) for sample SD. For small samples this is a 20-50% error. Most calculators default to (n−1); check.

Chaining Q-tests to reject multiple outliers. Each rejection changes the sample and invalidates subsequent tests. If more than one point looks anomalous, the problem is with the whole data set.

Assuming normality. All the above tests assume normally-distributed residuals. If they are not, use non-parametric tests (Mann-Whitney, Wilcoxon) or bootstrap resampling.

Practice

Problem 1 Easy Six replicate measurements of a chloride standard give 24.10, 24.15, 24.12, 24.08, 24.14, 24.11 mg/L. Report the mean and 95% confidence interval.

Answer: x̄ = 24.117; s = 0.0258; SE = 0.0105; df = 5, t = 2.571; CI = 24.117 ± 2.571 × 0.0105 = 24.117 ± 0.027. Report: [Cl⁻] = 24.12 ± 0.03 mg/L (95% CI). The CI width is dominated by the small sample size, not by measurement noise — repeating with n = 20 would drop the CI to about ±0.012 mg/L.

Problem 2 Intermediate A student measures a 5-point set: 42.1, 42.3, 42.4, 42.2, and 51.7. Is the 51.7 an outlier at 95% confidence via Q-test?

Answer: Order: 42.1, 42.2, 42.3, 42.4, 51.7. Suspect = 51.7; nearest = 42.4; range = 51.7 − 42.1 = 9.6. Q_calc = (51.7 − 42.4)/9.6 = 0.969. Q_critical (n=5, 95%) = 0.710. Q_calc > Q_critical, so reject 51.7 at 95%. The remaining four points give x̄ = 42.25, s = 0.129, CI = 42.25 ± 0.21 (t = 3.182, df = 3). Always document the rejection: 'Point 5 excluded via Q-test, 95% confidence, likely instrument dropout at t = 40 min.'

Problem 3 Hard Method A gives mean = 15.20, s = 0.15, n = 5. Method B gives mean = 15.35, s = 0.18, n = 6. Do the two methods disagree at 95% confidence?

Answer: Pooled SD: s_p = √((4·0.15² + 5·0.18²)/9) = 0.167. t_calc = |15.20−15.35| / (0.167 × √(1/5+1/6)) = 0.15/0.101 = 1.485. t_critical(df=9, α=0.05) = 2.262. Since t_calc < t_critical, not significant at 95%. The methods agree within the precision of these small samples. To resolve a real 0.15-unit difference, n ≈ 15 each would be needed. 'No significant difference' is not the same as 'the same' — Type II error is the flipside of Type I.

Where this leads

Analytical statistics is the substrate every measurement rests on:

  • Linear regression — extends t-tests to slope and intercept parameters, giving CIs on calibration-curve results (see calibration curves without lying).
  • Analysis of variance (ANOVA) — the two-sample t-test generalises to N samples, testing whether at least one differs from the rest.
  • Measurement uncertainty (GUM) — the Guide to the Expression of Uncertainty in Measurement (ISO/IEC 98-3) codifies uncertainty budgets for calibration certificates.
  • Chemometrics — multivariate methods (PCA, PLS) reduce many-variable spectra to interpretable components with statistical guarantees.

Every one of them starts with n, x̄, s, and a t-value.

Sources

  • Harris, Quantitative Chemical Analysis, 10th ed. (2020), Ch. 4
  • Skoog, West, Holler & Crouch, Fundamentals of Analytical Chemistry, 9th ed. (2014), Ch. 6-7
  • Miller & Miller, Statistics and Chemometrics for Analytical Chemistry, 7th ed. (2018)
  • NIST/SEMATECH e-Handbook of Statistical Methods (2020)
  • W. S. Gosset (1908), Biometrika 6, 1 — original derivation of Student's t-distribution