November 21st, 2006, 10:40 pm
A good old problem from an interviewer: Suppose there is a fair coin flipping game, which will be repeated for 100 times. A gambler bets $1 each time, collects $3 dollar if it shows a head and loss the bet if it shows a tail. Gambler A bets at every single round, what's his expected return? Gambler B has a bankroll of $50, will his expected return be the same, greater or smaller than that of A? Fairly standard stuff.....I answered the question, the interviewer followed up.... Now, I give you a computer how can you evaluate the expected return of B precisely. Exhausive search: too slow, Monte Carlo simulation: not precise enough; then I took out a pen, tried to simplify the problem a bit (e.g. see if reflection principle may help etc)... but, right at that point, the interviewer said I should not make things more complicated than it should: there should exist an easy programming solution (not analytical one). I got stuck. Any idea how should I calculate that?