MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a web application that prompts users to answer a question when the computer they are using is not recognized. A user complained today saying she is always prompted for the same question. I explained to her that the pool of questions was only 3, so the likelihood of her being prompted for the same question was high, can some of you guru's tell me what the exact probability is?

We have the questions the user has set up (3 questions) stored in a database. When choosing which question to display, the developer who initially wrote the code invokes the TSQL NewID() method which gives him three unique identifiers, he sorts these random guids in ascending order and returns the first question associated with the top most guid.

Is it possible for me to provide the probability of to this person of her question being repeated constantly? She said she has been prompted for the same challenge question 12 times in a row. I just want to prove it mathematically.

share|cite|improve this question

closed as too localized by Scott Morrison Dec 23 '09 at 2:16

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Sorry, closing as "not of interest to mathematicians". Unfortunately, unlike Stackoverflow for programming, we're not open to all questions about mathematics. Please consult the FAQ. Also, -1 to all the answers, for answering instead of flagging for moderator attention. – Scott Morrison Dec 23 '09 at 2:18
up vote 0 down vote accepted

Call your three questions A, B, C.

The probability that A gets chosen twelve times in a row is 1/(3^12), or 1 in 531441; similarly for B and C.

The probability that some question gets chosen twelve times in a row is thus 3/(3^12), or 1/(3^11), or 1 in 177147.

Personally, I think this seems like low enough a probability that if you knew for sure it actually happened, I'd be suspicious that your code isn't doing what you think it does. But it's also possible that your user really didn't get this question 12 times in a row and is just misremembering.

share|cite|improve this answer
-1, sorry to downvote, but this question was clearly inappropriate on mathoverflow, and we'd prefer that you flag such for moderator attention rather than answering. Flame me on meta if you think I'm being an idiot. :-) – Scott Morrison Dec 23 '09 at 2:19

I agree with Michael's answr with one reservation. If you application has many users (say a million) there is a very strong chance that at least one of them would see what you describe - even with no bug :)

share|cite|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.