Results 1 to 2 of 2

Math Help - Random Number Generation

  1. #1
    Member
    Joined
    Aug 2007
    Posts
    96

    Random Number Generation

    So, the question is to describe a process, using the accept-reject algorithm, that generates values of x with the given distributions, assuming that we can only generate a uniform number

    The one I'm stuck on is x~f(x) proportional to (1+(x^2)/5)^(-3) for 0 =< x =< 4
    I took the derivative, set it equal to zero, but when I solved for x I found that it was the sqrt(-1/5), which I'm pretty sure is incorrect. Does anyone know how I could fix this? Plugging that value back into the original equation does indeed yield a number, but I'm fairly certain I shouldn't be using complex values...

    Thanks!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by mistykz View Post
    So, the question is to describe a process, using the accept-reject algorithm, that generates values of x with the given distributions, assuming that we can only generate a uniform number

    The one I'm stuck on is x~f(x) proportional to (1+(x^2)/5)^(-3) for 0 =< x =< 4
    I took the derivative, set it equal to zero, but when I solved for x I found that it was the sqrt(-1/5), which I'm pretty sure is incorrect. Does anyone know how I could fix this? Plugging that value back into the original equation does indeed yield a number, but I'm fairly certain I shouldn't be using complex values...

    Thanks!
    You are required to use the acceptance-rejection sampling method. You do this by generating two uniform RV x\sim U(0,4),~ y\sim U(0,\text{max}_{x \in [0,4]}(f(x)). Then x is accepted if y<f(x) and rejected otherwise.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Random Number Generation Question
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: April 16th 2011, 02:25 PM
  2. Random Number Generation 1-100 odds
    Posted in the Statistics Forum
    Replies: 4
    Last Post: January 30th 2011, 12:01 PM
  3. Random Number Generation
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: April 25th 2009, 03:59 PM
  4. Random Number Generation
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: February 25th 2009, 09:35 PM
  5. MATLAB - Random Number Generation
    Posted in the Math Software Forum
    Replies: 4
    Last Post: February 18th 2009, 06:03 AM

Search Tags


/mathhelpforum @mathhelpforum