Random values and their probability of reoccuring - MathOverflow [closed] most recent 30 from http://mathoverflow.net 2013-05-23T05:53:23Z http://mathoverflow.net/feeds/question/9572 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/9572/random-values-and-their-probability-of-reoccuring Random values and their probability of reoccuring bnkdev 2009-12-22T23:38:34Z 2009-12-23T00:33:21Z <p>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 <strong>pool of questions was only 3</strong>, 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?</p> <p>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 <a href="http://msdn.microsoft.com/en-us/library/ms190348.aspx" rel="nofollow">NewID() method</a> 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. </p> <p>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.</p> http://mathoverflow.net/questions/9572/random-values-and-their-probability-of-reoccuring/9573#9573 Answer by Michael Lugo for Random values and their probability of reoccuring Michael Lugo 2009-12-22T23:51:39Z 2009-12-22T23:51:39Z <p>Call your three questions A, B, C. </p> <p>The probability that A gets chosen twelve times in a row is 1/(3^12), or 1 in 531441; similarly for B and C.</p> <p>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.</p> <p>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.</p> http://mathoverflow.net/questions/9572/random-values-and-their-probability-of-reoccuring/9575#9575 Answer by liza for Random values and their probability of reoccuring liza 2009-12-23T00:33:21Z 2009-12-23T00:33:21Z <p>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 :)</p>