- Algorithms have theoretical time complexity: \(O(n)\), \(O(n \log n)\), \(O(n^2)\), …
- But in practice, real runtimes vary due to:
- CPU cache effects
- Input distribution (random, sorted, reversed)
- Hardware noise
- Statistics lets us model, compare, and predict this behavior rigorously
- Goal: use regression and hypothesis testing to validate and estimate algorithmic complexity from empirical data