Live data from Hacker News

How to pick a random number from 1-10

torvaney.github.io

141–150 of 183 posts

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

#141

Earlier quoted context omitted.

Parents algorithm always works, the one described has a massive failure mode - people slowly learn that they are likely to say 7 and self-censor by picking another number. Or maybe in a different culture the distribution changes (say China and the numbers 4, 8).

I would guess that in China the probabilities of 4 and 8 goes down. Asking people to pick randomly drives them away from special numbers.

In the US 7 is a lucky # and a statistical outlier in that it was more frequently chosen in the article above.

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

#142
It's not random if you're forcing it to be uniform. May as well skip the math and do this instead:

Divide all the people into groups of 10. Have the members of a group play each other at whatever, e.g. arm wrestling, to produce a rank from best to worst. Their rank becomes their answer.

Now everyone will reply with a number as close to uniform as the total number of people is divisible by the number of choices.

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

#143

Earlier quoted context omitted.

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

It works because there are remarkably few country names starting with D that don't start with DE. And everyone picks the same E.

Now try asking for an animal whose name starts with U.

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

#144

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

woah, I thought of seven too, before reading the article or the comments.

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

#145
post #95

Earlier quoted context omitted.

Wow, why aren’t students using laptops?

In college some students use laptops for taking notes. Not so much in high school. But in both during tests, electronics are strictly regulated to prevent cheating. Teachers know how to factory reset TI calculators. So, they and only they are allowed. Also, teachers know how to instruct how to use TI calculators. So, they are sometimes even required for certain classes.

Lol in Germany i was only ever allowed to use non-programmable calculators all the way through high school, college, university.

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

#146

Earlier quoted context omitted.

I would guess that in China the probabilities of 4 and 8 goes down. Asking people to pick randomly drives them away from special numbers.

In the US 7 is a lucky # and a statistical outlier in that it was more frequently chosen in the article above.

You might be right, but my guess is that 7's reputation for luck isn't famous enough to make a difference, and in fact it's common because other numbers seem too "unrandom".

We could test by asking people to pick numbers less than 100. I bet people would focus on odd numbers, especially those greater than 50, not ending in 5 or not having both digits the same.

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

#147
post #137
post #131

Earlier quoted context omitted.

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

From the article:

>The easy thing to do is to ask someone “Hey, pick a random number from 1 to 10!”. The person replies “7!”. Great! Now you have a number. However, you start to wonder, is the number uniformly random?

So the problem reduces to transforming one form of randomness (picking a person) to another form (a uniform numeric distribution. That's implicit in the whole rest of the article.

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

You've got a source of randomness, but you still need to turn that into a number. The article gives one method and I've given another. You could also assign the people numbers from a stack of shuffled numbered tiles, then pick a person although that requires you have the tiles which is not really part of the setup. The conceit is that you have to use people's ability to pick numbers pseudo-randomly. There are probably numerous ways.

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

#148
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?

Assuming you would put them in 10 buckets, that order wouldn't have to be random, as long as people have similar biases.

Actually the proposal in the article requires that the group's biases be stable and uniform, where mine doesn't.

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

#149
post #4

Or just use digits of pi; most people have at least 10 digits memorized, some have 20+ memorized. There's also a formula you can memorize for calculating the nth digit of pi, so you have infinite random numbers without memorizing an esoteric algorithm with a bazillion corner cases. That said, I still thought this was an interesting article and I loved the animated bar graphs.

I have found that 3.2 is a good enough approximation, with the added benefit of being perfectly representable as an integer (32) when scaled by 10, simplifying the math and optimizing the performance since floats are not necessary, just integer divide the result by 10

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

#150

Earlier quoted context omitted.

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.

Mod10, no matter how large the number you’re only keeping the last digit (assuming they choose base 10 numbers), which... is probably no more random than asking them for a single digit in the first place.
Post reply on HN