We simulate this experiment by generating a logical array of
length N, with 1 (true) for "heads" and 0 (false) for "tails".
The problem is to generate the right number of 1s and 0s, so that
the percentage of 1s is p (60
N=1000; // number of coin tosses
p=0.6; // bias: percentage of 1s in the array
Generate N observations from a uniform distribution on [0,1].
Threshold these observations at p. The resulting logical array
1 if an observation was < p,