PDA

View Full Version : Random Numbers for you math wizzes?


Poker21
06-08-2004, 08:08 AM
Ok heres my question if anyone can answer it. Online sites all claim to be as random as possible without actually being random. There is no way to produce ''absolutely random numbers'' is there?

I play poker online at a few different sites , sit and gos or multitable tourneys mostly, and it seems literally ''to me at least'' and to others ive talked with that, on one particular site, for every 2 times i have a pocket pair at a ten seated table someone else does too, around every 20 hands or so. Is this to be expected with random cards?

Lastly there are numbers that repeat(such as Pi 3.14) and numbers that never repeat aren't there? And if so why can't the numbers that do not be used to generate random numbers?

Dov
06-08-2004, 11:48 AM
First of all, let me start by saying that I am not a math wizard, yet. However, I may be able to shed some light on your problem anyway. If I am mistaken, I trust that one of the real math wizards will set me straight /images/graemlins/wink.gif

First of all, if you have a pocket pair, then there is a higher probability of someone else having one with you. Do you see why?

Secondly, you would have to track a very large number of hands, indeed, to come to any kind of reasonable conclusion about the RNG from just viewing the hands as you see them. You would also need to see all of the hole cards...

To allay your fears, there are many things that will happen with random cards. Some of them include:

Everyone at the table having a PP.
Losing with a K high Straight Flush
Getting sucked out on 7 times in a row - Runner, Runner

These events are unlikely, but not impossible. As a matter of fact, they occur more often than you think. If you really consider the matter, if you play long enough, you are GUARANTEED to experience all of those events and other equally horrific long shot odds.

Thirdly, if they used a known sequence to generate a random number, then the entire deck could be recreated in advance by anyone who knew what number they were using. That doesn't sound very random does it?

For more information about the RNG's used on the online sites, search the forums here. There have been several discussions about them.

BTW - I am not claiming that the RNG's are perfect, but they are much more accountable than live dealers. In addition, they are always under scrutiny and development.

Hope this helps.

Poker21
06-08-2004, 03:21 PM
Thanks for the insight DOV. I greatly appreciate it.

felson
06-08-2004, 04:33 PM
[ QUOTE ]
First of all, if you have a pocket pair, then there is a higher probability of someone else having one with you. Do you see why?

[/ QUOTE ]

That's true, but this effect is tiny, since you only have two cards out of the deck.

By the way, pi is irrational (transcendental, even), so its decimal representation doesn't repeat. But it's still a bad choice for generating a random sequence. And using any other known number for generating a random sequence is a bad idea anyway. As Dov pointed out, using any known formula defeats the purpose of random generation. Also, determining the decimal representation of pi, or sqrt(3), or whatever else, to millions of places is more computationally intensive than it is worth.

brassnuts
06-08-2004, 04:41 PM
[ QUOTE ]
BTW - I am not claiming that the RNG's are perfect, but they are much more accountable than live dealers.

[/ QUOTE ]

You hit the nail on the head here. Cards are much, much, MUCH more randomized online than when a live dealer shuffles the deck. The only very highly unlikely thing to worry about online randomization is if someone has managed to crack the random number generator, but I honestly don't see this happening... ever. It's just all too unlikely that anyone could ever figure out a way to crack this, especially with the limited knowledge of cards seen in play.

Ed Miller
06-09-2004, 01:25 AM
There is no way to produce ''absolutely random numbers'' is there?

Sure you can. Use a Geiger counter, Johnson noise, or any number of other natural random events...

pzhon
06-09-2004, 04:18 AM
[ QUOTE ]
Ok heres my question if anyone can answer it. Online sites all claim to be as random as possible without actually being random. There is no way to produce ''absolutely random numbers'' is there?

[/ QUOTE ]

If there is no outside input, a random number generator can't be perfect, but it may be very good, far better than shuffling a deck by hand for minutes.

Some gaming sites may use outside sources of data. Some may use a physical source of noise or radioactive decays. Others may use the randomness of the requests for numbers from different tables, e.g., the deals you get at Party Poker are not in sequence. I think the risk that physical sources of randomness are implemented improperly may decrease the reliability of those random number generators unless they are combined with strong numerical algorithms.

The bottom line is that it would take gross incompetence by the poker servers to implement a random number generator so bad that you should notice any difference between it and a perfectly random source. You will undoubtedly find clumps and patterns, but you will find the same clumps and patterns in perfectly random numbers.

Suppose that the chance you get AA is not the proper 1/221, but 1/10^10 less. Even this error is much larger than what ought to come from a proper random number generator (but I have not verified any server's RNG). Some people feel that any imperfection means that every hand is tainted. I don't agree. I would say that 9,999,999,999 out of 10 billion hands are not tainted, and then one had is: you are supposed to get AA and don't. If you play for decades, you probably will not hit that one tainted hand, and if you do, you only have the right to complain for the value of one hand. (I hear AA never wins, anyway.)

[ QUOTE ]
for every 2 times i have a pocket pair at a ten seated table someone else does too, around every 20 hands or so. Is this to be expected with random cards?

[/ QUOTE ]

That's only slightly high. Here is a very rough way to estimate this: You have 9 opponents, and a priori, the probability that each one has a pair is 1/17, so the average number of pairs among them is 9/17, about 1/2. If you have a pair, it doesn't affect the probability that each opponent has a pair by much (1/16.781). You should expect the number of pairs to follow close to a Poisson distribution with mean 9/16.781. That takes the value 0 about 58.5% of the time (exp -9/16.781), so if you have a pair, there should be another pair out there about 41.5% of the time.

This type of calculation is actually useful early in PokerStars rebuy tournaments, where many people seem to be willing to call an all-in with any pair. If you have AA, I think you might as well move in preflop because you will get called a large fraction of the time. (I did this with AK twice, and was called by QJo once, and AQo and KQs the other time. I lost those, but won with QQ vs. 66.)

[ QUOTE ]
Lastly there are numbers that repeat(such as Pi 3.14) and numbers that never repeat aren't there? And if so why can't the numbers that do not be used to generate random numbers?

[/ QUOTE ]

.101001000100001... doesn't repeat, but would be a poor source of random numbers. Pi seems to be a better source, but it is not particularly efficient to generate more digits of pi. It takes longer than other algorithms that should work as well or better.

Wake up CALL
06-09-2004, 11:50 AM
[ QUOTE ]
To allay your fears, there are many things that will happen with random cards. Some of them include:

Everyone at the table having a PP.
Losing with a K high Straight Flush
Getting sucked out on 7 times in a row - Runner, Runner


[/ QUOTE ]

If your king high straight flush gets beat and you are playing at least one card from your hand you had better find a different game.

Grivan
06-09-2004, 01:39 PM
board is Th Jh Qh Kh x you have the 9h in your hand someone else has the Ah.

TiK
06-09-2004, 02:32 PM
Pi doesn't repeat...

Also, if you think about it, in live games, you never get a completely random shuffle either, probably much less random than an online 'shuffle'. I think given what we have to work with (live dealers, online pseudo-random-number generators), we'll just have to deal with it. I must agree with a previous poster on this same thread that the one hand online that is not totally random would happen once in millions of hands, which is so rare anyway, that I don't think anybody will notice it happening.

M.B.E.
06-09-2004, 08:45 PM
[ QUOTE ]
Online sites all claim to be as random as possible without actually being random.

[/ QUOTE ]
Online cardrooms do claim their shuffle is truly random. Just look at the "integrity" section of their web sites.

Cazz
06-09-2004, 09:20 PM
In case you haven't seen it before, here is an old article when online poker had poor RNGs Link (http://www.developer.com/tech/article.php/10923_616221_1)

Dov
06-10-2004, 03:48 AM
I was actually thinking of 7 card stud when I wrote that particular line. That actually happened to me once in a casino.

daryn
06-13-2004, 02:02 AM
who says we're talking about holdem?