TITLE: Choosing a number between $1$ and $100$, and randomly guessing it. What is the expected value of the number of guesses?
QUESTION [7 upvotes]: I was watching Steve Balmer’s interview and he was talking about questions they’d ask from candidates. This is a question he gave, he says-
I choose a number between $1$ to $100$, the other person has to guess the number. If he gets it right the first time he gets $5$ bucks, if he misses the first time steve tells you whether the number is higher or lower( he does this every time you miss), if he gets it right the second time he gets $4$ bucks, third time $3$, fourth $2$ and so on and if he gets it right in the seventh guess the person has to give a buck to Steve and so on, the value goes decreasing. I am trying to calculate the expected value of this game, how can I solve this, I can’t seem to come up with a way.
P.S. I have edited the question with a slight variation, in the previous version steve doesn’t tell you anything after you have guessed the wrong number.

REPLY [2 votes]: If Steve tells you whether the number is higher or lower then, you will  at most lose a dollar.
Going by the binary approach, you start with 50, worst situation: more numbers on the side which Steve's number is, up you go 75(as 50 on higher side and 49 on the lower side), then 88, then 94, then 97, 99 and finally 98 or 100. Even if you start with 50 and the number is lower than 50, you still pay a dollar at most.
I have arbitrarily chosen the higher end in each case to have equal to or more numbers than the lower end.
Taking this to be the most conservative approach and that you only follow this, if you want to find the average amount gained or lost, find the value for each number (formulate, no need to solve for each) and take average.