Random Number Generator | Follow the Rules!

Click For Summary
The discussion centers around the concept of choosing a random number and the inherent biases that come with it. Participants express skepticism about the ability to truly select a random number, noting that psychological factors influence choices, leading to non-random distributions. Commonly favored numbers, such as 3 and 7, are highlighted as examples of this bias. Various methods for generating random numbers are shared, including using the current time or random number generators, but many participants question their effectiveness, suggesting that even these methods can be biased. The conversation also touches on statistical analysis, with references to chi-square tests and the expectation of uniform distributions in truly random scenarios. Ultimately, the thread reflects on the complexities of randomness and the challenges of achieving it in practice, emphasizing that human tendencies often skew results away from true randomness.

Choose a random number.


  • Total voters
    93
  • #31
I let Mathematica choose for me:

Code:
In[1] := RandomChoice[Range[20]]

Out[1] := 13
 
Physics news on Phys.org
  • #32
Mathematica is Unlucky!
 
  • #33
AUMathTutor said:
Ironically, the human one seems to be more "random" than the pseudorandom one.
This leads me to think that people are cheating.

Run your program more times then.

Eventually it should yield an instance that agrees with 30 physicists typing on keyboards selecting numbers between 1 and 20.

When you document congruence, you will have your proof that it must be random.
 
  • #34
flatmaster said:
Mathematica is Unlucky!

Haha, anyone can generate a random choice from this list using Wolfram|Alpha, just type in:

Code:
RandomInteger[20]

or

Code:
Floor[20 Random[]]+1
 
  • #35
A rare thing happened at work today. Every month we have birthday cake to celebrate everyone born in that particular month. Today we had cake, but it turned out that none of the 66 employees in our building had a June birthday (the odds against that happening are about 311-1).

Coincidently, the music to "Happy Birthday to You" was written by Mildred J. Hill, who was born in June and died in June. (With no birthdays to celebrate, we had to do something while we ate our cake, so we had birthday trivia.)
 
  • #36
BobG said:
(With no birthdays to celebrate, we had to do something while we ate our cake, so we had birthday trivia.)

Apparently so.

Happy Birthday Mildred then.
 
  • #37
BobG said:
A rare thing happened at work today. Every month we have birthday cake to celebrate everyone born in that particular month. Today we had cake, but it turned out that none of the 66 employees in our building had a June birthday (the odds against that happening are about 311-1).

About 288:1 based on the number of days in that month and that month's frequency:
http://www.maa.org/mathland/mathtrek_11_23_98.html
 
Last edited by a moderator:
  • #38
I just wiggled my mouse around wildly with my eyes closed and picked the radio button closest in vertical position to where it stopped at. 6!
 
  • #39
since the talk is about [bizarre] numbers, did you ever felt like you’ve been chased by a number! sounds funny I know, but I mean [personally], where ever I look, I see the number 42, the time is always [something:42], my academic number was 42, every film I watch points out that number [like, street 42, apartment 42…], what makes this more creepy to me
now, is the number I picked randomly here is 6, unlike the number I would like to pick which is 7…



but hey 6*7=42
 
  • #40
Start another thread, exactly the same but ask people to "choose a non-random" number then subtract that distribution from this one and you have a random distribution. easy
 
  • #41
6, 16,
 
  • #42
QuantumPion said:
I just wiggled my mouse around wildly with my eyes closed and picked the radio button closest in vertical position to where it stopped at. 6!

Not random at all. Most likely you ended around the starting position, where your hand was at rest.
 
  • #43
CRGreathouse said:
About 288:1 based on the number of days in that month and that month's frequency:
http://www.maa.org/mathland/mathtrek_11_23_98.html

Interesting, I believe I have seen similar list of birth frequencies for Poland back in eighties, and there was a surge around April/May, that is, 9 monts after summer vacations. Could be these were data before contraception became reasonably available here.
 
Last edited by a moderator:
  • #44
Borek said:
Not random at all. Most likely you ended around the starting position, where your hand was at rest.
It is more random than the rest of us.
 
  • #45
DaveC426913 said:
It is more random than the rest of us.

I'm not sure of that. When the sequence of numbers remains in the same order, and you have some sense of how much you're moving the mouse up and down, you're pretty likely to land quite close to where you intended to land.
 
  • #46
drizzle said:
since the talk is about [bizarre] numbers, did you ever felt like you’ve been chased by a number! sounds funny I know, but I mean [personally], where ever I look, I see the number 42, the time is always [something:42], my academic number was 42, every film I watch points out that number [like, street 42, apartment 42…], what makes this more creepy to me
now, is the number I picked randomly here is 6, unlike the number I would like to pick which is 7…



but hey 6*7=42

If you drill a hole from the North Pole, through the center of the Earth to the South Pole, and then drop a ball into the hole, how many minutes will it take for the ball to reach the surface at the South Pole (disregarding any friction from the air, etc)?

Why was the Mad Hatter mad?

(Just trying to fuel your obsession).
 
  • #47
BobG said:
If you drill a hole from the North Pole, through the center of the Earth to the South Pole, and then drop a ball into the hole, how many minutes will it take for the ball to reach the surface at the South Pole (disregarding any friction from the air, etc)?

Why was the Mad Hatter mad?

(Just trying to fuel your obsession).


:cry::cry::cry:
 
  • #48
Moonbear said:
I'm not sure of that. When the sequence of numbers remains in the same order, and you have some sense of how much you're moving the mouse up and down, you're pretty likely to land quite close to where you intended to land.
Yeah, I'm not saying it's a good method - but just picking a number can't be a good method either. I picked 1. How could that be random?
 
  • #49
Still working on my number, so far I'm up to the 247th digit.
 
  • #50
How can you really pick a random number? It seems like most of the methods we've been using are biased.

My random number generator was biased. Wiggling the mouse around is biased. Taking the time and doing a modulus is biased.
 
  • #51
AUMathTutor said:
How can you really pick a random number? It seems like most of the methods we've been using are biased.

My random number generator was biased. Wiggling the mouse around is biased. Taking the time and doing a modulus is biased.

Yep.
 
  • #52
My guess was that, given the numbers 1-20, two digit prime numbers would intuitively and disproportionally be preferred as "random." Two digits numbers because they are more diluted over their implied range than one digit numbers (here 10-20 recalls 10-99), and prime numbers because we are less accustomed to using their factorization (thus evoking fewer interrelations than composite numbers on this list).

Just a guess.
 
  • #53
How about this for a fair random process?

You grab a handful of sand. You then count how many grains of sand there are. Take the number and the remainder after dividing it by 20 should not be biased.

Here's my reasoning: the bounds aren't fixed on how many grains there can be. This means that there is no inherent bias in the range of values. You will usually get many more than 20 grains of sand, so the part that's actually deciding the outcome is sufficiently masked.

Are there problems with that?
 
  • #54
Lol, just picked 10. Was thinking if I should force myself to pick a different number... I was thinking instead of 10 I should go for 1. Instead I just stuck with 10. I don't think it was random though... does 'random' actually occur in reality?
 
  • #55
Sorry! said:
does 'random' actually occur in reality?

A far as we know - yes. How long does it take for a radioactive atom to decay?
 
  • #56
Borek said:
A far as we know - yes. How long does it take for a radioactive atom to decay?

22 minutes
 
  • #57
And the next one?
 
  • #58
Borek said:
And the next one?

Gosh, everyone knows about half-life, right? 11 minutes!
 
  • #59
AUMathTutor said:
How about this for a fair random process?

You grab a handful of sand. You then count how many grains of sand there are. Take the number and the remainder after dividing it by 20 should not be biased.

Here's my reasoning: the bounds aren't fixed on how many grains there can be. This means that there is no inherent bias in the range of values. You will usually get many more than 20 grains of sand, so the part that's actually deciding the outcome is sufficiently masked.

Are there problems with that?

That would probably be pretty random...if you felt like sitting around counting grains of sand in a lot of handfuls of sand.

I want to offer some food for thought while we're playing with this thread. Statisticians love to tell people that assigning subjects to experiments needs to be done randomly. This is supposed to eliminate bias. But, does it?

Say I'm doing a study on some magic weight loss pill and am assigning volunteers for my study to one of two groups, magic weight loss pill or placebo.

I could choose to assign them to groups on some random basis (perhaps using a random number generator and all the odds go to one group and evens to another), or I could choose to put constraints on the group assignments that make it non-random, such as ranking their weights at start of the study and then matching pairs of similar weight people one to each group to get two similar (if not equal) sized groups with a similar distribution of weights of subjects in them.

At the end of using random assignments, I might end up with many more people in the placebo group and those assigned to the magic weight loss pill group might be all my most obese subjects who have a lot of weight to shed compared to my placebo group that has such skinny people they couldn't shed weight no matter what diet they were on.

Which is less biased?
 
  • #60
Moonbear said:
Statisticians love to tell people that assigning subjects to experiments needs to be done randomly.

Not necesarilly. You may select your sample so that it is representative of the population and as random as possible within constrains.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 21 ·
Replies
21
Views
6K
Replies
15
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 21 ·
Replies
21
Views
2K