75 Must-Know Data Science Interview Questions

data-science-interview-questions-big-data-interview-fusion-analytics-world

The role of a data scientist is highly malleable and company dependent. However, the general skill set needed is similar.

To prepare for your interview, you may want to brush up on these data science interview questions by reviewing some probability, data anal­ysis, SQL, coding, and experimental design. The questions in this article should help you do so. The background of data science applicants varies wildly, so interviews may generally be more holistic and test your intuition, analytic, and communication abilities rather than focusing on specific technical concepts.

Data science skills

Ok, now let’s dive into the data science interview questions.

Predictive Analytics

 

SourcePratapactuarial

  1. (Given a Dataset) Analyze this dataset and give me a mod­el that can predict this response variable.
  2. What could be some issues if the distribution of the test data is significantly different than the distribution of the training data?
  3. What are some ways I can make my model more robust to outliers?
  4. What are some differences you would expect in a model that minimizes squared error, versus a model that min­imizes absolute error? In which cases would each error metric be appropriate?
  5. What error metric would you use to evaluate how good a binary classifier is? What if the classes are imbalanced? What if there are more than 2 groups?
  6. What are various ways to predict a binary response vari­able? Can you compare two of them and tell me when one would be more appropriate? What’s the difference between these? (SVM, Logistic Regression, Naive Bayes, Decision Tree, etc.)
  7. What is regularization and where might it be helpful? What is an example of using regularization in a model?
  8. Why might it be preferable to include fewer predictors over many?
  9. How would you construct a feed to show relevant content for a site that involves user interactions with items?
  10. How would you design the people you may know feature on LinkedIn or Facebook?
  11. Given a database of all previous alumni donations to your university, how would you predict which recent alumni are most likely to donate?
  12. You’re Uber and you want to design a heatmap to recommend to drivers where to wait for a passenger. How would you approach this?
  13. You want to run a regression to predict the probability of a flight delay, but there are flights with delays of up to 12 hours that are really messing up your model. How can you address this?

Probability

  1. Let’s say you have a very tall father. On average, what would you expect the height of his son to be? Taller, equal, or shorter? What if you had a very short father?
  2. What’s the expected number of coin flips until you get two heads in a row? What’s the expected number of coin flips until you get two tails in a row?
  3. Let’s say we play a game where I keep flipping a coin until I get heads. If the first time I get heads is on the nth coin, then I pay you 2n-1 dollars. How much would you pay me to play this game?
  4. You have two coins, one of which is fair and comes up heads with a probability 1/2, and the other which is biased and comes up heads with probability 3/4. You randomly pick coin and flip it twice, and get heads both times. What is the probability that you picked the fair coin?
  5. You have a 0.1% chance of picking up a coin with both heads, and a 99.9% chance that you pick up a fair coin. You flip your coin and it comes up heads 10 times. What’s the chance that you picked up the fair coin, given the information that you observed?

Statistics

statistics 

Source: XKCD

  1. In an A/B test, how can you check if assignment to the various buckets was truly random?
  2. What might be the benefits of running an A/A test, where you have two buckets who are exposed to the exact same product?
  3. What would be the hazards of letting users sneak a peek at the other bucket in an A/B test?
  4. What would be some issues if blogs decide to cover one of your experimental groups?
  5. How would you conduct an A/B test on an opt-in feature?
  6. How would you run an A/B test for many variants, say 20 or more?
  7. How would you run an A/B test if the observations are extremely right-skewed?
  8. I have two different experiments that both change the sign-up button to my website. I want to test them at the same time. What kinds of things should I keep in mind?
  9. What is a p-value? What is the difference between type-1 and type-2 error?
  10. What is maximum likelihood estimation? Could there be any case where it doesn’t exist?
  11. What’s the difference between a MAP, MOM, MLE estima­tor? In which cases would you want to use each?
  12. What is a confidence interval and how do you interpret it?
  13. What is unbiasedness as a property of an estimator? Is this always a desirable property when performing inference? What about in data analysis or predictive modeling?

Data Analytics

Data analytics

Source: KDNuggets

  1. (Given a Dataset) Analyze this dataset and tell me what you can learn from it.
  2. What is R2? What are some other metrics that could be better than R2 and why?
  3. What is the curse of dimensionality?
  4. Is more data always better?
  5. What are advantages of plotting your data before per­forming analysis?
  6. How can you make sure that you don’t analyze something that ends up meaningless?
  7. What is the role of trial and error in data analysis ? What is the the role of making a hypothesis before diving in?
  8. How can you determine which features are the most im­portant in your model?
  9. How do you deal with some of your predictors being missing?
  10. You have several variables that are positively correlated with your response, and you think combining all of the variables could give you a good prediction of your re­sponse. However, you see that in the multiple linear re­gression, one of the weights on the predictors is negative. What could be the issue?
  11. Let’s say you’re given an unfeasible amount of predictors in a predictive modeling task. What are some ways to make the prediction more feasible?
  12. Now you have a feasible amount of predictors, but you’re fairly sure that you don’t need all of them. How would you perform feature selection on the dataset?
  13. Your linear regression didn’t run and communicates that there are an infinite number of best estimates for the re­gression coefficients. What could be wrong?
  14. You run your regression on different subsets of your data, and find that in each subset, the beta value for a certain variable varies wildly. What could be the issue here?
  15. What is the main idea behind ensemble learning? If I had many different models that predicted the same response variable, what might I want to do to incorporate all of the models? Would you expect this to perform better than an individual model or worse?
  16. Given that you have wifi data in your office, how would you determine which rooms and areas are underutilized and overutilized?
  17. How could you use GPS data from a car to determine the quality of a driver?
  18. Given accelerometer, altitude, and fuel usage data from a car, how would you determine the optimum acceleration pattern to drive over hills?
  19. How would you quantify the influence of a Twitter user?
  20. Given location data of golf balls in games, how would construct a model that can advise golfers where to aim?
  21. How would you come up with an algorithm to detect pla­giarism in online content?
  22. You have data on all purchases of customers at a grocery store. Describe to me how you would program an algo­rithm that would cluster the customers into groups. How would you determine the appropriate number of clusters to include?
  23. Let’s say you’re building the recommended music engine at Spotify to recommend people music based on past lis­tening history. How would you approach this problem?

Programming

Linus Torvalds quotes

Source: Azquotes

  1. Write a function to calculate all possible assignment vec­tors of 2n users, where n users are assigned to group 0 (control), and n users are assigned to group 1 (treatment).
  2. Given a list of tweets, determine the top 10 most used hashtags.
  3. You have a stream of data coming in of size n, but you don’t know what n is ahead of time. Write an algorithm that will take a random sample of k Can you write one that takes O(k) space?
  4. Write an algorithm that can calculate the square root of a number.
  5. Given a list of numbers, can you return the outliers?
  6. When can parallelism make your algorithms run faster? When could it make your algorithms run slower?
  7. What are the different types of joins? What are the differ­ences between them?
  8. Why might a join on a subquery be slow? How might you speed it up?
  9. Describe the difference between primary keys and foreign keys in a SQL database.
  10. Given a COURSES table with columns course_id and course_name, a FACULTY table with columns facul­ty_id and faculty_name, and a COURSE_FACULTY table with columns faculty_id and course_id, how would you return a list of faculty who teach a course given the name of a course?
  11. Given a IMPRESSIONS table with ad_id, click (an in­dicator that the ad was clicked), and date, write a SQL query that will tell me the click-through-rate of each ad by month.
  12. Write a query that returns the name of each department and a count of the number of employees in each:

EMPLOYEES containing: Emp_ID (Primary key) and Emp_Name

EMPLOYEE_DEPT containing: Emp_ID (Foreign key) and Dept_ID (Foreign key)

DEPTS containing: Dept_ID (Primary key) and Dept_Name

Communication

  1. Explain to me a technical concept related to the role that you’re interviewing for.
  2. Introduce me to something you’re passionate about.
  3. How would you explain an A/B test to an engineer with no statistics background? A linear regression?
  4. How would you explain a confidence interval to an engi­neer with no statistics background? What does 95% con­fidence mean?
  5. How would you explain to a group of senior executives why data is important?
  6. Tell me about a data project that you’ve done with a team. What did you add to the group?\
  7. Tell me about a dataset that you’ve analyzed. What tech­niques did you find helpful and which ones didn’t work?
  8. What’s your favorite algorithm? Can you explain it to me?
  9. How could you help the general public understanding towards the importance of using data to generate in­sights?

Now that you know the data science interview questions, it’s time to get cracking on some answers! So go on and study up for your interview, and don’t forget to tell us if our questions came in handy in the comments below!

Picture: Berkeleysciencereview           Source: Edvancer
Profile Status
ACTIVE
Profile Info
 

Kalyan Banga226 Posts

I am Kalyan Banga, a Post Graduate in Business Analytics from Indian Institute of Management (IIM) Calcutta, a premier management institute, ranked best B-School in Asia in FT Masters management global rankings. I have spent 14 years in field of Research & Analytics.

5 Comments

  • Exploratory Data Analysis – A Case Study - Fusion Analytics World Reply

    December 7, 2016 at 6:38 am

    […] understanding, skepticism of existing assumptions – to find solutions to business challenges. Data Scientists often spend lot of time wrangling, massaging the data and building various […]

     
  • Rommel Carvalho Reply

    February 15, 2017 at 4:48 pm

    Hi, nice compilation of questions!

    I work with Data Science in the Brazilian Government and I am going to write a blog post about Data Science among other things. I was hoping you would give me permission to use your Data Science Skillset image making sure I give you credit and point to your link. Would that be possible?

     
    • Kalyan Banga Reply

      February 20, 2017 at 1:26 pm

      Hi Rommel, Thank you for being a regular reader. Please go ahead and use the information as mentioned with due credit to Fusion Analytics World, do share the link once published. Thanks!

       
  • Nikhil Reply

    March 20, 2017 at 7:19 am

    Hi Kalyan,
    I am working with Oracle ERP for 10 years. Can you guide me to move into Data Science? Are there any certifications or what can be the entry point?

    -Nikhil

     
  • The way to get a job in knowledge science - TechMintz Reply

    December 21, 2019 at 4:06 am

    […] Picture credit score: fusionanalyticsworld.com […]

     

Leave a Comment

20 + four =