We are generating 5 random numbers for every object we process - this is Java, but the code is pretty easy to follow (docs):
final long millis = System.currentTimeMillis(); final Random random = new Random(millis); inputData.setRandomNumber1(random.nextDouble()); inputData.setRandomNumber2(random.nextDouble()); inputData.setRandomNumber3(random.nextDouble()); inputData.setRandomNumber4(random.nextDouble()); inputData.setRandomNumber5(random.nextDouble());
This means we instatiate new random number generator for every object using milliseconds as seed. We can say that random numbers 1 to 5 are from uniform random distribution.
After we generate random numbers for many objects, will vector of first, second, third, fourth and fifth random numbers (across objects) also form uniform random distribution?