Seeing the line you were using to generate those results:

Quote:
$!gettok(B I N G O G G O O B B B B O N G N B B O I O N G I B I N G O B O, $!rand(1,32), 32)


Firstly, "biased" is a very ambiguous term, for our purposes I assume you meant that in the context of probability distribution: as in expecting a continuous uniform distribution.

Code:
Given the following string:

B I N G O G G O O B B B B O N G N B B O I O N G I B I N G O B O

We have:

B = 9
I = 4
N = 5
G = 6
O = 8
-------
+ = 32

Expected distribution (given a LARGE ENOUGH sample):

B = 9/32 = 28.125% 
I = 4/32 = 12.5%
N = 5/32 = 15.625%
G = 6/32 = 18.75%
O = 8/32 = 25%


Code:
alias rand_demo {

  ; large enough to make sense of the randomness distribution
  var %x = 1000000

  var %total = %x
  var %b = 0, %i = 0, %n = 0, %g = 0, %o = 0

  while (%x) {
    inc % $+ $exp
    dec %x 
  }

  echo -a B = %b / %total =  $calc(%b / %total * 100)
  echo -a I = %i / %total =  $calc(%i / %total * 100)
  echo -a N = %n / %total =  $calc(%n / %total * 100)
  echo -a G = %g / %total =  $calc(%g / %total * 100)
  echo -a O = %o / %total =  $calc(%o / %total * 100)
}

alias -l exp return $gettok(B I N G O G G O O B B B B O N G N B B O I O N G I B I N G O B O, $rand(1,32), 32)


With 1 million samples, here is my results:

Code:
B = 281972 / 1000000 = 28.1972
I = 125320 / 1000000 = 12.532
N = 156013 / 1000000 = 15.6013
G = 186661 / 1000000 = 18.6661
O = 250034 / 1000000 = 25.0034


Compare to the expected:

Code:
28.1972/28.125 = 100.256711%
12.532/12.5 = 100.256%
15.6013/15.625 = 99.84832%
18.6661/18.75 = 99.552533%
25.0034/25 = 100.0136%


99.55 - 100.25 is perfectly fine. The results are as expected. Of course if you increase the sample even further, you should see the numbers converging at 100%.

Last edited by Wiz126; 27/05/13 08:05 PM.