# Statistics for Data Science

> Descriptive statistics, sampling, confidence intervals, hypothesis tests and A/B testing to reason about data and model results honestly. Free notes, key...

Canonical: https://www.internhack.in/roadmaps/tracks/machine-learning/statistics
Last updated: 2026-11-28

Descriptive statistics, sampling, confidence intervals, hypothesis tests and A/B testing to reason about data and model results honestly.

Beginner · about 14 hours · difficulty 3/5

Learn first: [Probability for ML](https://www.internhack.in/roadmaps/tracks/machine-learning/probability)

Statistics separates real effects from noise. It tells you whether model B is actually better than model A and whether an observed pattern in data would survive a new sample.

### Topics

- **Descriptive stats**: mean, median, variance, quantiles, skew; correlation versus causation.
- **Sampling and the central limit theorem**: why averages are approximately normal and how sample size affects precision.
- **Confidence intervals and the bootstrap**: resample your test set to put error bars on a metric.
- **Hypothesis testing**: null hypotheses, p-values, t-tests, chi-squared tests, and what a p-value does not mean.
- **Multiple comparisons**: testing 50 features or 50 model variants inflates false discoveries.
- **A/B testing**: randomization, power, minimum detectable effect; how models are validated in production.

### Pitfalls

Reporting a single accuracy number with no uncertainty, p-hacking by trying many analyses until one is significant, and confusing statistical significance with practical importance.

**Good enough to move on** when you can bootstrap a 95% confidence interval for a model's F1 score and interpret whether two models differ meaningfully.

## Key concepts

- **Descriptive statistics**
- **Central limit theorem**
- **Confidence intervals and bootstrap**
- **Hypothesis tests and p-values**
- **Multiple comparisons**
- **A/B testing and power**
- **Bayesian inference basics**

## Mini project

Train two classifiers on the UCI Adult income dataset and use bootstrap resampling of the test set to estimate confidence intervals for the accuracy difference between them.

## Check yourself

What exactly does a p-value of 0.03 tell you, and what does it not tell you?

## Free resources

- [An Introduction to Statistical Learning](https://www.statlearning.com/) (James, Witten, Hastie, Tibshirani)
- [Khan Academy: Statistics and probability](https://www.khanacademy.org/math/statistics-probability) (Khan Academy)

Previous: [Probability for ML](https://www.internhack.in/roadmaps/tracks/machine-learning/probability) · Next: [Optimization and Gradient Descent](https://www.internhack.in/roadmaps/tracks/machine-learning/optimization)

## More in The Math Behind the Models

- [Linear Algebra for ML](https://www.internhack.in/roadmaps/tracks/machine-learning/linear-algebra)
- [Calculus and Gradients](https://www.internhack.in/roadmaps/tracks/machine-learning/calculus-gradients)
- [Probability for ML](https://www.internhack.in/roadmaps/tracks/machine-learning/probability)
- [Statistics for Data Science](https://www.internhack.in/roadmaps/tracks/machine-learning/statistics)
- [Optimization and Gradient Descent](https://www.internhack.in/roadmaps/tracks/machine-learning/optimization)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Machine Learning Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/machine-learning)
