Live data from Hacker News

How to pick a random number from 1-10

torvaney.github.io

161–170 of 183 posts

Re: How to pick a random number from 1-10

#161

> The easy thing to do is to ask someone “Hey, pick a random number from 1 to 10!”. The person replies “7!”. Seven factorial is way bigger than 10. Just kidding, sorry. But what I was actually going to say was, when I read the title of the post, before clicking through, I decided to think of a number myself and I chose the number seven. So it was fun to see that same number in the article. 10% chance in theory and in…

I think most people (or at least those who choose 7, which I definitely used to do) associate 'randomness' with 'uniqueness', and since lots people would consider 7 to be the most 'unique' number between 1 and 10 (When considering things such as divisors and how often they are used), they pick that number as it feels the most 'random'.

My impression is that 37 is a similar outlier if you ask for random numbers from 1-100.

Re: How to pick a random number from 1-10

#162

A few years ago I was stumped by a similar question about generating uniformly random numbers with less than ideal constraints. The helpful minds at MathOverflow solved it [0] but it wasn't something that you could guarantee would always work. (The question explains in more detail... Due to the miniscule probability of a never ending sequence of less than ideal random integers.) I'm curious whether this technique cou…

[deleted]

Re: How to pick a random number from 1-10

#163

There is a simpler solution if you do not mind leaving entropy on the table. Break the people up into groups of two without regard for their selection. If two people provide the same number, ignore them. Otherwise, output "0" if the first person's number is smaller then the second, and output "1" if the first person's number is larger. From this, you have a sequence of uniformly random bits, from which you can constr…

does this algorithm have a name?

https://en.wikipedia.org/wiki/Randomness_extractor#Von_Neuma...

Re: How to pick a random number from 1-10

#164

...or just add up the answers mod 10. This has the property that if even a single person answers uniformly at random, then the final number you compute will be uniformly random, regardless of how everyone else answers.

can you point to me a proof of that property.

I think you need at least one person who is completely independent of all others. For example if the same random is added up twice (say if the room is just you and your evil clone), you can get stuck with just even numbers. Independence is a pretty strong property to ask for since we all share the same biology...

But if you do have independence, the proof is easy! Let S be the sum of everyone else and X be the discrete uniform random in [0, 9]. Then:

  Pr(X + S mod 10 = i) 
    = \sum_j Pr((X + j) mod 10 = i | S = j) Pr(S = j)
    = \sum_j Pr(X = i | S = j) Pr(S = j)
    = \sum_j Pr(X = i) Pr(S = j)
    = Pr(X = i) \sum_j Pr(S = j)
    = Pr(X = i)
Due to total probability, symmetry, independence, and total probability again respectively. The handwaved part is the mod where you can imagine the histogram columns in the pmf getting rotated/shifted around but ending up looking exactly the same afterwards since all columns are symmetrical.

Re: How to pick a random number from 1-10

#165
post #26

Earlier quoted context omitted.

That's pretty good, as long as each person can't hear any of the previous numbers! The article has the same issue, and might even be biased by the second person knowing they're the second person.

Exactly. Not only aren't people random, they're predictable based on history[0]. Each person could only be asked for one number and they shouldn't even wait perceptibly different lengths of time to be asked. [0] http://people.ischool.berkeley.edu/~nick/aaronson-oracle/ind...

I've tried this a few times (refreshing the page in between). After a hundred or so strokes the computer is consistently less than 50%, usually ~45%. Suggesting my brain has somehow spontaneously worked out whatever algorithm it's using to guess. I don't think I'm random but there's something too simplistic about the method on this page.

Re: How to pick a random number from 1-10

#166

> The easy thing to do is to ask someone “Hey, pick a random number from 1 to 10!”. The person replies “7!”. Seven factorial is way bigger than 10. Just kidding, sorry. But what I was actually going to say was, when I read the title of the post, before clicking through, I decided to think of a number myself and I chose the number seven. So it was fun to see that same number in the article. 10% chance in theory and in…

I was going to pick seven as well. Personal guess for why it’s a favorite... 1. I want to signal that I’m creative. If you say “random, between 1-10” picking 5 feels amateur. 2. You said “between 1-10”, which is inclusive of 1 and 10, but you positioned me to not choose the poles with the word “between.” 3. It feels random to iterate through options and settle on one. I iterate by counting up. Since 5 is out, that le…

My guess: it is all about culture. I guess asian people are more likely to choose 8 (lucky number) and avoid 4 (unlucky number).

Re: How to pick a random number from 1-10

#167
The 8500 students are numbered off (assigned id's) from 1 to 10. Then you wait. Your first random number is the ID of the first person who dies. Second random is the ID of second person to die. Etc.

Fairly slow algorithm. And only good for 8500 random numbers. But I think it would give a good distribution.

Re: How to pick a random number from 1-10

#168

Earlier quoted context omitted.

> This has the property that if even a single person answers uniformly at random Has any human ever proven they're capable of this? Generating truly random sequences is more or less impossible for humans AFAIK. (E.g., see https://news.ycombinator.com/item?id=19336754 which challenges you to do just that. Spoiler: you will probably fail miserably.) It's an interesting idea, but in practice I think relying on the assum…

"Just use your free will" https://github.com/elsehow/aaronson-oracle

I found myself reliably beating it just by making the runs of one letter longer than I would naturally if I was just trying to be random.

Re: How to pick a random number from 1-10

#170

> The easy thing to do is to ask someone “Hey, pick a random number from 1 to 10!”. The person replies “7!”. Seven factorial is way bigger than 10. Just kidding, sorry. But what I was actually going to say was, when I read the title of the post, before clicking through, I decided to think of a number myself and I chose the number seven. So it was fun to see that same number in the article. 10% chance in theory and in…

From the Reddit comments someone wrote: "Can't have the evens, they aren't random. 1 and 9 are too close to the outside. 5 isn't random, it's right in the middle! 3 is too low. Leaving 7" It does feel like the type of biased logic that would run through your mind in the moment — interesting to think, if we have such 'fallacies' on simple stuff, what level of blindspots do we have on more complex split-second decision…

Quite a few, anchoring is pretty interesting and can often be completely subconscious.
Post reply on HN