home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / theory / 2351 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  2.2 KB

  1. Xref: sparky comp.theory:2351 sci.math:14497
  2. Path: sparky!uunet!olivea!decwrl!sdd.hp.com!cs.utexas.edu!hermes.chpc.utexas.edu!news.utdallas.edu!corpgate!bnrgate!bnr.co.uk!pipex!pavo.csi.cam.ac.uk!emu.pmms.cam.ac.uk!rgep
  3. From: rgep@emu.pmms.cam.ac.uk (Richard Pinch)
  4. Newsgroups: comp.theory,sci.math
  5. Subject: Re: Uniform noise in a d-sphere
  6. Keywords: Random vector in the hypersphere
  7. Message-ID: <1992Nov6.103034.4045@infodev.cam.ac.uk>
  8. Date: 6 Nov 92 10:30:34 GMT
  9. References: <1992Nov5.211723.26238@bnlux1.bnl.gov>
  10. Sender: news@infodev.cam.ac.uk (USENET news)
  11. Organization: Department of Pure Mathematics, University of Cambridge
  12. Lines: 36
  13. Nntp-Posting-Host: emu.pmms.cam.ac.uk
  14.  
  15. In article <1992Nov5.211723.26238@bnlux1.bnl.gov> murphy@sscdaq.phy.bnl.gov (Michael Murphy) writes:
  16. >
  17. >I am trying to compute uniformly random noise inside a d-dimensional 
  18. >sphere.  I have identified two ways of doing so:
  19. >
  20. [...]
  21. >    
  22. >(2) A faster, although perhaps wrong approach is:
  23. >   1. Choose an arbitrary d-vector 
  24. >   2. Normalize it so it is a point on the d-dimensional sphere
  25. >   3. Multiply this normalized vector by a random number in [0,1]
  26. >      raised to the 1/dth power.
  27. >
  28. >I believe that method two works.  However, when I project a large number of
  29. >points in a high dimensional space (e.g. 25) onto the plane (by ignoring all
  30. >but two coordinates), I get something that resembles a square.  My advisor
  31. >is not so sure that this is correct and I can only give an intuitive
  32. >argument as to why it may be true.
  33.  
  34. What do you mean by "an arbitrary d-vector"?  If you are choosing it
  35. so that the components are, say, uniform on [-1,+1]; i.e. uniformly
  36. in the hypercube, then you are not choosing the random direction
  37. uniformly, i.e.  point on the curface of the hypersphere uniformly: 
  38. there will be more vectors pointing towards a corner of the hypercube.
  39.  
  40. Try this.
  41. Let V(r,d) be the volume of the d-dimensional hypersphere of radius r.
  42.  
  43. Procedure to pick a random vector (x_1,...x_d) in the d-dimensional 
  44. hypersphere of radius r.
  45. 1.  Pick x_d in [-r,+r] by choosing an element from the distribution
  46.     with density V(x,d-1)/V(r,d) dx at x.
  47. 2.  Recursively generate (x_1,...,x_d-1) in the (d-1)-dimensional 
  48.     hypersphere of radius sqrt(r^2 - x^d^2).
  49.  
  50. Richard Pinch
  51.