home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / sci / math / stat / 1695 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  903 b 

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!usc!orion.oac.uci.edu!network.ucsd.edu!sdcc12!cs!whart
  2. From: whart@cs.ucsd.edu (Bill Hart)
  3. Newsgroups: sci.math.stat
  4. Subject: Generating a set of random bits
  5. Message-ID: <36984@sdcc12.ucsd.edu>
  6. Date: 18 Aug 92 22:46:06 GMT
  7. Sender: news@sdcc12.ucsd.edu
  8. Lines: 14
  9. Nntp-Posting-Host: roland.ucsd.edu
  10.  
  11. I have an application for which I need to generate a random 'vector' of 
  12. bits of length N.  I have looked at stuff in Numerical Recipies for
  13. generating a random sequence of bits, but it remains unclear whether
  14. such a generator would be appropriate for generating a random
  15. vector of bits.
  16.  
  17. I need/want to have the distribution of vectors remain 'random'.  Right
  18. now I'm generating a random float in [0,1> and testing to see
  19. if it is less than 0.5 or not.  This works, but I'm sure there is
  20. a better way of doing this.
  21.  
  22. Any ideas or pointers?
  23.  
  24. --Bill
  25.