I just had an hour-long phone interview with an Amazon.com employee for the position of a Research Scientist. Here is a summary of the interview.
The interview began with a quick chit-chat about my resume and then dived into technical questions.
The first question was: Suppose a rabbit is hopping on a 2-dimensional integer lattice. It can only go left or up by one step at a time. The rabbit starts at (0,0), how many paths are there for it to reach (5, 5)?
I immediately realized the answer lies in a Pascal triangle. Unfortunately I stumbled a bit with the actual calculations and gave a number of wrong answers. With some help from the interview, I ended up using binomial expansion and gave the correct answer. Clearly I need more experience with conducting these interviews.
The second question was: We have developed a new algorithm and have conducted 100 trials of a benchmark test to compare with the original algorithm. The difference between the performances are given as real numbers, say 0.1, 0, -0.1, etc. How do you decide whether to adopt the new algorithm or not?
I was slightly unsure as to exactly what the interview wanted. So I began by pointing out that outliers may affect the mean. The interview clarified and added that the trials are exactly alike. I somewhat timidly replied that we can obtain a confidence interval on the performance difference using mean and standard deviation. The interview asked me how to calculate the mean and standard deviation, which I gave. He asked how to compute a certain custom confidence interval, which I responded with an integral of the appropriate density function. He then followed up with why it is reasonable to assume normal distribution, and I answered that because we are running 100 trials (which is a reasonably large to the outcome to ) and quoted the Central Limit Theorem (unfortunately I blanked out on the name of the theorem).
The third and last question was: Suppose you have n different colored balls in a bag. You blindly pick a ball at random, record its color, and put the ball back in the bag. After repeating this 100 times, how many colors are you going to see on average?
I began by pointing out that this depends on n. If n is much larger than 100, then we are likely to see 100 different colored balls. On the other hand, if we have just 2 balls in the bag, then we are almost guaranteed to see two colors. The interview then made the problem more specific by taking n to be 5. I realized then that he wanted a formula for calculating the expectation of this polynomial trial. I proceeded to calculate the expectation but my brain is no longer functioning at the time, and I blanked out for quite a while.
After some brief moments of silence that felt like an eternity, the interview suggested we solve some simpler cases of the problem to see if we can pick up some clues. So we worked out the case of picking just two balls. This was not much of a problem, but I again stumbled to come up with anything precise when we proceeded to three balls. I was definitely not pleased and pointed out the obvious that I am not in my best form right now. The best I could come up with at the time was that some induction together with conditional probability is going to resolve the problem.
Overall, I enjoyed the interview. The interviewer, who is a recent hire by Amazon, is a mathematician himself. I was more than pleased that there were no questions on computer science or operations research. My main setback coming into this interview is my lack of experience with these job interviews. I found myself scatter-brained at times trying to figure out how to answer the question in away the interviewer wanted. I also wish I was faster at solving the problems.
In any case, the ball is now in the interviewer’s court, and I gained some valuable experience. What else can I ask for?
Added April 11, 2012:
I figured out the answer to the last question last night. It just slowly came to me without much conscious effort. Here it is:
Let be the random variable that gives the number of different colors from selections with replacement from a bag of balls. We have that, for all positive integers and ,
where we set . Now multiply both sides by and sum over , we get
where is the expectation of .
A tedious but simple computation gives the recurrence relation
for and the initial condition . The closed form of is easily seen to be the geometric series: