Example Interview Questions, March 2017
- What is a left join? Right join? Full outer join?
- Questions that require joining tables by using two ON clauses. For example:
SELECT a.stuff, b.stuff
FROM table1 AS a
JOIN table2 AS b
ON (a.id = b.id AND a.date >= b.date)
- How to get everything that’s in Table1 that is not in Table2
- Subqueries as a table with FROM statement, subqueries as a WHERE clause
- How to join a table to itself
- CASE WHEN statements
- How to pull data using a SQL query in order to create a histogram in Excel or whatever (probably binning the data using CASE WHEN statements…)?
- What does NULL mean?
- What is ‘fanout’? How does it happen?
- 3 types of JOINs: 1-to-1, 1-to-Many, Many-to-1. Aggregate functions: SUM, COUNT.
- In Many-to-1 joins, fanout can happen. How do you solve for this?
Critical thinking skills
- How would you design a study to test whether going to college is worth it or not? (How to measure aptitude, skill of students, how to control for factors like wealth, aptitude, how to create a random sample...etc)
- If you were going to buy a TV from Amazon, how would you choose your TV? (Discussion about ratings, how do you decide which ratings you trust (how many people have rated it, why is a larger number of responses better, what is the distribution of the ratings…? How would you compare a rating on Amazon to a rating on Best Buy for the same TV?...)
- Let’s say you opened a food truck. To drum up business, you passed out fliers advertising your food truck. How would you measure whether the fliers made a difference? (Look at trends - what was your business like last year at this time? Is it better this season? If you don’t have data from last season, maybe you pass out fliers this week, but not next week. Do next week’s sales decrease? What other factors increase/decrease sales? Is it raining outside? Did another food truck just open next to you to take half your business? Is there a festival at the nearby park so your business is exploding? … )
Let’s say you work for an advertising platform and you found that 5-second video advertisements for e-commerce businesses drive the most sales. How do you talk to your company’s sales team to convince them to sell this feature to their clients who advertise with you? What would you include in your presentation to your company’s sales team? (Slides should be convincing, like: “Revenue is increased by X and number of customers is increased by X when our e-commerce clients use 5-second video advertisements… Think about revenue and diversity of customer base)
Product questions -
- How would you measure the success of X feature launch?
How to think about this: Look at event data and track the user flow through that product funnel, see where people drop off/bounce/exit rates. How long does it take to get through the funnel (time is money! Page loading needs to be fast, user flow needs to be intuitive and frictionless...etc)? What is the intention of the feature? What is the natural life cycle of users using that feature? Are there seasonality effects (day of the week, time of day, holidays, seasons, any other major disruptions to user cycle)? Is there a reason outside of the product that users are not using it (any major economic crashes, super storms/power outages, crazy things happening in the universe)?
- Simple card games - What’s the probability of getting a Jack or Hearts?
- Dice rolling games
- Let’s say we’re playing a game with one 6-sided die. If you roll it once, whatever number you land on is how much I pay you (e.g., if you roll a 3, I pay you $3). How much would you pay to play this game?
- Answer: Find the expected value of your roll - ⅙ chance of getting any one number on the roll, i.e., equal chance of getting any one number, so expected value is ($1 + $2 + $3 + $4 + $5 + $6)/6 = $3.5). So you should spend something below $3.50 to play the game.
- Let’s say we change the game so that you can roll once and take the money, or if you want to, you can roll again and take the second roll amount instead. Now how much would you pay to play?
Answer: So now, if you roll a 1, 2 or 3, which is less than the expected value of your first roll, you can have a chance to roll again to try to make your money back on a 4, 5 or 6. Therefore your equation becomes something like ½*($4 + $5 + $6) + ½*($3.5) = $2.5 + $1.75 = $4.25.
Coin flip games -
Let’s say you’re a teacher and you assigned your students homework to go home and flip a coin 200 times and record each flip on a piece of paper. They all turn in their homework the next day. How can you tell who probably cheated and who probably didn’t just by eyeballing their homework? (Answer: Kids often assume that because there is a 50/50 chance of getting either a heads or a tails on each flip, their recordings will look something like ‘TTHTHHTHTHTTTHHTHHH….’ but in reality, if you’re flipping a coin 200 times, there is a higher probability of getting those long runs of heads or tails, like ‘THHTHTTTTTTTTTTTH….’ So if a student does not have any long runs of heads or tails, they probably did not actually flip their coin 200 times.)
- How to you choose your sample size?
- What is an A/B test good for?
- What is an A/B test not good for?
What happens when your distributions of a control and experimental group are overlapping? What does that mean?
- What is a p-value?
- What could you use instead of a Random Forest?
- What are the pros and cons of using a Random Forest versus a Logistic Regression?
- How do you measure the difference between two sample groups of N = 75? i.e., we ran an experiment with an experimental group of 75 and a control group of 75. How do you determine whether the experiment was a success?
- What is experimental design?
- What is hypothesis testing? What is a null hypothesis?
- What is variance? What is a standard deviation?
- What is R-squared?
- How can you tell if you have bias in your data?
- What is K-folds cross validation and why would you use it?
- What is normalization and why do you use it?
Other open-ended questions
- How do you prioritize your work? What do you do when 3 senior-level employees all have projects they want you to work on but you only have time for one of them right now?
- Describe a project where you had a big impact on the company
- Describe a project where you had a big impact on the product
- If you started working here today, what would you do first?