0
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$ Dec 23, 2009 at 2:18

2 Answers 2

0
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ -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. :-) $\endgroup$ Dec 23, 2009 at 2:19
1
$\begingroup$

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 :)

$\endgroup$

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