Public
Edited
Sep 20, 2023
Paused
1 fork
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
trials = {
function trial() {
let streak = 0;
let flips = 0;
while (streak < STREAK) {
flips++;
if (Math.random() > 0.5) {
streak++;
} else {
streak = 0;
}
}
return flips;
}
const trials = new Uint32Array(TRIALS);
for (let i = 0; i < TRIALS; i++) {
trials[i] = trial();
}
return trials;
}
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