Take a standard deck of cards, and pull out the numbered cards from one suit (the cards 2 through 10). Shuffle them, and then lay them face down in a row. Flip over the first card. Now guess whether the next card in the row is bigger or smaller. If you’re right, keep going. If you play this game optimally, what’s the probability that you can get to the end without making any mistakes? Extra credit: What if there were more cards — 2 through 20, or 2 through 100? How do your chances of getting to the end change?
R code is here. Starts with function to determine success in single 10 card trial (0 or 1), which comes out to ~ .17.
Use function to simulate repetitions of 10 card came, can be extended to many cards or repetitions. Probability of success rapidly drops to near zero with ~ 35 cards: