Live data from Hacker News

How to pick a random number from 1-10

torvaney.github.io

71–80 of 183 posts

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

#71

...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.

> ...or just add up the answers mod 10.

This is how my board game groups pick the first player.

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

#72
If I had to generate a random number I would do this:

As I ask each person I cycle a secret number through 0-9 in my head. (I increment mod 10 after I ask each person)

When I ask I get their answer, I secretly add my secret number modulo 10 (and consider 0 === 10) and record this in secret.

Then record a tally for each number, the one with the most wins.

This assumes the asked people will not know or guess my internal number. So I seed based on the first person's number (OK they know!) but everyone else wont.

Edit: someone came up with a simpler solution: https://news.ycombinator.com/item?id=20315835

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

#73

...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.

> 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…

https://dilbert.com/strip/2001-10-25

Philosophically, no it is not possible, though neither can any natural phenomenon for which we reasonably rely on for randomness.

Practically I suppose your goal is just to generate numbers such that the next number cannot be predicted given only the previous numbers but also without considering any outside knowledge. Potentially possible. Potentially impossible to test. If you can beat the test, it probably just means your method beats that specific test

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

#74

> 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'.

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

#75

Am I missing something, or is this a textbook case of overfitting? It's a neat project, but at the bottom he prescribes what to do if the person says 1-3, or if they say 4 or 5, etc. Therefore, it's completely overfit to the Reddit data at the top.

I think the situation given is that you know the skewed input distribution.

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

#76

Am I missing something, or is this a textbook case of overfitting? It's a neat project, but at the bottom he prescribes what to do if the person says 1-3, or if they say 4 or 5, etc. Therefore, it's completely overfit to the Reddit data at the top.

Overfitting typically happens when the number of training samples is small compared to the number of parameters of the model. It especially happens when the input space is high-dimensional.

Here the input space has a only one dimension. The model has 10 parameters. There are 8500 samples. So, the author safely assumes that no over-fitting occurs.

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

#78
If you can widen the answers the people can give you could first determine the distribution of a larger width (i.e., pick a number from 1 to 100) then map those to the 1-10 distribution based on their frequency.

This is effectively the same as the person proposing sampling tuples.

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

#79

So you need access to a uniform RNG to implement this as it takes the human bias and multiplies by a factor and the RNG... so why not just use the uniform RNG?

You do not need access to a uniform RNG for this - he uses more humans to get the redistribution chance.
Post reply on HN