“The expected value is $0.20 (calculated discretely using the code below).”
Ballmer’s interview game pays $5 for guessing his number between 1 and 100 on the first try, less for each extra guess, and costs you once you pass six. He says it is a bad bet. Plain binary search loses $1 on 37 of the 100 numbers but still comes out about 20 cents ahead if he picks at random. Ballmer’s famous interview question rests on arithmetic he got wrong.