trials = {
function trial() {
const proportions = new Float32Array(N_PICKS);
let red = 1;
let blue = 1;
for (let i = 0; i < N_PICKS; i++) {
Math.random() < red / (red + blue) ? red++ : blue++;
proportions[i] = red / (red + blue);
}
return proportions;
}
const trials = new Array(N_TRIALS);
for (let i = 0; i < N_TRIALS; i++) {
trials[i] = trial();
}
return trials;
}