Probability
Programming solutions to problems in probability.
The following problems come from Fifty Challenging Problems in Probability by Frederick Mosteller.
- Successive Wins - Which of two series offers a better probability of a win?
- The Flippant Juror - Which jury has a better probability of making the correct decision?
- Trials Until First Success - On average, how many times must a die be thrown until one rolls a six?
- Chuck-a-Luck - What is the player's expected loss per unit stake in chuck-a-luck?
- Curing the Compulsive Gambler - Will a player be behind after 36 plays of one number in roulette?
- Craps - What is the player's chance to win at craps?
- Collecting Coupons - How many coupons do you have to collect to compete a set of 5?
- The Theater Row - How many matches in a random assortment of 15?
- Will Second-Best Be Runner-Up? - What is the probability that the 2nd-best player will be runner-up in a randomly seeded tournament?
- Twin Knights - What are the odds that twins will meet in a tournament?
- An Even Split at Coin Tossing - When 100 coins are tossed, what is the probability that exactly 50 are heads?
- Isaac Newton Helps Samuel Pepys - Which of three events is more likely when throwing dice?
- Lengths of Random Chords - If a chord is selected at random on a fixed circle, what is the probability that its length exceeds the radius of the circle?
- The Hurried Duelers - If duelists arrive at random times, what fraction of duels lead to violence?
- Catching the Cautious Counterfeiter - What is the probability of catching a counterfeiter?
- Gambler's Ruin - Under given conditions, what is the probability of player N winning?
- Bold Play vs. Cautious Play - Compare the merits of two gambling strategies.
- The Clumsy Chemist - What is the average length of randomly broken glass rods?
- The First Ace - How many cards are dealt from a shuffled deck before the first ace appears?
- The Little End of the Stick - What is the average length of the smaller piece of a randomly broken stick?
- The Broken Bar - What are the average sizes of all pieces of a bar randomly broken in three pieces?
- Average Number of Matches - What is the average number of matches between two decks of shuffled cards?
Miscellaneous
The following problems come from various other sources.
- All Aboard (From Futility Closet) - What’s the probability that the 100th passenger on an airlplane finds his seat occupied?
- Hit and Run (From Randomness by Deborah J. Bennet) - What is the probability that a cab involved in an accident was Blue rather than Green?
- Exceed 1 (From Mathematics Stack Exchange) - What's the expected value of the number of random numbers needed to exceed 1?
- Coin Flip Sequences - Which sequence will take longer on average when flipping a fair coin, HTH or HTT?
- Minority Selection - What is the probability that no member of a minority party will be selected out of N slots?
- The Petersburg Paradox - What would be a fair price to pay the casino for entering the game?
- Gummy Bears (From Data Science Renee on Twitter) - What is the probability of selecting 5 different flavors?
- Missiles - What is the probability that a target will be hit by any of four missiles?
- Quiz Answers - Generate a strategy for a quiz game.
- Infinite Monkeys - If infinite monkeys struck each of the 26 letters of a typewriter once, what is the probability that either name 'IAGO' or 'LEAR' would appear?
- Yahtzee - What is the probability of rolling five of a kind when rolling five six-sided dice three times?
- Lunch in the Park (From FiveThirtyEight) - What is the probability that two friends will meet for lunch?
- A Painting Puzzle (From FiveThirtyEight) - What is the expected number of turns to finish a game?
- A Dicey Question (From Mental Gymnastics: Recreational Mathematics Puzzles by Dick Hess) - Which is greater when rolling five dice, the probability of rolling exactly one six, or the probabilit of rolling no sixes?
- Bags of Marbles - In the specified game, what is the probability that a second marble is white?
- Theater Seats (From 7 friends are going to the cinema...) - Out of seven movie-goers, what is the probability that two friends won't sit together?
- Draw Two (From Patrick Honner on Twitter) - Two numbers are drawn from the integers 1-10. What's the expected value of their sum?