Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Warning Long Post: Help Speeding up algorithm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44409] Re: Warning Long Post: Help Speeding up algorithm
  • From: simoncubed at hotmail.com (Simon Cubed)
  • Date: Sat, 8 Nov 2003 04:50:52 -0500 (EST)
  • References: <bofthl$5pq$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Mark Coleman <mark at markscoleman.com> wrote...

> drawing random numbers and random vectors from nonstandard distributions. 
...
> Acceptance-rejection algorithms repeatedly draw a random number from a 
> standard distribution, ...
> Given that one  (obviously) cannot tell in advance how many passes are 
> required to generate a satisfactory random draw, it is not clear to me
> how to code  this more efficiently in Mathematica, ideally without
> the explicit loop. 

See section 2.6 of:
  Rose/Smith, Mathematical Statistics with Mathematica -> pages 72-79. 

At pp.77-79, they specifically discuss the rejection method in Mathematica, 
and how to resolve the 'loop' problem you refer to (in 1 line). Recommended.

Have a good one

Simon


  • Prev by Date: Re: Integration
  • Next by Date: NDSolve question
  • Previous by thread: Warning Long Post: Help Speeding up algorithm
  • Next by thread: Trigonometric math functions