Public
Edited
May 13, 2023
Paused
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more