+ Reply to Thread
Results 1 to 5 of 5

How to generate the standard normal random vaiables from LCG method

  1. #1
    Registered User
    Join Date
    09-29-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Red face How to generate the standard normal random vaiables from LCG method

    Second time to post here, and I hope if there could be anybody give me some help, I'd appreciate that very much!

    Because of the RAND() in excel is unable to replicate the results, so my assignment is to use the LCG(Linear Congruential Generator) with parameters c = 5100, d = 1251, m = 9999, and the seed is u0=500 to generate 1000 numbers as u(1) to u(1000).
    so ,in the LCG function, it u(k) = (c*u(k-1) + d) MOD m , so 0<=u(k)<=m-1=9998. Then devide the u(k) by m, assigned as t(1) to t(1000),
    so 0<= t(i) <= 9998/9999. And in my sequence, there is a t(i) = 0 which is possible. But, how could we use these t(i) to generate the associated stadard normal random variables, which is Norm.s.inv(t(i)) if there's a t(i) = 0 ?? How should I modify these t(i) generated from LCG function to generate standard normal random variables ???

    Plz give me some help, or any comments.I appreciate for your kindness.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How to generate the standard normal random vaiables from LCG method

    which is Norm.s.inv(t(i)) if there's a t(i) = 0 ??
    =NORMSINV(1 - t(i))
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-29-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: How to generate the standard normal random vaiables from LCG method

    Thanks, but when t(i) = 0, 1-t(i) =1, Norm.s.inv(1) would result a invalid value ,too . Right?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How to generate the standard normal random vaiables from LCG method

    Ah, true.

    How about adding an epsilon?

    =normsinv(t(i) + 1e-307)?

    What's the purpose of the whole exercise? I can't see what you could learn by this.
    Last edited by shg; 10-06-2012 at 10:05 AM.

  5. #5
    Registered User
    Join Date
    09-29-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: How to generate the standard normal random vaiables from LCG method

    Hi, Mr.shg, have you ever used @Risk, could you help me out with this problem I posted? Thanks very much.

    http://www.excelforum.com/excel-gene...obability.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1