Data Science Interview Questions

Over 100 Data Science Interview Questions

A fresh scrape from Glassdoor gives us a good idea about what applicants are asked during a data scientist interview at some of the top companies. Unfortunately for us, almost every company has their interviewees sign NDAs. Since Glassdoor allows anonymity, a few brave souls have given us some fantastic examples of what they were asked during the interview process at top companies like Facebook, Google, and Microsoft.

If you find yourself unable to answer some of the questions below, consider checking out a course or a book on the subject.

If you'd like to share your answer(s) to any of the questions, leave a comment and I'll add the top ones to the post. Just make sure to comment with your real name so I can give you credit!

Also, if you don't see a particular question on this list that you've been asked, or you know of one that's asked a lot, comment below. I'd love to add it.

General Questions

Apple

  1. Suppose you’re given millions of users that each have hundreds of transactions and these millions of transactions are for tens of thousands of products. How would you group the users together in meaningful segments?

Microsoft

  1. Describe a project you’ve worked on and how it made a difference.

  2. How would you approach a categorical feature with high-cardinality?

  3. What would you do to summarize a Twitter feed?

  4. What are the steps for wrangling and cleaning data before applying machine learning algorithms?

  5. How do you measure distance between data points?

  6. Define variance.

  7. Describe the differences between and use cases for box plots and histograms.

Uber

  1. Pick any product or app that you really like and describe how you would improve it.

  2. How would you find an anomaly in a distribution ?

  3. How would you go about investigating if a certain trend in a distribution is due to an anomaly?

  4. How would you estimate the impact Uber has on traffic and driving conditions?

  5. What metrics would you consider using to track if Uber’s paid advertising strategy to acquire new customers actually works? How would you then approach figuring out an ideal customer acquisition cost?

LinkedIn

  1. Big Data Engineer Can you explain what REST is?

Machine Learning Questions

Google

  1. Why do you use feature selection?

  2. What is the effect on the coefficients of logistic regression if two predictors are highly correlated? What are the confidence intervals of the coefficients?

  3. What’s the difference between Gaussian Mixture Model and K-Means?

  4. How do you pick k for K-Means?

  5. How do you know when Gaussian Mixture Model is applicable?

  6. Assuming a clustering model’s labels are known, how do you evaluate the performance of the model?

Microsoft

  1. What’s an example of a machine learning project you’re proud of?

  2. Choose any machine learning algorithm and describe it.

  3. Describe how Gradient Boosting works.

  4. Data Mining Describe the decision tree model.

  5. Data Mining What is a neural network?

  6. Explain the Bias-Variance Tradeoff

  7. How do you deal with unbalanced binary classification?

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

Uber

  1. What sort features could you give an Uber driver to predict if they will accept a ride request or not? What supervised learning algorithm would you use to solve the problem and how would compare the results of the algorithm?

LinkedIn

  1. Name and describe three different kernel functions and in what situation you would use each.

  2. Describe a method used in machine learning.

  3. How do you deal with sparse data?

IBM

  1. How do you prevent overfitting?

  2. How do you deal with outliers in your data?

  3. How do you analyze the performance of the predictions generated by regression models versus classification models?

  4. How do you assess logistic regression versus simple linear regression models?

  5. What’s the difference between supervised learning and unsupervised learning?

  6. What is cross-validation and why would you use it?

  7. What’s the name of the matrix used to evaluate predictive models?

  8. What relationships exist between a logistic regression’s coefficient and the Odds Ratio?

  9. What’s the relationship between Principal Component Analysis (PCA) and Linear & Quadratic Discriminant Analysis (LDA & QDA)

  10. If you had a categorical dependent variable and a mixture of categorical and continuous independent variables, what algorithms, methods, or tools would you use for analysis?

  11. Business Analytics What’s the difference between logistic and linear regression? How do you avoid local minima?

Salesforce

  1. What data and models would would you use to measure attrition/churn? How would you measure the performance of your models?

  2. Explain a machine learning algorithm as if you’re talking to a non-technical person.

Capital One

  1. How would you build a model to predict credit card fraud?

  2. How do you handle missing or bad data?

  3. How would you derive new features from features that already exist?

  4. If you’re attempting to predict a customer’s gender, and you only have 100 data points, what problems could arise?

  5. Suppose you were given two years of transaction history. What features would you use to predict credit risk?

  6. Design an AI program for Tic-tac-toe

Zillow

  1. Explain overfitting and what steps you can take to prevent it.

  2. Why does SVM need to maximize the margin between support vectors?

Hadoop

Capital One

  1. Data Engineer What is Hadoop serialization?

  2. Explain a simple Map/Reduce problem.

Hive

LinkedIn

  1. Data Engineer Write a Hive UDF that returns a sentiment score. For example, if good = 1, bad = -1, and average = 0, then a review of a restaurant states “Good food, bad service,” your score might be 1 – 1 = 0.

Spark

Capital One

  1. Data Engineer Explain how RDDs work with Scala in Spark

Statistics & Probability Questions

Google

  1. Explain Cross-validation as if you’re talking to a non-technical person.

  2. Describe a non-normal probability distribution and how to apply it.

Microsoft

  1. Data Mining Explain what heteroskedasticity is and how to solve it

Uber

  1. What are some different Time Series forecasting techniques?

  2. Explain Principle Component Analysis (PCA) and equations PCA uses.

  3. How do you solve Multicollinearity?

  4. Analyst Write an equation that would optimize the ad spend between Twitter and Facebook.

IBM

  1. What are p-values and confidence intervals?

Capital One

  1. Data Analyst If you have 70 red marbles, and the ratio of green to red marbles is 2 to 7, how many green marbles are there?

  2. What would the distribution of daily commutes in New York City look like?

  3. Given a die, would it be more likely to get a single 6 in six rolls, at least two 6s in twelve rolls, or at least one-hundred 6s in six-hundred rolls?

PayPal

  1. What’s the Central Limit Theorem, and how do you prove it? What are its applications?

Programming & Algorithms

Google

  1. Data Analyst Write a program that can determine the height of an arbitrary binary tree

Microsoft

  1. Create a function that checks if a word is a palindrome.

Uber

  1. Data Engineer Code a function that calculates the square root (2-point precision) of a given number. Follow up: Avoid redundant calculations by now optimizing your function with a caching mechanism.

LinkedIn

  1. Data Engineer Write some code that will determine if brackets in a string are balanced

  2. How do you find the second largest element in a Binary Search Tree?

  3. Write a function that takes two sorted vectors and returns a single sorted vector.

  4. If you have an incoming stream of numbers, how would you find the most frequent numbers on-the-fly?

  5. Write a function that raises one number to another number, i.e. the pow() function.

  6. Split a large string into valid words and store them in a dictionary. If the string cannot be split, return false. What’s your solution’s complexity?

Salesforce

  1. What’s the computational complexity of finding a document’s most frequently used words?

  2. If you’re given 10 TBs of unstructured customer data, how would you go about finding extracting valuable information from it?

Capital One

  1. Data Engineer How would you ‘disjoin’ two arrays (like JOIN for SQL, but the opposite)?

  2. Create a function that does addition where the numbers are represented as two linked lists.

  3. Create a function that calculates matrix sums.

  4. How would you use Python to read a very large tab-delimited file of numbers to count the frequency of each number?

PayPal

  1. Write a function that takes a sentence and prints out the same sentence with each word backwards in O(n) time.

  2. Write a function that takes an array, splits the array into every possible set of two arrays, and prints out the max differences between the two array’s minima in O(n) time.

  3. Write a program that does merge sort.

SQL Questions

Microsoft

  1. Data Analyst Define and explain the differences between clustered and non-clustered indexes.

  2. Data Analyst What are the different ways to return the rowcount of a table?

LinkedIn

  1. Data Engineer How would you improve ETL (Extract, Transform, Load) throughput?

Brain Teasers & Word Problems

Google

  1. Suppose you have ten bags of marbles with ten marbles in each bag. If one bag weighs differently than the other bags, and you could only perform a single weighing, how would you figure out which one is different?

Uber

  1. Imagine you are working with a hospital. Patients arrive at the hospital in a Poisson Distribution, and the doctors attend to the patients in a Uniform Distribution. Write a function or code block that outputs the patient’s average wait time and total number of patients that are attended to by doctors on a random day.

LinkedIn

  1. Imagine you’re climbing a staircase that contains n stairs, and you can take any number k steps. How many distinct ways can you reach the top of the staircase? (This is a modification of the original stair step problem)

Questions sourced from Glassdoor

 
 

Don't see a particular question? Know an answer to a question above? Comment below and I'll add it!

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz

Send this to a friend