richelbilderbeek / raket

What is the error we make, when nature has protracted speciation, and inference ignore this?
GNU General Public License v3.0
0 stars 0 forks source link

Are sequential seeds correlated? #20

Closed richelbilderbeek closed 6 years ago

richelbilderbeek commented 6 years ago

Run this code:

# If a random number if drawn with one seed,
# how long until it is drawn by differerently seeded
# RNG?
set.seed(2)
value <- runif(n = 1)
set.seed(1)
i <- 0
while (value != runif(n = 1)) {
  i <- i + 1
}  
print(i)

Results:

First seed Second seed Value printed
1 1 0
1 2 Takes too long
2 1 Takes too long

Conclusion: seeds are independent

richelbilderbeek commented 6 years ago

Nope.