Random Number Generator | Follow the Rules!

AI Thread 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
  • #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.
 
Physics news on Phys.org
  • #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.
 
  • #61
Before I chose my answer, I looked at the poll results, then chose the number that had the most votes at the time...
 
  • #62
Doesn't quantum cryptography use pure random numbers (based on HUP)?
 
  • #63
russ_watters said:
Before I chose my answer, I looked at the poll results, then chose the number that had the most votes at the time...

I did quite the opposite.
 
  • #64
Yeah baby! My random number's winning! Woo hoo! Way to go, yeah!
 
  • #65
I'm kind of disappointed in my random number. I kind of like monogamous relationships with my numbers.
 
  • #66
BobG said:
I'm kind of disappointed in my random number. I kind of like monogamous relationships with my numbers.

It was bound to happen.
 
  • #67
Hey, wait, why are we obsessing about how we choose the number? As I interpret the poll instructions, "choose a random number", the OP has provided a list of random numbers that we are to choose from in any manner we see fit.

Now if the instructions had said "Randomly choose from the following list of numbers", that would be a different story.

:biggrin:

p.s. in all seriousness, I have picked 7 using Excel's random number generator.
 
Last edited:
  • #68
Redbelly98 said:
Hey, wait, why are we obsessing about how we choose the number? As I interpret the poll instructions, "choose a random number", the OP has provided a list of random numbers that we are to choose from in any manner we see fit.

Ooh, nice catch. The ambiguity here could destroy the integrity of the results. We'll have to create an independent commission to investigate further
 
  • #69
Office_Shredder said:
Ooh, nice catch. The ambiguity here could destroy the integrity of the results. We'll have to create an independent commission to investigate further

We'll need a Random Number Czar then to mediate.
 
  • #70
Redbelly98 said:
Hey, wait, why are we obsessing about how we choose the number? As I interpret the poll instructions, "choose a random number", the OP has provided a list of random numbers that we are to choose from in any manner we see fit.

Now if the instructions had said "Randomly choose from the following list of numbers", that would be a different story.

:biggrin:

p.s. in all seriousness, I have picked 7 using Excel's random number generator.

Office_Shredder said:
Ooh, nice catch. The ambiguity here could destroy the integrity of the results. We'll have to create an independent commission to investigate further

LowlyPion said:
We'll need a Random Number Czar then to mediate.

:smile: This is why I love PF and the people here so much. :biggrin:

Wow, there's a cluster of mentors all in the middle. Integral is the only mentor who broke away from the pack. Contributors seem to be more independent thinkers, with numbers chosen throughout the range. :biggrin:
 
  • #71
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?
Is "fine granular stuff from a burst stress ball" an acceptable substitute for sand?
 
  • #72
As long as you don't use all of it... maybe?
 
  • #73
My probability is a little rusty. What sort of discrete probability distribution would theoretically be expected here considering it was truly random? Poisson Distribution? A Bayesian analysis could tell us the probability that this data is actually a random distribution. Might do that later.
 
  • #74
flatmaster said:
My probability is a little rusty. What sort of discrete probability distribution would theoretically be expected here considering it was truly random? Poisson Distribution? A Bayesian analysis could tell us the probability that this data is actually a random distribution. Might do that later.

If it was truly random, a uniform distribution would be expected, would it not?
 
  • #75
qntty said:
If it was truly random, a uniform distribution would be expected, would it not?

For a sufficently large number of votes, it obviously would. However, for a small number of votes, there are outliers. Consider the first vote as your only data. A frequentist prospective would say that a random number between 1 and 20 is defined as that number.
 
  • #76
EnumaElish said:
Is "fine granular stuff from a burst stress ball" an acceptable substitute for sand?
:smile:
 
  • #77
Code:
my @numb = (1 .. 20);

my $num = int(rand(19));
print @numb[$num];
Perl does it for me. I got 9.

EDIT: This is what I get for approaching a simple problem with a solution already in my mind. It might make more sense to just print $num and ditch the array... :P
 
Last edited:
  • #78
So, how do you know a number is generated randomly? Wouldn't even a so-called random number generator need to have some sort of rules to generate the numbers?
 
  • #79
Moonbear said:
So, how do you know a number is generated randomly? Wouldn't even a so-called random number generator need to have some sort of rules to generate the numbers?

A computer cannot generate pure random number. What computer generates is a pseudo random number. For most of the random number applications, pseudo random numbers are more suited than pure random numbers. Pure random numbers have very little applications.
 
  • #80
jobyts said:
A computer cannot generate pure random number. What computer generates is a pseudo random number. For most of the random number applications, pseudo random numbers are more suited than pure random numbers. Pure random numbers have very little applications.
You can start with a seed rather than using a system-generated randomizer.
 
  • #81
jobyts said:
A computer cannot generate pure random number. What computer generates is a pseudo random number. For most of the random number applications, pseudo random numbers are more suited than pure random numbers. Pure random numbers have very little applications.

So, still, how would you know if a number WAS a pure random number? Where do they come from and how would you recognize them?
 
  • #82
Moonbear said:
So, still, how would you know if a number WAS a pure random number? Where do they come from and how would you recognize them?

Maybe using a natural process which is random, like the decay of an atom. If there's geiger counter connected to a computer, and tracks the delay between individual decays.

There are also tests for randomness which may give a pretty good idea of how random a sequence of numbers generated by a pseudo-random number generator are (although, these can easily fail). In fact, in my senior thesis, I have to perform a lattice monte-carlo simulation, and the pseudo-random number generator I use has a period of 219937-1
 
  • #83
flatmaster said:
My probability is a little rusty. What sort of discrete probability distribution would theoretically be expected here considering it was truly random? Poisson Distribution? A Bayesian analysis could tell us the probability that this data is actually a random distribution. Might do that later.

If it was truly random, you'd expect a uniform distribution.

If you ask humans to pick a random number from 1 to 20, you'd expect a spike at 17. 37 is an even more popular random number than 17 if the range is 1 to 100. The favorite random number from 1 to 10 is 7.

The question was asked to a non-typical audience. Some of the responders seem more proud of how they picked their random number than they are of the number they picked.
 
  • #84
We have 87 responses so far, and the chi-square value, 94.63, is below the 95% threshold of 108.65.

We're still random!
 
  • #85
2 seems rather unpopular in this poll so far (1 out of 88 responses, 1.1%)
 
Back
Top