Results 1 to 40 of 79

Thread: Random BigInteger

Threaded View

  1. #35
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Random BigInteger

    Quote Originally Posted by dunfiddlin View Post
    There is no test for randomness, more or less by definition. All combinations of values being equally probable how could you decide which series of the following is random?

    12345
    35142
    33333
    24242

    Any 'pattern' you detect is entirely a product of your brain's maddening inability to see anything without imposing a pattern on it. As it is, we know for certain that any computer generated random series is only ever pseudo-random and that applies to this multiple random byte process just as much as to a simple dice simulation. But the point is that you cannot tell the difference. This is why it's very difficult to be certain that dice are loaded or roulette wheels weighted. Even after a large sample you can never say with complete certainty that any series of results, no matter how suspicious, cannot arise from a random selection process.
    My point was that there are some accepted tests for pseudo randomness, and that I performed none of them using any code I have posted in this thread.

    edit: So I ran it with min =1 and max = 7. It was consistently wrong in that it generated significantly more 3's and 4's. Here is a typical run:

    Code:
    		(1)	12448	Integer
    		(2)	12450	Integer
    		(3)	25168	Integer
    		(4)	24798	Integer
    		(5)	12558	Integer
    		(6)	12578	Integer
    Last edited by dbasnett; Nov 2nd, 2012 at 11:40 AM.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width