Data Science & Statistics Interview Questions and Answers
Probability, distributions, hypothesis testing, A/B tests and regression.
Whether you are preparing for entry-level Data Science & Statistics interview questions for freshers or senior software engineer interview questions addressing concurrency, scalability, and system architecture, this track provides peer-reviewed model answers with syntax walkthroughs, edge cases, and practical interview tips.
1 What is linear regression and what are its assumptions? Easy
Linear regression models a continuous target as a linear combination of predictors plus error: y = b0 + b1*x1 + ... + e. Coefficients are estimated by ordinary least squares, which minimizes the sum of squared residuals, or by maximum likelihood.
from sklearn.linear_model import LinearRegression
model = LinearRegression().fit(X, y)
Assumptions:
- Linearity between predictors and the mean of the target.
- Independence of errors, violated by time series or clustered data.
- Homoscedasticity: constant error variance.
- Normally distributed errors, mainly for inference and intervals.
- Little multicollinearity; check variance inflation factors.
- No influential outliers distorting the fit.
Violations affect inference more than prediction. Diagnose with residual plots, QQ plots and influence measures. Remedies include transformations, robust standard errors and adding interaction or polynomial terms.
2 Explain the difference between correlation and causation. Easy
Correlation means two variables move together; causation means one produces a change in the other. Correlation is symmetric and measurable with a coefficient, while causation is directional and requires a causal mechanism.
Why correlated variables may not be causal:
- Confounding: a third variable drives both, such as ice cream sales and drownings both rising in summer.
- Reverse causation: the outcome influences the predictor.
- Coincidence or selection effects.
df[["ad_spend", "revenue"]].corr()
To move toward causation, use randomized controlled experiments, or with observational data apply methods like difference-in-differences, instrumental variables, propensity score matching or regression discontinuity. Always plot the data and consider the mechanism. A high correlation coefficient is evidence of association, not proof of a causal relationship.
Frequently Asked Questions About Data Science & Statistics Interviews
What do hiring managers evaluate in Data Science & Statistics technical rounds?
Technical interviewers look for foundational fluency, idiomatic syntax, clarity when communicating complex logic, and awareness of performance trade-offs (e.g. memory footprint, render performance, and network latency) in production environments.
What are the best interview tips for practicing Data Science & Statistics questions?
Use active recall: summarize each answer in your own words before revealing the model solution. Focus on explaining why a certain approach is chosen rather than just memorizing code syntax.