Live data from Hacker News

How to pick a random number from 1-10

torvaney.github.io

131–140 of 183 posts

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

#131
post #129
post #123

Earlier quoted context omitted.

Wouldn't putting "everyone in a numbered sequence unknown to them" require a random number, which we don't have?

> Wouldn't putting "everyone in a numbered sequence unknown to them" require a random number, which we don't have? Yes. The above answer just obfuscates the issue. Consider ten people overwhelmingly biased towards 7. The suggested approach in all likelihood gets you 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Then what? You're clearly not much closer to getting a single random number without a random way of picking one of them.

>You're clearly not much closer to getting a single random number without a random way of picking one of them.

That’s a characteristic of the original formulation of the question, not specifically in my solution. It’s implicit in the article that you can choose an arbitrary person in the room without bias.

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

#132
post #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.

But if you're playing a board game, don't you already have dice at hand?

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

#133

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

Think of a vegetable. I predict you think of a carrot.

Think of a number between 1 and 10. Multiply it by 9. Add the digits of that number. Subtract 5. Convert it to a letter using A = 1, B = 2, ...). Think of a country beginning with that letter. Take the second letter of the country. Think of an animal beginning with the new letter.

I predict you thought of (rot13) Ryrcunag.

Not exactly the same trick, and not guaranteed to work, but this one impressed me at a young age.

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

#134
post #123
post #121

Put everyone in a numbered sequence unknown to them. Add their chosen number to their sequence number, mod 10. This re-maps everyone’s choices so they actually have no idea what number they are actually choosing and efficiently redistributes the bias in their choices without massively complicated functions. It is also robust to changes in the distribution pattern. However it would only work well if you had at least 1…

Wouldn't putting "everyone in a numbered sequence unknown to them" require a random number, which we don't have?

The question assumes we have the normal faculties of humans. You can choose whatever non random criteria for ordering them you like as long as it doesn’t affect their number choice.

For example height, or age, or distance from the door to the room, or how much I like them, or where in the sequence I arbitrarily decide to put them in. As long as that does not a priori influence their number choice we’re good.

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

#135
post #101

Earlier quoted context omitted.

I'm not sure I understand. Humans aren't like weighted dice. For example, it's certainly conceivable that a few pairs of these humans misunderstand the goal such that they have a 0% chance of ever choosing numbers that change the respective ordering. Add to that the higher probability that many of these pairs of humans will just toggle their orders each round. Edit: clarification-- the humans don't even have to misun…

Maybe you don't even need to ask them to think of a number. The person whose name is sorted before the other person's name is person 1. And they compare their lengths instead of thinking of a number?

That gives you a single bit of entropy from those two people instead of a steady stream, though.

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

#137
post #131
post #129

Earlier quoted context omitted.

> Wouldn't putting "everyone in a numbered sequence unknown to them" require a random number, which we don't have? Yes. The above answer just obfuscates the issue. Consider ten people overwhelmingly biased towards 7. The suggested approach in all likelihood gets you 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Then what? You're clearly not much closer to getting a single random number without a random way of picking one of them.

>You're clearly not much closer to getting a single random number without a random way of picking one of them. That’s a characteristic of the original formulation of the question, not specifically in my solution. It’s implicit in the article that you can choose an arbitrary person in the room without bias.

It's a shortcoming specifically introduced by your proposal. If you've got a random way of picking one of ten people, then you've already got a random number between one and ten. Your answer essentially reduces to: ask one person to think of a number then add an actual random number and mod 10.

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

#138

Earlier quoted context omitted.

I'd love to see something written up about how quickly this converges, assuming the variables are i.i.d and distributed according to the distribution in the article.

Empirically, from running a quick script on the data in the article, it seems like you only need to sample 5 numbers to get a distribution that looks uniform using this "sum mod 10" method.

If you're going for empirical, why not ask for between 1 and a very large number? May as well extract as much entropy per person as possible for post-processing.

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

#139
post #84

Earlier quoted context omitted.

That is pretty arrogant to think that just because somebody posts here they have 10 digits of pi memorized. This is a public forum. Anybody can post. You and everybody else posting here are in all likelihood just average intelligence. There is nothing exclusive about using this forum. You aren’t the first or the last random person to exist here. Don’t let your own supposition of your intelligence get to your head. Th…

Memorizing digits of pi is easier than memorizing the algorithm in the article. 3.14159265, come on, stop making such a big deal of this.

I count only nine digits so it looks like you gatekept yourself out.

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

#140
post #71

Earlier quoted context omitted.

> ...or just add up the answers mod 10. This is how my board game groups pick the first player.

But if you're playing a board game, don't you already have dice at hand?

It depends which game, many do not use dice.
Post reply on HN