What is the seed number in generating random number?

Forums Academic discussion Simulation What is the seed number in generating random number?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2168
    Sara
    Participant

    When I generate a series of random number, I wonder to know the role of seed number. What is the function of seed number and how to set a seed number effficiently? If I want to generate a series of normal distribution, which factors should I consider about when I set a seed number?

    #2174
    Changyue Song
    Keymaster

    Hi, Sara. Random number generator is a program taking a number as an input and producing a ‘random’ number as output (It seems random but actually not). The following equation is an example of a random number generator:

    $$ X_{n+1} = (a X_n +b) \quad mod \quad m $$

    After determination of $ a, b, m$, we can produce a ‘random’ number $X_{n+1}$ by $X_n$. What we need is $X_0$ then we can generate a series of numbers. Here $X_0$ is a seed.

    Generally a seed can be set to any number you like. If you do a simulation which consists of a lot of random number generations, you can repeat the simulation and get the same result by setting the seed to be the same value.

    #2177
    Kaibo Liu
    Keymaster

    Changyue’s answer is correct.

    #2188
    Sara
    Participant

    Than you for your reply. 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Share this post
  •  
  •  
  •  
  •  
Iconic One Theme | Powered by Wordpress