pseudo-random floating point generator based on mean and standard deviation

This is a discussion on pseudo-random floating point generator based on mean and standard deviation within the C++ Programming forums, part of the General Programming Boards category; Does anyone know of an algorithm that will generate a pseudo-random floating point number based on two parameters - mean ...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145

    pseudo-random floating point generator based on mean and standard deviation

    Does anyone know of an algorithm that will generate a pseudo-random floating point number based on two parameters - mean (average) and standard deviation (the average of absolute distances between elements and the mean)?

    My 10 minutes of Googling doesn't seem to produce anything useful.

    Thanks

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,973
    Take a look at Boost's random number generators, perhaps in particular the one for lognormal distribution.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145
    Thanks.

    I was actually more interested in the algorithm and not finding an implementation. A trip to wikipedia proves it beyond me in terms of math knowledge, though.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21