The 25 statistics and maths questions most often asked in data science and machine learning interviews, with short, accurate answers and links to full tutorials.
1. Mean vs median – when is the median better?
When data is skewed or has outliers (income, house prices). The median is robust; the mean is pulled by extreme values.
2. What is standard deviation?
The typical distance of values from the mean; the square root of variance, in the same units as the data.
3. Population vs sample?
The population is everything of interest; a sample is the subset measured. Sample statistics estimate population parameters.
4. What is the Central Limit Theorem?
The distribution of sample means approaches a normal distribution as sample size grows, whatever the original distribution (with finite variance). It justifies many tests and confidence intervals.
5. Explain a p-value.
The probability of data at least as extreme as observed if H₀ is true. See P-Values Explained.
6. Type I vs Type II error?
Type I: rejecting a true H₀ (false positive, rate α). Type II: failing to reject a false H₀ (false negative, rate β). Power = 1 − β.
7. What is a confidence interval?
A range built by a method that captures the true parameter in, e.g., 95% of repeated samples.
8. Correlation vs causation?
Correlation shows association; causation needs experiments or causal analysis. Confounders can create correlation. See Correlation and Covariance.
9. Pearson vs Spearman?
Pearson measures linear association; Spearman uses ranks and measures any monotonic association, robust to outliers.
10. State Bayes’ theorem.
P(A|B) = P(B|A)·P(A)/P(B). See Bayes’ Theorem.
11. Normal vs binomial vs Poisson?
Normal: continuous, symmetric. Binomial: number of successes in n trials. Poisson: count of events in a fixed interval. See Distributions.
12. What is skewness?
Asymmetry of a distribution. Right-skewed: long tail to the right, mean > median.
13. How do you detect outliers?
IQR rule (below Q1 − 1.5·IQR or above Q3 + 1.5·IQR), z-scores beyond ±3, box plots, or model-based methods like Isolation Forest.
14. t-test vs z-test?
Use z when population variance is known or n is large; t when variance is estimated from a small sample.
15. When use chi-square?
To test association between two categorical variables, or goodness of fit of observed counts to expected counts.
16. What is ANOVA?
A test of whether the means of three or more groups differ, comparing between-group to within-group variance.
17. What is A/B testing?
A randomised experiment comparing two variants on a metric, analysed with a hypothesis test and a pre-chosen sample size.
18. What is statistical power and why plan it?
The probability of detecting a real effect. Planning sample size for adequate power (often 80%) avoids inconclusive experiments.
19. What is multiple testing and how to correct it?
Running many tests inflates false positives. Corrections: Bonferroni, Holm, or controlling the false discovery rate (Benjamini–Hochberg).
20. What is bootstrapping?
Resampling the data with replacement many times to estimate the sampling distribution of a statistic, e.g. for a confidence interval.
21. Bias vs variance in estimators?
Bias is systematic error; variance is spread across samples. MSE = bias² + variance – the same trade-off seen in ML models.
22. What are eigenvalues used for in ML?
In PCA, eigenvectors of the covariance matrix are components and eigenvalues their variance. See Eigenvalues and Eigenvectors.
23. What is gradient descent?
An iterative method that moves parameters opposite to the gradient of the loss. See Optimization Techniques.
24. What is the law of large numbers?
As sample size grows, the sample mean converges to the population mean.
25. How do you handle imbalanced data statistically?
Use stratified sampling, appropriate metrics (precision, recall, PR-AUC), resampling or class weights, and consider base rates when interpreting probabilities.
Series
Maths & Statistics series: Introduction to Statistics · Descriptive Statistics · Probability · Bayes’ Theorem · Distributions · Inferential Statistics · Hypothesis Testing · P-Values · Correlation & Covariance · Linear Algebra · Eigenvalues · Calculus · Optimization · Interview Questions
Practice Exercises
- Answer each question aloud in under 60 seconds.
- Write Python code for questions 13, 17 and 20.
Summary
Master the concepts behind these questions – centre and spread, distributions, testing, errors, correlation, Bayes and linear algebra – and you cover most statistics interview rounds.
Machine Learning Tutorials, Courses and Certifications