This one-liner shows that if you use rand() < 0.5 to decide between locations -- even if the rand calls are in different invocations of perl -- the distribution will be fairly split:
perl -E"{++$t;$r=`perl -E\"say rand()\"`;$r<.5?++$a:++$b; printf qq[\r +%.3f : %.3f], $a*100/$t, $b*100/$t; redo}" 49.350 : 50.650
In reply to Re: Send x% of the users to A, the rest to B
by BrowserUk
in thread Send x% of the users to A, the rest to B
by DreamT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |