Live data from Hacker News

How to pick a random number from 1-10

torvaney.github.io

171–180 of 183 posts

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

#171

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…

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

Aren't there algorithms which reliably beat humans at rock paper scissors?

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

#172

Earlier quoted context omitted.

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.

Don't do mod 10, sum the digits.

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

#173

Maybe an easier solution would be to append all the answers, take a hash (e.g. sha1), then convert the last 2 digits from hex to decimal, and mod 10. 1 liner. -- EDIT: I lied, this doesn't work, it biases towards 1-5. I guess you could convert to decimal, and divide by (FFFFFFFFFFFFF / 10)

"But, let’s say you have to do this without access to coins, computers, radioactive material, or other such access to traditional (pseudo) random number generators. All you have is a room of people." Can you do a SHA1 in your head?

Not quite in his head, but Ken Shirriff did SHA-256 with pencil and paper:

http://www.righto.com/2014/09/mining-bitcoin-with-pencil-and...

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

#174
post #62

Earlier quoted context omitted.

how so? if you ask me for a number from 1-10 and I use my watch, how do you have any predictive information? Even if you looked at your watch there is no reason it should have the same seconds value as mine. Obviously this is not really something you could automate and if you were to use a clock on an ongoing basis you might be able to predict likely numbers, but that was not in the original scenario.

Ah but there is a reason for my watch to have the same seconds value as yours, and that is if our watches are kept synchronized to an accurate time source, for ex. via NTP. By assuming otherwise you're sidestepping the problem by claiming you already have a reliable RNG. Heck, even granted you have an unsynchronized watch, your "random" numbers are easy to predict, I'll ask you for a random number once per second and…

This is an example of a precise analysis that is unhelpful because it is irrelevant in the contexts in which the algorithm would be used. It's like saying "all algorithms are constant time-complexity in practice because computers are finite". True but useless.

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

#175

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.

This doesn't exclude overfitting. You can take samples n much larger than parameters p in, for example, a political or household earnings survey performed in the San Francisco Bay Area, but obviously one cannot safely assume no overfitting occurs in that scenario.

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

#176

Earlier quoted context omitted.

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

Aren't there algorithms which reliably beat humans at rock paper scissors?

There are algorithms that beat most humans, because humans don’t play randomly. Conversely there are humans that can beat the human-beating algorithms reliably because the algorithms don’t play randomly either.

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

#177
The interesting part is the recursive application of the algorithm. I'm wondering why it isn't applied fully recursively but only up to one step. Surely, if the algorithm can generate a uniform probability distribution, it can also generate an arbitrary probability distribution, so why not use that arbitrary probability distribution in order to generate the uniform probability distribution?

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

#178
post #91

Or have them give the last digit of the age of their oldest living family member.

Due to the distribution of people's age towards the "old" end of the scale, I'd guess that this is more likely to be 0 than 9?

Yeah, I'm curious to look at data, but I think this will be skewed towards lower digits.

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

#179

> 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 tried that once with 2 friends, I asked them to think of a number between 1 and 10 and I then asked if it was 7 and they both were amazed :).

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

#180
post #62

Earlier quoted context omitted.

how so? if you ask me for a number from 1-10 and I use my watch, how do you have any predictive information? Even if you looked at your watch there is no reason it should have the same seconds value as mine. Obviously this is not really something you could automate and if you were to use a clock on an ongoing basis you might be able to predict likely numbers, but that was not in the original scenario.

Ah but there is a reason for my watch to have the same seconds value as yours, and that is if our watches are kept synchronized to an accurate time source, for ex. via NTP. By assuming otherwise you're sidestepping the problem by claiming you already have a reliable RNG. Heck, even granted you have an unsynchronized watch, your "random" numbers are easy to predict, I'll ask you for a random number once per second and…

> I'll ask you for a random number once per second and after a few answers I don't need to ask any more to know your answer.

You know that we aren't computers right? We don't need any fancy software to detect that kind of attack.

Post reply on HN