
Data Scientist Interview Questions From Google
In this article, we will dive into actual data scientist interview questions from Google, Meta, and Spotify. For each question, we’ll break down the problem, provide step-by-step solutions, and discuss the reasoning and code implementations required to impress interviewers.
This question tests your understanding of random number generation and transforming random variables. Here, "iid" means "independent and identically distributed", and the challenge is to generate samples from an arbitrary distribution \( X \), given only a uniform random number generator, typically one that generates numbers uniformly in the range [0,1].
The standard solution is Inverse Transform Sampling. The procedure is: