# 109 Commonly Asked Data Science Interview Questions

- Posted by lhmay
- on Mar, 23, 2018
- in Data Science
- Blog No Comments.

https://www.springboard.com/blog/data-science-interview-questions/

** **

**Table of Contents**

**Statistics****Programming***General**Big Data**Python**R**SQL*

**Modeling****Behavioral****Culture Fit****Problem-Solving**

## 1. Statistics

Statistical computing is the process through which data scientists take raw data and create predictions and models backed by the data. Without an advanced knowledge of statistics it is difficult to succeed as a data scientist – accordingly it is likely a good interviewer will try to probe your understanding of the subject matter with statistics-oriented data science interview questions. Be prepared to answer some fundamental statistics questions as part of your data science interview.

Here are examples of rudimentary statistics questions we’ve found:

- What is the Central Limit Theorem and why is it important?
- What is sampling? How many sampling methods do you know?
**The following sampling methods are examples of probability sampling:**- Simple Random Sampling (SRS)
- Stratified Sampling.
- Cluster Sampling.
- Systematic Sampling.
- Multistage Sampling (in which some of the methods above are combined in stages)

- What is the difference between Type I vs Type II error?
- What is linear regression? What do the terms P-value, coefficient, R-Squared value mean? What is the significance of each of these components?
- What are the assumptions required for linear regression?
*There are four major assumptions: 1. There is a linear relationship between the dependent variables and the regressors, meaning the model you are creating actually fits the data, 2. The errors or residuals of the data are normally distributed and independent from each other, 3. There is minimal multicollinearity between explanatory variables, and 4. Homoscedasticity. This means the variance around the regression line is the same for all values of the predictor variable.*

- What is a statistical interaction?
- What is selection bias?
- What is an example of a dataset with a non-Gaussian distribution?
- What is the Binomial Probability Formula?

*Examples of similar data science interview questions found from Glassdoor:*

## 2. Programming

To test your programming skills, employers will ask two things during their data science interview questions: they’ll ask how you would solve programming problems in theory without writing out the code, and then they will also offer whiteboarding exercises for you to code on the spot. For the latter types of questions we will cover a few examples below, but if you’re looking for in-depth practice solving coding challenges, visit Interview Cake. They have an in-browser module for typing code, and they can walk you through tricky problems – all absolutely free.

2.1 *General*

- With which programming languages and environments are you most comfortable working?
- What are some pros and cons about your favorite statistical software?
- Tell me about an original algorithm you’ve created.
- Describe a data science project in which you worked with a substantial programming component. What did you learn from that experience?
- Do you contribute to any open source projects?
- How would you clean a dataset in (insert language here)?
- Tell me about the coding you did during your last project?

2.2 *Big Data*

- What are the two main components of the Hadoop Framework?
- Explain how MapReduce works as simply as possible.
- How would you sort a large list of numbers?
- Here is a big dataset. What is your plan for dealing with outliers? How about missing values? How about transformations?

2.3 *Python*

- What modules/libraries are you most familiar with? What do you like or dislike about them?
- What are the supported data types in Python?
- What is the difference between a tuple and a list in Python?

For additional Python questions that focus on looking at specific snippets of code, check out this useful resource created by Toptal.

2.4 *R*

- What are the different types of sorting algorithms available in R language?
*There are insertion, bubble, and selection sorting algorithms.*

- What are the different data objects in R?
- What packages are you most familiar with? What do you like or dislike about them?
- How do you access the element in the 2nd column and 4th row of a matrix named M?
- What is the command used to store R objects in a file?
- What is the best way to use Hadoop and R together for analysis?
- How do you split a continuous variable into different groups/ranks in R?
- Write a function in R language to replace the missing value in a vector with the mean of that vector.

2.5 *SQL*

Often, SQL questions are case-based, meaning that an employer will task you with solving an SQL problem in order to test your skills from a practical standpoint. For example, you could be given a table and be asked to extract relevant data, filter and order the data as you see fit, and report your findings. If you do not feel ready to do this in an interview setting, Mode Analyticshas a delightful introduction to using SQL that will teach you these commands through an interactive SQL environment.

- What is the purpose of the group functions in SQL? Give some examples of group functions.
- Group functions are necessary to get summary statistics of a dataset. COUNT, MAX, MIN, AVG, SUM, and DISTINCT are all group functions
- Tell me the difference between an inner join, left join/right join, and union.
- What does UNION do? What is the difference between UNION and UNION ALL?
- What is the difference between SQL and MySQL or SQL Server?
- If a table contains duplicate rows, does a query result display the duplicate values by default? How can you eliminate duplicate rows from a query result?

For additional SQL questions that focus on looking at specific snippets of code, check out this useful resource created by Toptal.

*Examples of similar data science interview questions found from Glassdoor:*

## 3. Modeling

Data modeling is where a data scientist provides value for a company. Turning data into predictive and actionable information is difficult, talking about it to a potential employer even more so. Practice describing your past experiences building models – what were the techniques used, challenges overcome, and successes achieved in the process? The group of questions below are designed to uncover that information, as well as your formal education of different modeling techniques. If you can’t describe the theory and assumptions associated with a model you’ve used, it won’t leave a good impression.

Take a look at the questions below to practice. Not all of the questions will be relevant to your interview – you’re not expected to be a master of all techniques. The best use of these questions is to re-familiarize yourself with the modeling techniques you’ve learned in the past.

- Tell me about how you designed the model you created for a past employer or client.
- What are your favorite data visualization techniques?
- How would you effectively represent data with 5 dimensions?
- How is kNN different from k-means clustering?
*kNN, or k-nearest neighbors is a classification algorithm, where the k is an integer describing the the number of neighboring data points that influence the classification of a given observation. K-means is a clustering algorithm, where the k is an integer describing the number of clusters to be created from the given data. Both accomplish different tasks.*

- How would you create a logistic regression model?
- Have you used a time series model? Do you understand cross-correlations with time lags?
- Explain the 80/20 rule, and tell me about its importance in model validation.
- Explain what precision and recall are. How do they relate to the ROC curve?
*Answer. Recall describes what percentage of true positives are described as positive by the model. Precision describes what percent of positive predictions were correct. The ROC curve shows the relationship between model recall and specificity – specificity being a measure of the percent of true negatives being described as negative by the model. Recall, precision, and the ROC are measures used to identify how useful a given classification model is.*

- Explain the difference between L1 and L2 regularization methods.
- What is root cause analysis?
- What are hash table collisions?
- What is an exact test?
- In your opinion, which is more important when designing a machine learning model: Model performance? Or model accuracy?
- What is one way that you would handle an imbalanced dataset that’s being used for prediction? (i.e. vastly more negative classes than positive classes.) Resampling techniques: oversampling, under sampling <5% is rare event or Algorithmic
- How would you validate a model you created to generate a predictive model of a quantitative outcome variable using multiple regression?
- I have two models of comparable accuracy and computational performance. Which one should I choose for production and why?
- How do you deal with sparsity?
- Is it better to spend 5 days developing a 90% accurate solution, or 10 days for 100% accuracy?
- What are some situations where a general linear model fails?
- Do you think 50 small decision trees are better than a large one? Why?
- When modifying an algorithm, how do you know that your changes are an improvement over not doing anything?
- Is it better to have too many false positives, or too many false negatives?

*Examples of similar data science interview questions found from Glassdoor:*

## 4. Past Behavior

Employers love behavioral questions. They reveal information about the work experience of the interviewee as well as information about the demeanor of any potential team member. From these questions, an interviewer wants to see how a candidate has reacted to situations in the past, how well they can articulate what their role was, and what they learned from their experience.

There are several categories of behavioral questions you’ll be asked:

**Teamwork****Leadership****Conflict Management****Problem-solving****Failure**

Before the interview, write down examples of work experience related to these topics to refresh your memory – you will need to recall specific examples to answer the questions. When asked about a prior experience, make sure you tell a story as well. Being able to concisely and logically craft a story to detail your experiences is important. For example – ”I was asked X, I did A, B, and C, and decided that the answer is Y”.

Of course, if you can highlight experiences having to do with data science, these questions present a great opportunity to showcase a unique accomplishment as a data scientist that you may not have discussed previously.

Here are examples of these sorts of questions:

- Tell me about a time when you took initiative.
- Tell me about a time where you had to overcome a dilemma.
- Tell me about a time where you resolved a conflict.
- Tell me about a time you failed, and what you have learned from it.
- Tell me about (a job on your resume). Why did you choose to do it and what do you like most about it?
- Tell me about a challenge you have overcome while working on a group project.
- When you encounter a tedious, boring task, how would you deal with it and motivate yourself to complete it?
- What have you done in the past to make a client satisfied/happy?
- What have you done in your previous job that you are really proud of?
- What do you do when your personal life is running over into your work life?

*Examples of similar data science interview questions found from Glassdoor:*

## 5. Culture

If an employer asks you a question on this list, they are trying to get a sense of who you are and how you would fit with the company. They’re trying to gauge where your interest in data science and the hiring company come from. Take a look at these examples and think about what your best answer would be, but keep in mind – it’s important to be honest with these questions. There’s no reason to not be yourself. There are no right answers to these questions – but the best answers are communicated with confidence and a smile.

- Which data scientists do you admire most? Which startups?
*There are plenty of amazing data scientists to choose from – take a look at this article on top data science influencers for some more insight on some of the top data scientists in the world.*

- What do you think makes a good data scientist?
- How did you become interested in data science?
- Give a few examples of “best practices” in data science.
- What/when is the latest data science book / article you read? What/when is the latest data mining conference / webinar / class / workshop / training you attended?
*If you haven’t read a good data science book recently, Springboard compiled a list of the best data science books to read!*

- What’s a project you would want to work on at our company?
- What unique skills do you think you’d bring to the team?
- What data would you love to acquire if there were no limitations?
- Have you ever thought about creating a startup? Around which idea / concept?
- What can your hobbies tell me that your resume can’t?
- What are your top 5 predictions for the next 20 years?
- What did you do today? Or what did you do this week / last week?
- If you won a million dollars in the lottery, what would you do with the money?
- What is one thing you believe that most people do not?
- What personality traits do you butt heads with?
- What are you passionate about?

*Examples of similar data science interview questions found from Glassdoor:*

## 5. Problem-Solving

Interviewers will, at some point during the interview process, want to test your problem-solving ability through data science interview questions. Often these tests will be presented as an open-ended question – How would you do “X”? In general, that ‘X’ will be a task or problem specific to the company you are applying with. For example, an interviewer at Yelp may ask a candidate how they would create a system to detect fake Yelp reviews. Some quick tips: Don’t be afraid to ask questions. Employers want to test your critical thinking skills – and asking questions that clarify points of uncertainty are a great way to show that you know how to ask the right questions (a trait that any data scientist should have). Also, if the problem offers an opportunity to show off your white-board coding skills or to create schematic diagrams – use that to your advantage. It shows technical skill, and helps to communicate your thought process through a different medium of communication. Always communicate your thought process — process is often more important then the results themselves for the interviewer.

- How would you come up with a solution to identify plagiarism?
- How many “useful” votes will a Yelp review receive?
- How do you detect individual paid accounts shared by multiple users?
- You are about to send one million emails. How do you optimize delivery? How do you optimize response?
- You have a dataset containing 100K rows and 100 columns, with one of those columns being our dependent variable for a problem we’d like to solve. How can we quickly identify which columns will be helpful in predicting the dependent variable. Identify two techniques and explain them to me as though I were 5 years old.
- How would you detect bogus reviews, or bogus Facebook accounts used for bad purposes?
*This is an opportunity to showcase your knowledge of machine learning algorithms; specifically, sentiment analysis and text analysis algorithms. Showcase your knowledge of fraudulent behavior – what are the abnormal behaviors that can typically be seen from fraudulent accounts?*

- How would you perform clustering on one million unique keywords, assuming you have 10 million data points – each one consisting of two keywords, and a metric measuring how similar these two keywords are? How would you create this 10 million data points table in the first place?
- How would you optimize a web crawler to run much faster, extract better information, and better summarize data to produce cleaner databases?

*Examples of similar data science interview questions found from Glassdoor:*