home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / theory / 2358 < prev    next >
Encoding:
Text File  |  1992-11-08  |  2.8 KB  |  66 lines

  1. Newsgroups: comp.theory
  2. Path: sparky!uunet!destroyer!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!thompson
  3. From: thompson@atlas.socsci.umn.edu (T. Scott Thompson)
  4. Subject: Re: Uniform noise in d-sphere
  5. Message-ID: <thompson.721070817@daphne.socsci.umn.edu>
  6. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  7. Nntp-Posting-Host: daphne.socsci.umn.edu
  8. Reply-To: thompson@atlas.socsci.umn.edu
  9. Organization: Economics Department, University of Minnesota
  10. References: <3655@news.cerf.net>
  11. Date: Fri, 6 Nov 1992 17:26:57 GMT
  12. Lines: 52
  13.  
  14. jcbhrb@nic.cerf.net (Jacob Hirbawi) writes:
  15.  
  16. >In sci.math <1992Nov5.211723.26238@bnlux1.bnl.gov>
  17. >Michael Murphy <murphy@sscdaq.phy.bnl.gov> writes:
  18.  
  19. >> I am trying to compute uniformly random noise inside a d-dimensional 
  20. >> sphere.  I have identified two ways of doing so:
  21. >>
  22. >> [...]
  23.  
  24. >A third method might be the following: use spherical coordinates and
  25. >pick uniform random numbers for each of the coordinates with the appropriate
  26. >ranges. In three dimensions this would be:
  27.  
  28. >   (1) radius  uniform over (0,d)
  29. >   (2) angle1  uniform over (0,2 pi)
  30. >   (3) angle2  uniform over (0,  pi)
  31.  
  32. >This seems to be *too* simple but since I can't think of any point within the
  33. >sphere being more favored than any other point I would think that the 
  34. >distribution is in fact uniform. 
  35.  
  36. This does _not_ produce a uniform distribution since (2) and (3) do
  37. not generate a uniform (on the sphere) distribution of directions.
  38. (In fact, this distribution is given as an example of a paradox of
  39. conditional probability in Billingsley's text "Probability and
  40. Measure.")  Intuitively this is because too much probability is
  41. concentrated at the poles.  (Consider that the value of angle1 is
  42. almost irrelevant if angle two is close to zero or pi.)
  43.  
  44. Also, (1) concentrates too much probability near the center of the
  45. sphere.  (Consider that neither angle matters much if the radius is
  46. close to zero.)
  47.  
  48. One can generate a uniform distribution using a different form of
  49. polar coordiantes, however.  Let t_1,...,t_{d-1} be independent and
  50. uniformly distributed on [0,pi].  Let x_i = cos(t_i).  Let x_d be a
  51. square root of 1 - (x_1)^2 - ... - (x_{d-1})^2.  Flip a coin to decide
  52. whether to take the positive or negative square root.  Then the vector
  53. x = (x_1,...,x_d) is uniformly distributed on the sphere.
  54.  
  55. Now let z be uniform on [0,1] and let r = z^(1/d).  (i.e. downweight
  56. small radiuses so that they get probability proportional to the
  57. surface area of the corresponding sphere.)  Then r*x will be uniformly
  58. distributed on the unit ball in R^d.
  59.  
  60. I don't know how efficient this is, but it clearly dominates rejection
  61. methods for large values of d.
  62. --
  63. T. Scott Thompson              email:  thompson@atlas.socsci.umn.edu
  64. Department of Economics        phone:  (612) 625-0119
  65. University of Minnesota        fax:    (612) 624-0209
  66.