|
|
|
|
|
by ekosz
2269 days ago
|
|
You can try it yourself without any of the math with just a little bit of programming. function calc30(odds) {
for (let i = 0; i < 30; i++) {
if (Math.random() < odds) return true;
}
return false;
}
Array.from(Array(10000)).map(() => calc30(0.04)).filter(Boolean).length //=> 7022 or ~70%
Array.from(Array(10000)).map(() => calc30(0.02)).filter(Boolean).length //=> 4545 or ~45%
|
|