Dislikedi found this searching in google : So cool , this is how to calculate the probality using Chrome : " Here's a way to get an approximation for the answer via a simulation. It's kinda fun to tweak the numbers and see the probability change. Run this in Tools -> Javascript Console in Chrome or Tools -> Web Developer -> Web Consolein FireFox: function experiment(streak, tosses) { var i, ctr = 0; for (i = 0; i < tosses; i++) { if (Math.random() < 0.5) ctr = 0; else if (++ctr === streak) return 1; } return 0; } function run(streak, tosses, runs) { var...Ignored
- #220
- Sep 28, 2015 5:44am Sep 28, 2015 5:44am
- Joined May 2009 | Status: Trader | 2,115 Posts
LUCKY golden trades, LUCKY gold investor trading style