Simulating The Binomial Theorem in Python, Flipping a Coin

Опубликовано: 13 Январь 2018
на канале: Jeffrey James
6,162
53

https://gist.github.com/jrjames83/2b9...

Getting 10 heads or tails in a row should occur 1 out of 1024 times.

we know that since the odds of it happening are .50 ^ 10 and if you divide 1 by that value you get 1024.

To verify this, we simulate 1024 tosses of a fair coin, then use python itertools groupby and the collections module's Counter class to see how many concurrent heads or tails we generated through our simulations.


На этой странице сайта вы можете посмотреть видео онлайн Simulating The Binomial Theorem in Python, Flipping a Coin длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Jeffrey James 13 Январь 2018, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 6,162 раз и оно понравилось 53 зрителям. Приятного просмотра!