Facebook Data Scientist Interview Process

Categories
The article aims to give you an insight into the Facebook data scientist interview process, the skill sets required, and the kind of questions asked.
If you are looking up articles about data science and ended up here, we are pretty sure you already understand and appreciate the role of data scientists. But allow us to tell you more about it from a different perspective, and also add to your motivation to pursue your dreams to become a data scientist.
Back in 2018, IBM predicted there will be, by 2020, more than 3 million data scientists vacancies worldwide, surprisingly there is a shortage of data scientists!
Despite the fact that the “Data Scientist Job” is ranked #3 (2020 stats), the number of jobs is 3 times higher than the actual search for them, and the main reason for the shortage is finding the right skill set, and that’s the reason behind collecting the right amount of information to present to our readers a series of articles about acing DS interviews in world top FAANG companies.
Before starting this interview process, we suggest checking out what it means to be a data scientist at Facebook here.
Let us dig deep into the Facebook data scientist interview process!
Facebook Data Scientist Interview Phases:

Guide:
How to Get a Job at Facebook
Facebook Careers FAQ
Across their 8 Apps/Services, Facebook, as of today, has 1900+ open vacancies in the field of data science, globally!
Understand the Facebook Data Scientist Interview Process:
Initial Screening:
Be ready to answer questions about your experience, why you want to join Facebook, why do want to join as a data scientist, and that’s not all, for the Data Scientist role, additional technical questions will be asked, so be prepared to answer a couple of simple SQL questions.
Question Samples:
- What kind of joins to get only common rows?
- What is the difference between a left join vs. a union vs. a right join?
- Why do you want to proceed with the interview process?
Once you pass this initial phase, the HR recruiter will explain the rest of the process, may also give you some material to study for the next phase.
Technical Screening:
Virtual technical interview:
Takes up around 45-minutes, might undergo 2 (not one) of them, where you will be asked to solve SQL & Business Products questions
On-site technical interviews:
Takes up almost a whole day, you will meet several team members working in the same field. Be prepared to answer/solve a list of technical questions, related to data science, across multiple levels; Programming, Statistics, Product Related, and Behavioral levels.
Skills Needed from a Data Scientist at Facebook:
Before getting our hands dirty with the questions’ categories and examples of them, let’s have an overview of the skills needed from a data scientist.
- Fundamentals of Data Science
- Statistics & Probability
- Programming & Software Engineering
- Data Manipulation, Analysis & Visualization
- Big Data
- Artificial Intelligence:
- Machine Learning
- Deep Learning
- Model Building, Deployment & Re-Usage
- Soft Skills:
- Communication Skills
- Storytelling Skills
- Structured Thinking
- Curiosity
Understand the Facebook Data Scientist Interview Questions:
We will start by explaining the type of Facebook data scientist interview questions, then break them down by examples.
Side Note: You can find most of these questions & their solutions on our platform, come and
enjoy coding.
We collected our questions from various sites like Glassdoor, Indeed, TeamBlind where users report the questions they had received on their interviews. We were able to collect 146 questions across the last 2 years, and here is their breakdown by the category of interview question:

Programming Level:
Top 5 skills tested: Joins, aggregate functions, ranking techniques, date manipulation, reporting-like outputs (ex. histogram)
The most valuable asset for nowadays companies is data. And Facebook relies entirely on analyzing all of their users’ data to excel with their business, hence it is very important for their candidates to be able comfortably to work with and around data.
The most common data language is SQL, which this section will rely on, you will be asked to demonstrate your ability to extract, manipulate, and restructure pieces of data.
Moreover, as a data scientist, your ability to model, build/work with algorithms & different data structures is essential.
Here is a couple of examples:
SQL:
SQL questions will test your ability to understand given data, data extraction, and manipulation, to eventually provide an answer to a straightforward question, using aggregation functions, joins, ranking techniques.
1. “Facebook Messenger stores the number of messages between users in a table named 'fb_messages'. In this table 'user1' is the sender, 'user2' is the receiver, and 'msg_count' is the number of messages exchanged between them.”
Find the top 10 most active users on Facebook Messenger by counting their total number of messages sent and received.

Feel free to check the Solution & brainstorm with other people.
2. “Order the users in ascending order by their average session time. Consider the session time as the time difference between the page_load and page_exit events. Output the user id along with the corresponding average session time.”

Here's the solution for this Facebook data scientist interview question. Feel free to add your own!
3. “Find the ratio of successfully received messages to sent messages.”

Check out the solution from here, feel free to add your own!
Also, check out our post Facebook SQL Interview Questions to find more such SQL questions.
Data Structure & Algorithms:
Data Structure questions will test your ability to define, store & retrieve data in a structural & systematic way. (example. Q #1)
Algorithms in the meanwhile, by definition, are a set of instructions designed to perform a specific task, you will be either asked to assess an algorithm (example. Q #2) (hence think of how it is executed) or write a short one (example. Q #3)
1. “How do you revert a string?”
2. “Facebook has developed a search algorithm that will parse through user comments and present the results of the search to a user. To evaluate the performance of the algorithm, we are given a table that consists of the search result the user clicked on ('notes' column), the user's search query, and the resulting search position that was returned for the specific comment.
The higher the position, the better, since these comments were exactly what the user was searching for. Write a query that evaluates the performance of the search algorithm against each user query. Refer to the hint section for more specifics on how to write the query.”

Check out the solution from here, feel free to add your own!
3. “You're given a table that contains search results. If the 'position' column represents the position of the search results, write a query to calculate the percentage of search results that were in the top 3 positions.”

Check out the solution from here for this Facebook data scientist interview problem, and feel free to add your own!
Modeling Level:
Top 5 skills tested: Metrics evaluation, Critical thinking, Analytical skills, Creative thinking, Resilience
Question examples:
- “How would you prepare the data?”
- “How would you create a model to find bad sellers on the marketplace?”
- “How can you tell if your model is working?”
Could be worth doing a mock interview with one of the Prepfully Facebook Data Scientist experts - prepfully.com/practice-interviews. They've worked in the role so they clearly know how to get through the interview.
Product/Business Level:
Top 5 skills tested: Problem Solving, Transforming verbal description to a technical question, Product Management, building metrics, Estimation
As mentioned above, Facebook relies entirely on analyzing all of their users’ data to excel with their business, hence it is crucial to understand the flow of their business, and how to improve it.
For anyone to improve anything, they must be able to measure it first. Business Processes are measured through metrics, product usability/insights, and continuously optimizing KPIs.
Here's how Facebook is going to test you in a data scientist interview:
Metric/Business Case:
1. “How many high schools that people have listed on their Facebook profiles are real? How do we find out, and deploy at scale, a way of finding invalid schools?”

Join the discussion here, feel free to start your own!
2. “How do you map nicknames used in Facebook user’s names (Pete, Andy, Nick, Rob, etc) to real names?”

Join the discussion here, feel free to start your own!
3. “Facebook sees that likes are up 10% year over year, why could this be?”

Join the discussion here, feel free to start your own!
Product:
- “What is the impact of parents joining FB? How would you measure it?”
- “What functionalities would be helpful in the creation of reactions on Facebook?”
- “What's your favorite FB product and how we can improve it?”
KPIs:
- “How can you measure the success of your model?”
- “How can you tell if an idea is good?”
- “How to define meaningful social interaction?”
Design:
1. “Given data on Facebook members friending/defriending each other on Facebook, find out whether a given pair of members are currently friends.”

Join the discussion here, feel free to start your own!
2. “How would you compare the relative performance of two different backend engines for automated generation of Facebook "Friend" suggestions?”

Join the discussion here, feel free to start your own!
3. “Write a SQL query to compute a frequency table of a certain attribute involving two joins. What if you want to GROUP or ORDER BY some attribute? What changes would you need to make? How would you account for NULLs?”

Join the discussion here, be the FIRST to answer!
Statistics/Probability Level:
Top 5 skills tested: A/B testing, p-value meaning, regression, inference, probability distributions
Here is a summary of those concepts: Resource #1, Resource #2
Since you will be working with a vast amount of data, it is extremely useful to utilize statistical concepts, such as A/B testing, probability concepts, model evaluation, feature selection/engineering, inference, and more.
Here are some of the concepts you need to understand for your technical interview:
Statistics:
1. “Let's say the population on Facebook clicks ads with a click-through-rate of P. We select a sample of size N and examine the sample's conversion rate, denoted by hat{P}, what is the minimum sample size N such that Probability( ABS(hat{P} - P) < DELTA ) = 95%? In other words, find the minimum sample size N such that our sample estimate hat{P} is within DELTA of the true click-through rate P, with 95% confidence.”

Join the discussion here, feel free to start your own!
2. “We have a product that is getting used differently by two different groups. What is your hypothesis about why and how would you go about testing it?”

Join the discussion here, feel free to start your own!
3. “What is the expectation of the variance?”

Join the discussion here, feel free to start your own!
Probability: