News for hackers. Stuff that matters.
Re:How to choose? by lutusp on Friday August 29, 2014 @03:14AM (#8241444)
> random 0 to 9 mod 4 does not have an even distribution over 0-4.

That's true, but only because 4 never appears in the result. The possible results for modulo 4 are 0 - 3.

The first child is numbered zero. Shall I explain it in more detail?

     n  n % 4
    -----------  	
     0  0
     1  1
     2  2
     3  3
     4  0
     5  1
     6  2
     7  3
     8  0
     9  1
    10  2
    11  3
    12  0
    13  1
    14  2
    15  3
> It's also more difficult to explain to children.

And rewarding, unless you want your children to grow up innumerate.

Re:How to choose? by valleyer on Friday August 29, 2014 @03:33AM (#8241481)
The last digit on the clock can only be 0 through 9. If you truncate your chart accordingly, 0 and 1 are represented more than 2 and 3. Or do you mean “the entire seconds value” (for which this idea would work with four children) instead of “the last digit”?
Re:How to choose? by lutusp on Friday August 29, 2014 @03:39AM (#8241496)
To avoid confusion, I used the expression "last digits".
Re:How to choose? by baddox on Friday August 29, 2014 @03:43AM (#8241505)
It actually doesn't matter how many options are in your random number generator. You only get a normal distribution if the number of children you have divides the number of options in your generator. Even if you're using the seconds of a clock, it doesn't work for 7 children.
Re:How to choose? by lutusp on Friday August 29, 2014 @03:47AM (#8241513)
> It actually doesn't matter how many options are in your random number generator.

It certainly does -- the larger the random number, the fairer the outcome is.

> Even if you're using the seconds of a clock, it doesn't work for 7 children.

For a digits range of 0 - 59? Plus the fallback in the face of a precocious child of adding the number of minutes * 60?

Re:How to choose? by aeosynth on Friday August 29, 2014 @03:26AM (#8241469)
if the stopwatch uses base 10, the last digit will be in the range [0, 9], making n >=10 irrelevant. in this range, 0 and 1 appear 3 times; 2 and 3 appear 2 times.

if the stopwatch uses hex, then 0-3 will appear equally often in this case

Re:How to choose? by lutusp on Friday August 29, 2014 @03:32AM (#8241478)
The second digits on my digital watches extend to 59, and if a precocious youngster were to correctly object that a limit of 59 produces a bias, I would extend the range by multiplying the minute digit by 60 and adding it to the seconds (thus reducing the bias). We are, after all, most likely using a calculator to produce the result.

> if the stopwatch uses hex ...

I think we're safely in the red herring zone now. :)

EDIT: Yes, of course -- when confronted by a correct and reasoned reply, downvote it to discourage any such mistakes in the future.

Re:How to choose? by aeosynth on Friday August 29, 2014 @03:36AM (#8241486)
i think you're confused on what a 'last digit' is. the seconds digits (plural) contain two digits, which range from 0-59; the last digit (singular) ranges from 0-9
Re:How to choose? by lutusp on Friday August 29, 2014 @04:10AM (#8241577)
> i think you're confused on what a 'last digit' is.

Digits, not digit, please, and do try to limit the anti-intellectualism and adversarial posture.