How long do you need to flip a coin to see a streak?

October 25, 2017
By

(This article was first published on R – Decision Science News, and kindly contributed to R-bloggers)

STREAK RESULTS FOR LIKELY (>50%) and HIGHLY LIKELY (>99%)


Click to enlarge

From research on the hot hand to the observation that people don’t create enough streaks when instructed to create pseudo random data, the decision science community is pretty interested in the perception of streaks.

One day we got to wonder, how long would you have to flip a coin for it to be more likely than not you would see a streak of length 10? And in this thought experiment, we mean a fair coin and that the streak could be one of heads or one of tails, and finally that more likely than not means greater than 50% likely.

We found a nice Markov chain solution to the problem and figured out the answer for streaks from length 2 to 16. The above graph has the first 10. The answer is that you need to flip 712 times to exceed a 50% chance of observing a streak of length 10.

Next we wanted to see how the number of flips would grow if we wanted to be highly likely of seeing a streak, where highly likely means greater than 99%.


Click to enlarge

Lastly, we took the results out to 16 flips and plotted the result on a log axis.


Click to enlarge

Here’s R code to mess around with. The Markov chain but could be sped up a lot by starting the search closer to the likely crossover point.

The post How long do you need to flip a coin to see a streak? appeared first on Decision Science News.

To leave a comment for the author, please follow the link and comment on their blog: R – Decision Science News.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)