Statistics for Test Data: Mean, Scatter, Confidence Intervals and Linear Regression
Test data is noisy. Before concluding that a temperature rose or a vibration trend is real, you need to know how much scatter to expect and how confident you can be in a mean or a slope. A handful of statistical tools, used correctly, separate real changes from noise and prevent both false alarms and missed trends.
Key takeaways
- Standard deviation s describes scatter of readings; the standard error s/√n describes uncertainty of the mean.
- 95 % confidence interval of a mean: x̄ ± t0.975,n−1·s/√n (t ≈ 2.0 for large n, larger for small n).
- Linear regression gives slope and intercept; report the slope with its standard error or confidence interval, not just R².
- A trend is statistically significant at 95 % if the slope's confidence interval does not include zero.
- Always plot residuals: curvature, outliers and changing scatter break the assumptions.
1. Describing repeated readings
Mean x̄ = Σx/n s = √[Σ(x − x̄)²/(n − 1)] Standard error SE = s/√n
95 % CI of mean: x̄ ± t(0.975, n−1)·s/√n
| n − 1 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 15 | 20 | 30 | ∞ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| t (95 %, two-sided) | 12.71 | 4.30 | 3.18 | 2.78 | 2.57 | 2.45 | 2.31 | 2.23 | 2.13 | 2.09 | 2.04 | 1.96 |
2. Linear regression
Slope b = Σ(x − x̄)(y − ȳ)/Σ(x − x̄)² Intercept a = ȳ − b·x̄
Residual std error s_e = √[Σ(y − ŷ)²/(n − 2)]
SE(b) = s_e/√Σ(x − x̄)² 95 % CI of slope: b ± t(0.975, n−2)·SE(b)
R² = 1 − Σ(y − ŷ)²/Σ(y − ȳ)²
| Result | Value |
|---|---|
| Slope | 0.398 mm/s per 1000 h |
| 95 % CI of slope | 0.349 to 0.446 per 1000 h |
| R² | 0.985 |
| Conclusion | Rising trend is significant (CI excludes zero) |
3. Cautions
- Correlation is not causation: speed, load and temperature often change together.
- Don't extrapolate far beyond the data range.
- Investigate outliers before removing them; use tests such as Grubbs' only for genuinely normal data.
- Autocorrelated data (consecutive samples from a slow process) overstates confidence: thin the data or use time-series methods.
4. Calculators
Mean, confidence interval and linear regression
5. Self-test: check your understanding
Pick an answer to see the explanation. Numerical answers are accepted within the stated tolerance (±3 % unless noted).
Score
6. References and further reading
- Montgomery, D. C. and Runger, G. C., Applied Statistics and Probability for Engineers, 7th ed., Wiley, 2018.
- NIST/SEMATECH e-Handbook of Statistical Methods.
- Draper, N. R. and Smith, H., Applied Regression Analysis, 3rd ed., Wiley, 1998.