Probability of guessing a number correctly in x guesses?

  • Thread starter Thread starter moonman239
  • Start date Start date
  • Tags Tags
    Probability
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
5 replies · 5K views
moonman239
Messages
276
Reaction score
0

Homework Statement


Suppose that Amy tells Bob to guess the number she's thinking of. This number can be anywhere between 1 and 100. Amy allows Bob as many guesses as he needs. Each time Bob randomly guesses the number, Amy tells him whether his guess is too low, too high, or correct.

Given that information, what is the probability that:

1) it will take Bob at most 6 guesses
2) it will take Bob at most 30 guesses

Homework Equations


The Attempt at a Solution



Well, this is not really a solution, but let me tell you what I know about the problem so as to help someone give me a solution: The probability of guessing the number correctly changes, because Bob will always change his guess based on Amy's clues. For example, if Bob guesses 36, and Amy tells him that guess is "too high," Bob then knows that Amy's number is somewhere between 1 and 35. Then the probability of guessing the number correctly is 1/34.
 
Last edited:
Physics news on Phys.org
The best thing Bob can do is "bisect". That is, guess "50" to start with then, being told "too high" or "too low", guess the middle of the remaining segment of numbers. The crucial point is that 27= 128> 100. Think about what the tells you.
 
HallsofIvy said:
The best thing Bob can do is "bisect". That is, guess "50" to start with then, being told "too high" or "too low", guess the middle of the remaining segment of numbers. The crucial point is that 27= 128> 100. Think about what the tells you.

Bob doesn't want to "bisect," he likes randomly guessing the number.
 
moonman239 said:
Bob doesn't want to "bisect," he likes randomly guessing the number.

But you said Bob uses the "too high" or "too low" clues, so it is safe to assume he isn't guessing randomly. He is using information he learns. If he actually guesses randomly each time it might take 100 or even more guesses. Think again about the hint Halls gave you.
 
The problem says, "Each time Bob randomly guesses the number, Amy tells him whether his guess is too low, too high, or correct." Randomly guesses.

So assume that Bob guesses totally randomly bounded by his understanding of the solution space (the minimum and maximum it could be), and that Amy has chosen a border case number like 1. Amy chooses 1. Bob unluckily guesses a number N1 between 1..100. Amy probably says "too high." Bob guesses a new number N2 between 1..N1.
 
Adam D said:
The problem says, "Each time Bob randomly guesses the number, Amy tells him whether his guess is too low, too high, or correct." Randomly guesses.

So assume that Bob guesses totally randomly bounded by his understanding of the solution space (the minimum and maximum it could be), and that Amy has chosen a border case number like 1. Amy chooses 1. Bob unluckily guesses a number N1 between 1..100. Amy probably says "too high." Bob guesses a new number N2 between 1..N1.

Yes, thank you. Sorry for bumping a month-old thread. Will somebody please answer my question?