[Math] Calculate the probability of guessing a random number between 1 and 100

probability

Suppose we have 6 chances to guess a random number between 1 and 100, then it's obvious that the probability of getting the correct answer is $\frac{6}{100}$. Now suppose that after each guess the player can obtain a feedback telling him whether the guess is too low or too high. Considering two situations: 1) the player is smart enough that he will do "bisection" based on the feedback (first guess 50, if too low, second guess 75…), or 2) the player isn't that smart, based on the feedback he still gives a random guess (first guess 40, if too low, second guess 41…). Then what's the probability of getting the correct answer respectively?

Best Answer

Your first guess is just one number. For the second guess, you have two numbers that you will get correct depending on the high or low of the first. For the $n^{th}$ guess you have $2^{n-1}$, so after $6$ guesses you have had the possibility of guessing $63$ numbers. Assuming your opponent chooses his number uniformly, your chance of guessing it is $\frac {63}{100}$

Added: I assumed the player was smart enough to keep the guesses far enough apart so there is room for the strategy to play out. If the player randomly picks among the numbers that are still available, I think you would have to simulate it. I don't see an easy way to calculate it.

Related Question