Sample Interview Questions

Home   /   Sample Interview Questions   /   Biochemistry



Hi guys, this is Adriaan. I study Maths at Oxford and today I’ll run through a very quick Maths interview question. This is the context. You play a game with a coin and the coin is not necessarily fair. By that what I mean is the probability of throwing a head and a tail is not both a half. If you throw a head, you get one £1 and you get to continue so you throw again, if you throw a tail, you get nothing and the game ends. The interview question is essentially what is the expectation, what is the average amount of money that you are going to get from this game. I will start by introducing some variables. I’ll let H be the probability that you throw heads and I’ll let T be the probability that you throw tails. Of course H plus T is 1. 

I have to recall the definition of expectation. I’ve written it down here. So the expectation is defined to be the amount of money you can get in some case, times the probability of getting that amount of that money and you sum for each possible outcome. So in this case, the outcomes will just be the amount of money you get and these will be integers. So you can get £1, you can get £2, £3, £4. So in this case, the amount of money, I’m summing the amounts of money from let’s say i equals 0 to infinity. 

If you are a bit confused by the summation notation with the sigma, I’ve also written it out like this. It’s just 0 times the probability of me getting 0. 1 times the probability of me getting 1 plus 2 times the probability of me getting 2 and you continue this on so it’s an infinite sum to infinity. Now I have to actually start finding these probabilities. So what’s the probability of you getting 0. Well there’s only way to get a £0 in the game total. That’s if you throw a tail right away. So your first throw is a tail. The probability of that happening is just t. So the first term is 0 times t. The second term we are gonna get 1 times the probability of getting 1 well there’s only one way of getting 1. You have to throw a one head and a tail right after that. So then we get h times t then what’s the probability of getting 2. That’s to throw two heads and then a tail. So it’s going to be h2 times t. If I introduce one more term, we have 3 times
h3t and this is sum to infinity so this continues forever.

So we’ve reduced this relatively complicated problem to just as infinite sum. But how are you going to evaluate this sum. Well the first term is just zero so let’s just get rid of it. So we have ht+2h2t+3 h3t+ I’ll write next term 4h4t and this sum continues forever.

The problem is now just how would you evaluate such a sum. It looks like a little bit like a geometric sum because you are getting an h here h2 here, h3, h4. So it’s like a power going up. But it also looks like an algebraic sum because you have a 1 here, 2 there, 3 there, 4 there. There isn’t actually a rule for this kind of sums you gonna have to derive it. This is really the crux of the interview question.

So how do you approach this. Well first you can try to factor something out. So, let’s see. Is there a common term here? There’s an h here, an h here, there’s an h in all these terms. And so there is a t here as well. So if I factor out an ht, I get 1+2h+3h2+4h3and this continues for ever.

It doesn’t really help you that much because there is still some of the formats that were before. It looks a little bit like geometric sum and a little like algebraic sum. This is the most difficult part of the interview. You have to see a trick to evaluate this sum. How do you do such a thing. The intended method, I’ll just give it to you here but be aware that you would have much more time to think about this and you might get some hints in the interview as well. 

It’s to recognize that this thing in the bracket looks like a derivative because if I differentiate h with respect to h, I get 1, if I differentiate h2 with respect to h, I get 2h, if I differentiate h3 with respect h, I get 3h2. This is the derivative of h+h2+h3+h4 and this continues forever. This is the idea. So I’m gonna write this in this form. Now you have a bracket you can recognize this sum you can do. If I have move this up a little bit, I have ht, now this is geometric sum. So I’m gonna have d/dh; the rule for this is u1 divided by 1-r. So u1 in this case is h and the common ratio is h. That’s a form you have to know. The interviewer will probably give it to you if you can’t think of it. That’s just a standard formula that hopefully you will know from high school. 

Now we are almost done. We can just use the quotient rule on this to differentiate this. So d/dh shall be quote we take the derivate of h with respect to h which is just 1; 1 times 1-h minus derivative of this with respect to h, is just –(-1) times h over all these and we square this. This is just the quotient rule.

Now I would like to simplify this a little bit. So we have ht{(1-h)-(-)1)h/(1-h)2}. This just becomes ht(1/(1-h)2) which is just ht/(1-h)2 and that’s the answer you are looking for.

Now we could think about what this really implies. So if we remember that t was 1-h. h(1-h)/(1-h)2 = h/(1-h). This is really the ratio of the probability of heads to 1-h which is t. So if we write this h-t means the expectation which is the ratio of the probability of heads probability of tails. Particular, if we have heads and tails both equal to 1/2 so if we have fair coin, this just becomes 1. So if you had a fair coin, the average amount of money you would make from this game is £1.

For the rest of your interview you might be asked some implications with this. You might be asked for instance to draw graph of this if we just do this roughly and quickly. If I have here my expectation and here my h, my graph is going to look something like, it’s gonna have 0 here because it’s h on 1-h so if we have h being 0, the whole thing becomes 0; if h becomes 1, we have an asymptote, so we just draw this up. Turns out that graph, it would take a little longer to figure out but in turns out the graph looks a little bit like this which makes sense. So it’s just worth mentioning that in the real interview, you would have 20 minutes. I did this question very quickly in a few minutes so in an interview, you would have a little bit more time and maybe your interviewer would give you some hints as well, especially things like defining h and t instead of just leaving t as 1-h. That kind of stuff helps the algebra a little bit but it’s difficult to see that coming. So presumably your interviewer would give you a hint; so don’t be alarmed by how quickly I did it. You would have probably about 3 times as much time that I took on it in your interview. And I hope that helps.