109 Data Science Interview Questions and Answers _ Springboard Blog
109 Data Science Interview Questions and Answers _ Springboard Blog
Take this 2-minute quiz to see which Springboard course is the best t
for you
Preparing for an interview is not easy–there is signi cant uncertainty regarding the data science interview questions you will be asked. No
matter how much work experience or what data science certi cate you have, an interviewer can throw you off with a set of questions that
you didn’t expect.
During a data science interview, the interviewer will ask questions spanning a wide range of topics, requiring both strong technical
knowledge and solid communication skills from the interviewee. Your statistics, programming, and data modeling skills will be put to the
test through a variety of questions and question styles that are intentionally designed to keep you on your feet and force you to
demonstrate how you operate under pressure.
Preparation is the key to success when pursuing a career in data science, and that includes the interview process.
This guide contains all of the data science interview questions you should expect when interviewing for a position as a data scientist.
We previously created a free data science interview guide, yet we still felt we had more to explore. So we curated this list of real questions
asked in a data science interview. From this list of data science interview questions, an interviewee should be able to prepare for the
tough questions, learn what answers will positively resonate with an employer, and develop the con dence to ace the interview.
We’ve broken the interview questions for data scientists into six different categories: statistics, programming, modeling, behavior, culture,
and problem-solving.
1. Statistics
2. Programming
1. General
2. Big Data
3. Python
4. R
5. SQL
3. Modeling
4. Behavioral
5. Culture Fit
6. Problem-Solving
Ever wonder what a data scientist really does? Check out Springboard’s comprehensive guide to data science. We’ll teach you everything
you need to know about becoming a data scientist, from what to study to essential skills, salary guide, and more!
2. Programming
To test your programming skills, employers will typically include two speci c 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 provide a few examples below, but if you’re looking for in-depth practice solving
coding challenges, visit HackerRank. With a “learn by doing” philosophy, there are challenges organized around core concepts commonly
tested during interviews.
2.1 General
1. With which programming languages and environments are you most comfortable working?
2. What are some pros and cons about your favorite statistical software?
3. Tell me about an original algorithm you’ve created.
4. Describe a data science project in which you worked with a substantial programming component. What did you learn from that
experience?
5. Do you contribute to any open-source projects?
6. How would you clean a data set in (insert language here)?
7. Tell me about the coding you did during your last project?
2.3 Python
1. What modules/libraries are you most familiar with? What do you like or dislike about them?
2. In Python, how is memory managed?
In Python, memory is managed in a private heap space. This means that all the objects and data structures will be located in
a private heap. However, the programmer won’t be allowed to access this heap. Instead, the Python interpreter will handle it.
At the same time, the core API will enable access to some Python tools for the programmer to start coding. The memory
manager will allocate the heap space for the Python objects while the inbuilt garbage collector will recycle all the memory
that’s not being used to boost available heap space. Read more here.
3. What are the supported data types in Python?
“Python’s built-in (or standard) data types can be grouped into several classes. Sticking to the hierarchy scheme used in the
o cial Python documentation these are numeric types, sequences, sets and mappings.” Read more here.
4. What is the difference between a tuple and a list in Python?
“Apart from tuples being immutable there is also a semantic distinction that should guide their usage.” Read more here.
2.4 R
Related: Interview Questions on R and Text Mining in R: A Tutorial will help with data mining interview questions.
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 asked to extract relevant data, then lter and order the data as you see
t, and nally report your ndings. If you do not feel ready to do this in an interview setting, Mode Analytics has a delightful introduction to
using SQL that will teach you these commands through an interactive SQL environment.
1. 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 data set. COUNT, MAX, MIN, AVG, SUM, and DISTINCT are all
group functions.
2. Tell me the difference between an inner join, left join/right join, and union.
“In a Venn diagram the inner join is when both tables have a match, a left join is when there is a match in the left table and
the right table is null, a right join is the opposite of a left join, and a full join is all of the data combined.” Read more here.
3. What does UNION do? What is the difference between UNION and UNION ALL?
“UNION removes duplicate records (where all columns in the results are the same), UNION ALL does not.” Read more here.
4. What is the difference between SQL and MySQL or SQL Server?
“SQL stands for Structured Query Language. It’s a standard language for accessing and manipulating databases. MySQL is a
database management system, like SQL Server, Oracle, Informix, Postgres, etc.” Read more here.
5. 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?
Yes. One way you can eliminate duplicate rows with the DISTINCT clause. Read more here.
For additional SQL questions that focus on looking at speci c snippets of code, check out this useful resource created by Toptal.
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.
1. Tell me about how you designed a model for a past employer or client.
2. What are your favorite data visualization techniques?
3. How would you effectively represent data with 5 dimensions?
4. How is k-NN different from k-means clustering?
k-NN, or k-nearest neighbors is a classi cation algorithm, where the k is an integer describing the number of neighboring
data points that in uence the classi cation 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.
5. How would you create a logistic regression model?
6. Have you used a time series model? Do you understand cross-correlations with time lags?
7. Explain the 80/20 rule, and tell me about its importance in model validation.
“People usually tend to start with a 80-20% split (80% training set – 20% test set) and split the training set once more into a
80-20% ratio to create the validation set.” Read more here.
8. Explain what precision and recall are. How do they relate to the ROC curve?
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 speci city–speci city
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 classi cation model is. Read more here.
9. Explain the difference between L1 and L2 regularization methods.
“A regression model that uses L1 regularization technique is called Lasso Regression and model which uses L2 is called
Ridge Regression. The key difference between these two is the penalty term.” Read more here.
10. What is root cause analysis?
“All of us dread that meeting where the boss asks ‘why is revenue down?’ The only thing worse than that question is not
having any answers! There are many changes happening in your business every day, and often you will want to understand
exactly what is driving a given change — especially if it is unexpected. Understanding the underlying causes of change is
known as root cause analysis.” Read more here.
11. What are hash table collisions?
“If the range of key values is larger than the size of our hash table, which is usually always the case, then we must account
for the possibility that two different records with two different keys can hash to the same table index. There are a few
different ways to resolve this issue. In hash table vernacular, this solution implemented is referred to as collision resolution.”
Read more here.
12. What is an exact test?
“In statistics, an exact (signi cance) test is a test where all assumptions, upon which the derivation of the distribution of the
test statistic is based, are met as opposed to an approximate test (in which the approximation may be made as close as
desired by making the sample size big enough). This will result in a signi cance test that will have a false rejection rate
always equal to the signi cance level of the test. For example an exact test at signi cance level 5% will in the long run reject
true null hypotheses exactly 5% of the time.” Read more here.
13. In your opinion, which is more important when designing a machine learning model: model performance or model accuracy?
Here’s one approach to this question.
14. What is one way that you would handle an imbalanced data set that’s being used for prediction (i.e., vastly more negative classes
than positive classes)?
15. How would you validate a model you created to generate a predictive model of a quantitative outcome variable using multiple
regression?
16. I have two models of comparable accuracy and computational performance. Which one should I choose for production and why?
17. How do you deal with sparsity?
18. Is it better to spend ve days developing a 90-percent accurate solution or 10 days for 100-percent accuracy?
19. What are some situations where a general linear model fails?
Read about this here.
20. Do you think 50 small decision trees are better than a large one? Why?
Read about this here.
21. When modifying an algorithm, how do you know that your changes are an improvement over not doing anything?
22. Is it better to have too many false positives or too many false negatives?
It depends on several factors. Read about this here.
4. Past Behavior
Employers love behavioral questions. They reveal information about the work experience of the interviewee and about their demeanor and
how that could affect the rest of the team. 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.
1. Teamwork
2. Leadership
3. Con ict management
4. Problem-solving
5. Failure
Before the interview, write down examples of work experiences related to these topics to refresh your memory—you will need to recall
speci c examples to answer the questions well. When asked about a prior experience, make sure you tell a story. 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 was 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.
5. Culture Fit
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 t with the company.
They’re trying to gauge where your interest in data science and in the hiring company come from. Take a look at these examples and think
about what your best answer would be, but keep in mind that it’s important to be honest with these answers. There’s no reason to not be
yourself. There are no right answers to these questions, but the best answers are communicated with con dence.
6. 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
speci c 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 is 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 mode of communication. Always share your thought process—process is often more important than
the results themselves for the interviewer.
Conclusion
There is no single “best” way to prepare for a data science interview, but hopefully, by reviewing these common interview questions for
data scientists you will be able to walk into your interviews well-practiced and con dent. If you have any suggestions for questions, let us
know! Good luck.
Related reading
Our guide to data science interviews.
A look at 40 arti cial intelligence interview questions.
What we learned analyzing hundreds of data science interviews. This also includes a selection of data science interview questions.
Sources
Glassdoor – Data Scientist Interview Questions
KDnuggets
DeZyre
Udacity
Data Science Central – 66 Interview Questions for Data Scientists
AnalyticsVidhya – 40 Interview Questions asked at Startups in Machine Learning/Data Science
Workable – Data Scientist Coding Interview Questions
Codementor – 15 Essential Python Interview Questions
MaxNoy – Coding Interviews
DeZyre – 100 Hadoop Interview Questions and Answers
Tutorials Point – Python Interview Questions
Tutorials Point – SQL Interview Questions
(This post was originally published October 26, 2016. It was last updated November 29, 2018.)
Knowing the interview questions to prepare for is just one part of the interview process. Learn step-by-step everything you need to know
to not only land an interview, but ace the data science interview with Springboard’s Ultimate Guide to Data Science Interviews.
Michael Rundell
Data scientist in training, avid football fan, day-dreamer, UC Davis Aggie, and opponent of the pineapple topping
on pizza.
DATA S C I E N C E DATA S C I E N C E
READ M O R E READ M O R E
DATA S C I E N C E
READ M O R E
RESOURCES Universities
Follow Us on Twitter
E-books and Guides
Read Our Stories on Medium
View All Resources
Springboard Library