Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

The Wiki is wrong?

In this article, the wiki says:

for _ = 1, 10 do
	print(math.random(100))
	wait(1)
end

"Test the place, and look at the output window. Write down the numbers you get, and exit the test. Then do the test again, and again write down the numbers you get. Notice something weird? Those 10 very random numbers are similar everytime you run a test (or play online for that matter)."

But this isn't true. In my first test, I got the numbers 36, 48, 52, 88, 2, 78, 10, 100, 15, 17. In my second test, I got 15, 79, 43, 47, 24, 99, 21, 70, 85, 100.

I don't see the sameness the wiki is talking about.

3 comments

0

So why was this downvoted??? All the guidelines are followed.

0

No idea, but i'll upvote it for you.

0

I upvoted to be fair.

2 answers

✓ Accepted answer

The numbers that Random will give are not very similar but fall in a similar range. Notice how you have many numbers less than 25 and many numbers between 70 and 85? This is because Random gives back similar numbers. The numbers won't be exact and not all numbers will follow this pattern but it is noticeable that quite a few will.

1 comment

0

100 isn't a very large sample size either. The trend is a lot more obvious as the sample size increases.

The reason why some of the "random" numbers match is because roblox has a pseudo randomizer, nothing cannot be perfectly random according to this video. So there IS actually supposed to be some pattern, for example, if you had to choose a random number 1-10, 7 would be the most choosed. 1 and 10 would not likely be chosen since it is at the end, even numbers are probably not going to be chosen, same with 5 since it is in the middle, and people are most likely to chose a prime number. 3 is too small and so 7 is left. One time I did math.random is returned, 7 then 5 then 2. 7-5 is 2, or I got 1 then 10 after I did math.random(1,10). You might be thinking it's nonsense but pretty much everything has a pattern!

This discussion is preserved as it was. New answers, comments, and votes are closed.