Skip to content

Interview questions

Data scientist interview questions

Common questions for Data scientist roles. Read, copy and practise.

Free with every account.

Practice questions from open collections and written with AI. Not reported from interviews.

Technical

Coding

  1. Describe how window functions work and provide a SQL query using ROW_NUMBER() to rank sales by region.

  2. Write a SQL query to calculate the moving average of daily active users over a 7-day window.

  3. Write a Python function using pandas to group data by a categorical column and calculate the mean and standard deviation of a numerical column.

  4. Given an SQL table of user events, write a query to calculate the daily active users (DAU).

System design

  1. Explain how you would design a schema optimized for analyzing customer purchases over time.

Other technical questions

  1. Is accuracy always a good metric?

  2. What are precision, recall, and F1-score?

  3. How to interpret the AU ROC score?

  4. What is the PR (precision-recall) curve?

  5. In which cases AU PR is better than AU ROC?

  6. What do we do with categorical variables?

  7. Why do we need one-hot encoding?

  8. What is "curse of dimensionality"?

Show 183 more other technical questions
  1. What happens to our linear regression model if we have three columns in our data: x, y, z — and z is a sum of x and y?

  2. Which regularization techniques do you know?

  3. What kind of regularization techniques are applicable to linear models?

  4. How does L2 regularization look like in a linear model?

  5. How do we select the right regularization parameters?

  6. What’s the effect of L2 regularization on the weights of a linear model?

  7. What’s the difference between L2 and L1 regularization?

  8. Can we have both L1 and L2 regularization components in a linear model?

  9. What’s the interpretation of the bias term in linear models?

  10. How do we interpret weights in linear models?

  11. If a weight for one variable is higher than for another — can we say that this variable is more important?

  12. Is feature selection important for linear models?

  13. Which feature selection techniques do you know?

  14. Can we use L1 regularization for feature selection?

  15. What are the decision trees?

  16. How do we train decision trees?

  17. What are the main parameters of the decision tree model?

  18. How do we handle categorical variables in decision trees?

  19. What are the benefits of a single decision tree compared to more complex models?

  20. How can we know which features are more important for the decision tree model?

  21. What is random forest?

  22. Why do we need randomization in random forest?

  23. What are the main parameters of the random forest model?

  24. How do we select the depth of the trees in random forest?

  25. How do we know how many trees we need in random forest?

  26. What are the potential problems with many large trees?

  27. What if instead of finding the best split, we randomly select a few splits and just select the best from them. Will it work?

  28. What happens when we have correlated features in our data?

  29. What is gradient boosting trees?

  30. What’s the difference between random forest and gradient boosting?

  31. Feature importance in gradient boosting trees — what are possible options?

  32. Are there any differences between continuous and discrete variables when it comes to feature importance of gradient boosting models?

  33. What are the main parameters in the gradient boosting model?

  34. How do you approach tuning parameters in XGBoost or LightGBM?

  35. How do you select the number of trees in the gradient boosting model?

  36. Which hyper-parameter tuning strategies (in general) do you know?

  37. What kind of problems neural nets can solve?

  38. How does a usual fully-connected feed-forward neural network work?

  39. Why do we need activation functions?

  40. What are the problems with sigmoid as an activation function?

  41. How we can initialize the weights of a neural network?

  42. What if we set all the weights of a neural network to 0?

  43. What regularization techniques for neural nets do you know?

  44. Which optimization techniques for training neural nets do you know?

  45. How do we use SGD (stochastic gradient descent) for training a neural net?

  46. What’s the learning rate?

  47. How to set the learning rate?

  48. When would you use Adam and when SGD?

  49. Do we want to have a constant learning rate or we better change it throughout training?

  50. How do we decide when to stop training a neural net?

  51. What is model checkpointing?

  52. Can you tell us how you approach the model training process?

  53. How we can use neural nets for computer vision?

  54. What’s a convolutional layer?

  55. What kind of augmentations do you know?

  56. How to choose which augmentations to use?

  57. What kind of CNN architectures for classification do you know?

  58. How can we use machine learning for text classification?

  59. What are the advantages and disadvantages of bag of words?

  60. How large should be N for our bag of words when using N-grams?

  61. Which model would you use for text classification with bag of words features?

  62. Would you prefer gradient boosting trees model or logistic regression when doing text classification with bag of words?

  63. Do you know any other ways to get word embeddings?

  64. If you have a sentence with multiple words, you may need to combine multiple word embeddings into one. How would you do it?

  65. How can you use neural nets for text classification?

  66. How can we use CNN for text classification?

  67. What is unsupervised learning?

  68. Do you know how K-means works?

  69. How to select K for K-means?

  70. What are the other clustering algorithms do you know?

  71. Do you know how DBScan works?

  72. When would you choose K-means and when DBScan?

  73. Do you know any dimensionality reduction techniques?

  74. What are good unsupervised baselines for text information retrieval?

  75. What is precision and recall at k?

  76. What is mean average precision at k?

  77. How can we use machine learning for search?

  78. How can we get training data for our ranking algorithms?

  79. Do you know how to use gradient boosting trees for ranking?

  80. How do you do an online evaluation of a new ranking algorithm?

  81. What is a recommender system?

  82. What are good baselines when building a recommender system?

  83. What is collaborative filtering?

  84. How we can incorporate implicit feedback (clicks, etc) into our recommender systems?

  85. What is the cold start problem?

  86. Possible approaches to solving the cold start problem?

  87. What is a time series?

  88. How is time series different from the usual regression problem?

  89. Which models do you know for solving time series problems?

  90. What are the problems with using trees for solving time series problems?

  91. How do you formulate the null and alternative hypotheses for an A/B test comparing two website designs?

  92. Can you explain the difference between Type I and Type II errors in hypothesis testing and why they matter in A/B experiments?

  93. What statistical test would you use for comparing conversion rates between two groups and why?

  94. Describe how you would handle multiple hypothesis testing when running several A/B experiments simultaneously.

  95. Explain how p-values are interpreted in the context of an online controlled experiment.

  96. How would you determine the required sample size before launching an A/B test to ensure statistical power?

  97. In product analytics, how do you decide which metric to use as the primary KPI for an A/B test?

  98. How do you interpret confidence intervals in the context of an A/B experiment’s outcome?

  99. What strategies do you apply to avoid data leakage or bias when running randomized controlled trials?

  100. Can you explain the difference between a probability density function and a cumulative distribution function?

  101. How would you interpret a p-value in the context of hypothesis testing?

  102. What assumptions are necessary for applying the Central Limit Theorem?

  103. Describe how you would detect multicollinearity in a dataset and why it matters in regression analysis.

  104. Explain the bias-variance tradeoff and its implications for model performance.

  105. How do you estimate confidence intervals for a population mean when the sample size is small?

  106. Can you explain Bayesian inference and how it differs from frequentist statistical methods?

  107. Describe how Markov chains can be used to model probabilistic transitions in data sequences.

  108. How would you approach a problem involving missing data where the missingness is not completely at random?

  109. Explain the concept of statistical power and factors that influence it.

  110. How do you interpret a correlation coefficient and what are its limitations in inferring causality?

  111. How do you assess the assumptions of linear regression before trusting the model results?

  112. Can you explain the differences between logistic regression and linear regression in terms of output and use cases?

  113. Describe how you would handle multicollinearity in a regression model.

  114. What techniques would you use to address imbalanced classes in a classification problem?

  115. How do you interpret the coefficients in a logistic regression model with categorical variables?

  116. Explain the concept of regularization in regression models and when you would apply L1 versus L2 penalties.

  117. How would you evaluate and compare the performance of different classification models?

  118. What is the difference between precision and recall and when is each metric most important?

  119. In a regression task, how do you decide whether to use a simple linear model or a more complex one like polynomial regression?

  120. Describe a situation where a classification model might fail despite good accuracy and how you would investigate it.

  121. How do you use ROC curves and AUC to assess a classifier’s performance?

  122. Explain how you would perform feature selection for a high-dimensional classification dataset.

  123. Explain the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL OUTER JOIN with examples.

  124. Given a sales dataset, how do you detect and handle duplicate records using SQL?

  125. What methods would you use in SQL to optimize query performance on large datasets?

  126. How do you handle missing or NULL values when performing data analysis in SQL?

  127. How do you approach creating new features from raw data for a predictive model in a classification task?

  128. Can you explain the concept of feature scaling and when it is necessary in a machine learning pipeline?

  129. What techniques do you use to handle categorical variables during feature engineering?

  130. How would you identify and handle multicollinearity among features in your dataset?

  131. Explain the difference between feature selection and feature extraction, and give examples of methods for each.

  132. How do you deal with missing data when constructing new features or selecting existing ones?

  133. Describe an approach to engineer time-based features for a dataset lacking explicit timestamps.

  134. In the context of feature engineering, how do you balance creating complex features with the risk of overfitting?

  135. What role does feature engineering play in improving model interpretability and explainability?

  136. How do you handle missing values in a pandas DataFrame and what are the different methods pandas provides for this?

  137. Explain the difference between pandas Series and DataFrame and when you would use each?

  138. Describe how you would merge two DataFrames on multiple columns with different join types in pandas.

  139. How can you optimize pandas code for better performance when working with very large datasets?

  140. Explain the concept of vectorization in pandas and why it is preferred over looping through rows.

  141. How would you reshape a DataFrame from wide to long format using pandas?

  142. Imagine a DataFrame with duplicate rows; how would you identify and remove duplicates efficiently?

  143. If you encounter mixed data types in a single pandas column, how do you detect and correct this issue?

  144. How do you handle time series data in pandas, and what functions are useful for date-time manipulation?

  145. Describe how to chain multiple pandas operations effectively without creating intermediate variables.

  146. How do you handle missing or inconsistent data points when measuring product metrics?

  147. Design a dashboard to track monthly churn rate for a subscription product; what metrics and visualizations would you include?

  148. How would you test if a recent product change statistically improves the conversion rate?

  149. How do you prioritize which product metrics to track when resources for data collection are limited?

  150. Explain how you would segment users to identify differences in product usage patterns and inform feature development.

  151. Explain the difference between K-means and hierarchical clustering methods and when you would use each?

  152. How do you determine the optimal number of clusters in a dataset when using clustering algorithms?

  153. Describe a scenario where density-based clustering like DBSCAN outperforms centroid-based methods.

  154. Can you explain the limitations of using Euclidean distance in clustering and suggest alternatives?

  155. How would you handle categorical features in an unsupervised clustering problem?

  156. Describe how dimensionality reduction techniques like PCA can improve clustering performance.

  157. What metrics would you use to evaluate the quality of clusters when no labeled data is available?

  158. Explain how you would use clustering in a customer segmentation project for a retail company.

  159. How do you incorporate domain expertise when interpreting clustering results and making business decisions?

  160. If clusters overlap significantly in feature space, how do you address this issue during analysis?

  161. Describe an approach to scale clustering algorithms efficiently on very large datasets.

  162. What tools or platforms do you prefer for creating compelling dashboards or reports, and why?

  163. How do you decide which evaluation metric to use for a classification problem with imbalanced classes?

  164. Can you explain the difference between ROC-AUC and PR-AUC and when to prefer each metric?

  165. How would you evaluate a regression model that predicts house prices and why?

  166. What are precision and recall, and why might optimizing for one hurt the other?

  167. How do you use cross-validation to estimate model performance, and what are its limitations?

  168. Describe a situation where accuracy is a misleading metric for model evaluation.

  169. What metrics would you use to evaluate a multi-class classification problem and why?

  170. Explain the concepts of overfitting and underfitting using evaluation metrics as evidence.

  171. How can you assess whether your model is calibrated properly, and why is calibration important?

  172. If your classification model has high recall but low precision, what steps would you take to improve it?

  173. In time series forecasting, which evaluation metrics do you use and how do they differ from standard regression metrics?

  174. How would you compare two models using statistical tests on their evaluation metrics to decide which one is better?

  175. Explain the difference between stationarity and seasonality in time series data and why it matters for forecasting.

  176. How would you handle missing timestamps or irregular intervals in a time series dataset before modeling?

  177. Describe the ARIMA model and its components; how do you select the order parameters (p, d, q)?

  178. What techniques do you use to detect and model seasonality in time series forecasting?

  179. Can you walk through the steps to build and evaluate a Prophet forecasting model on daily sales data?

  180. How would you approach forecasting sales for a new product with limited historical data?

  181. How do you assess whether a time series forecast is accurate enough for business decision-making?

  182. How do you ensure your time series model remains robust and up to date as new data arrives?

  183. Explain how you would detect and handle outliers or anomalies in time series data before forecasting.

Domain knowledge

  1. What is supervised machine learning?

  2. What are the main assumptions of linear regression?

  3. How do we check if a variable follows the normal distribution?

  4. What methods for solving linear regression do you know?

  5. What is the normal equation?

  6. Which metrics for evaluating regression models do you know?

  7. What are MSE and RMSE?

  8. What is the bias-variance trade-off?

Show 15 more domain knowledge questions
  1. What is overfitting?

  2. How to validate your models?

  3. Why do we need to split our data into three parts: train, validation, and test?

  4. Can you explain how cross-validation works?

  5. What is K-fold cross-validation?

  6. How do we evaluate classification models?

  7. What is accuracy?

  8. Describe your definition of a data analyst versus a data engineer.

  9. If you see a mistake in the data set what initial steps do you take to fix it?

  10. In marketing analytics, how would you use SQL to measure the effectiveness of a campaign?

  11. How would you define key performance indicators (KPIs) for a new feature on an e-commerce app?

  12. Describe a method to calculate customer retention rate using product usage data.

  13. Explain the difference between cohort analysis and funnel analysis in product metrics.

  14. Which product metric would you use to measure user engagement and why?

  15. In a retail context, what external factors would you consider incorporating into your time series forecast?

Behavioral

Motivation

  1. Why are you interested in working as a data scientist focusing on SQL-driven data analysis?

  2. What motivates you to specialize in time series analysis and forecasting within data science?

Other behavioral questions

  1. How did you train in data science?

  2. What do you do at your current project?

  3. Give an example where you analyzed data and the results came out unexpected. How did you resolve it and thinking back now how would you have done it differently.

  4. If your A/B test results show a statistically significant difference but business impact is minimal, how would you communicate this?

  5. Describe a time you identified a flaw in an experimental design or hypothesis test and how you addressed it.

  6. Describe a challenging data analysis problem you solved using SQL and what was your approach.

  7. How do you prioritize which data quality issues to fix first when working with large datasets?

  8. Describe a time you used domain knowledge to create a feature that significantly improved your model's performance.

Show 15 more other behavioral questions
  1. How would you explain the importance of feature engineering to a non-technical stakeholder?

  2. Describe a time when product metrics indicated a problem, and how you communicated insights to stakeholders.

  3. Tell me about a time you applied unsupervised learning to solve a real-world problem; what challenges did you face?

  4. Can you describe a data science project where you had to present complex findings to a non-technical audience and how you ensured they understood the key insights?

  5. How do you decide which visualizations to use when communicating the results of a predictive model to stakeholders?

  6. Explain a time when you had conflicting results in your analysis; how did you communicate this uncertainty to your team or clients?

  7. What strategies do you use to tailor your data storytelling approach when presenting to executives versus technical teams?

  8. Describe an instance where you used a case study to demonstrate the impact of a data science solution to influence business decisions.

  9. How do you balance technical accuracy with simplicity when writing reports or creating dashboards for business stakeholders?

  10. Can you walk me through how you would explain the limitations of a machine learning model in a presentation to a marketing team?

  11. When presenting data analysis results, how do you verify that your narrative aligns with the data and avoids common biases or misinterpretations?

  12. Describe how you have used storytelling techniques to enhance the persuasiveness of your data presentations during a project.

  13. How would you handle a situation where your project results contradicted a senior leader’s expectations during a final presentation?

  14. Explain how you summarize a large dataset’s findings into a concise case study that highlights business value effectively.

  15. Describe a challenging time series forecasting project you worked on and how you overcame the obstacles.

All interview questions

How this data is collected

Next

When the interview comes.

  • Transcribe

    Live transcription of a call, readable on any phone as it happens.

    Learn more
  • Interview copilot

    Suggested answers during your interview, from your resume and the role.

    Learn more