Lesson 3 · 30 min
Comparing results: t tests, F tests and outliers
Rayleigh’s two kinds of “nitrogen” differed by 0.5 %, and that difference led him to argon. Learn to decide whether a difference is real — and whether a suspect value may be rejected.
In this lesson
- Use t tests to compare a mean with a reference value, two means with each other, and paired data
- Compare the precision of two data sets with the F test and choose the pooled or Welch t test accordingly
- Read p values and critical values, and say exactly what “significantly different” means
- Judge a suspect value with the Grubbs test, and know when not to discard data
In 1894 Lord Rayleigh repeatedly weighed the “nitrogen” filling one glass globe. Nitrogen made by removing oxygen, water and carbon dioxide from air averaged 2.310 11 g; nitrogen made by decomposing nitrogen compounds averaged 2.299 47 g. The difference was only 0.5 %, and each set repeated well. Rayleigh did not write it off as experimental error; with William Ramsay he tracked it down to a heavier gas hiding in atmospheric “nitrogen” — argon. Today a statistical test answers the same question: is the difference real?
Predict first
The two sets have standard deviations of about 0.000 14 g and 0.001 4 g, and their means differ by 0.010 64 g. What do you conclude?
Pick an answer and lock it in before you look. A wrong guess teaches more than no guess.
Three kinds of t test
A statistical test starts from the null hypothesis: “the difference is due to random error alone”. You compute a test statistic; if it exceeds the critical value that it would reach only 5 % of the time under the null hypothesis, you reject the null hypothesis and call the difference “significant at the 95 % confidence level”. The p value is the probability of a difference at least this large if the null hypothesis were true.
- A mean against a known value: checking a method for systematic error with a reference material.
- Two means: two methods, two samples or two laboratories. First use an F test to see whether the variances agree: if they do, pool the standard deviations (ν = n₁ + n₂ − 2); if not, use Welch’s t test (effective degrees of freedom from the Welch–Satterthwaite formula).
- Paired data: several different samples, each measured once by both methods. A t test on each sample’s difference d cancels the real differences between the samples.
- the known value (e.g. a certified reference value)
- pooled standard deviation
- the number of results in each set
Worked example
Is the new method biased?
A coal reference material is certified to contain 3.19 wt % sulfur. A new method gives 3.29, 3.22, 3.30 and 3.23 wt %. At the 95 % confidence level, do its results differ significantly from the certified value?
The F test and outliers
- ratio of variances, the larger on top
- Grubbs statistic: how many s the suspect value lies from the mean
- mean and standard deviation of all the data, suspect value included
Data sets often contain one result that “looks wrong”. Rejecting it needs grounds: first check the lab notes — a spill, a misreading, a bubble? If no cause turns up, use the Grubbs test: compute G and compare it with the critical value of ISO 5725-2 (or ASTM E178), which for n = 12 is 2.412 at 95 % and 2.636 at 99 %. It is better founded than the older Q (Dixon) test and is the one the international standards use. Test one suspect at a time, and the smaller the sample the more careful you must be: with 3–4 results almost any value “looks” suspicious.
Concept check
You analyse six different soil samples once each by an old and a new method. Which test compares the two methods?
Try the calculation
Twelve results have a mean of 10.16 mg and a standard deviation of 1.11 mg; the lowest is 7.8 mg. What is its Grubbs statistic G?
Key takeaways
- A t test asks whether a difference exceeds random error; p < 0.05 means significant at the 95 % level.
- Before comparing two means, run an F test: pool if the variances agree, use Welch if not; for the same samples measured twice, use a paired t test.
- For a suspect value look for a cause first, then apply the Grubbs test (ISO 5725-2), one value at a time.
- “Not significant” is not “the same”, and “significant” is not “important”.
Data and references
- Lord Rayleigh, “On an anomaly encountered in determinations of the density of nitrogen gas”, Proceedings of the Royal Society of London 55, 340–344 (1894); data as quoted in D. C. Harris, Quantitative Chemical Analysis, 9th ed. (2016), chapter 4.
- D. C. Harris, Quantitative Chemical Analysis, 9th ed., W. H. Freeman (2016), chapter 4 (t tests, F test, Grubbs test).
- ISO 5725-2:2019, Accuracy (trueness and precision) of measurement methods and results — Part 2, Table 5 (critical values for Grubbs’ test).
- ASTM E178-16a, Standard Practice for Dealing With Outlying Observations.
- B. L. Welch, “The generalization of ‘Student’s’ problem when several different population variances are involved”, Biometrika 34, 28–35 (1947).