**digital_dice**,
a MATLAB code which
contains the scripts used to illustrate Paul Nahin's "Digital Dice".

**digital_dice** is available in
a MATLAB version.

dueling_idiots, a MATLAB code which contains the scripts used to illustrate Paul Nahin's "Dueling Idiots".

will_you_be_alive, a MATLAB code which contains the scripts used to illustrate Paul Nahin's "Will You Be Alive 10 Years From Now?".

Paul Nahin,

Digital Dice: Computational Solutions to Practical Probability Problems,

Princeton, 2008,

ISBN: 978-0-691-15821-1.

- aandb.m, Parrondo's paradox;
- average.m, uses a Monte Carlo approach to estimate pi.
- boom.m, simulates the likelihood of a given number of sons in a family.
- broke.m, average number of flips til odd man out is lost.
- bus.m, estimates the waiting time, given that there are N bus lines.
- car.m, estimates probability I am my nearest neighbor's nearest neighbor.
- chess.m, compares two options for a chess tournament.
- committee.m, simulates the committee problem.
- deli.m, simulates the operation of a deli.
- dinner.m, simulates the dinner table label problem.
- dish.m, counts how often a single dishwasher breaks 4 out of 5 dishes.
- easywalk.m, exactly analyzes a walk from the corner of (M+1,M+1) to (1,1).
- election.m, models papal and imperial elections.
- estimate.m, estimates the number of runners in a marathon.
- fb.m, the forgetful burglar problem.
- floss.m, considers the dental floss problem.
- gameb.m, Game B of Parrondo's paradox.
- gs.m, the Gamow-Stern elevator problem.
- guess.m, estimates the average result of randomly guessing ranks of M items.
- jury.m, estimates the probability that an appeals court makes a mistake.
- kelvin.m, looks at Kelvin's fair results from a biased coin.
- malt.m, estimates the chances that Lil and Bill will meet at the malt shop.
- missing.m, simulates the missing senator problem.
- mono.m, computes the expected monotone length of a random sequence.
- obtuse.m, estimates the probability that a random triangle is obtuse.
- obtuse1.m, probability that three points in [0,1] define an obtuse triangle.
- offspring.m, randomly determines the number of sons born.
- optimal.m, simulates the dating problem.
- patrol.m, simulates the highway patrol car problem.
- pierror.m, estimates pi by counting random points in a square.
- rhs.m, histograms the random harmonic series.
- rolls.m, simulates the toilet paper problem.
- smoker.m, considers the two matchbook problem.
- smokerb.m, considers a second version of the two matchbook problem.
- spin.m, simulates a game involving two spinning disks.
- steve.m, Steve's elevator problem.
- stopping.m, analyzes an optimal stopping problem.
- sylvester_quadrilateral.m, estimates probability 4 random points form concave quadrilateral.
- test.m, simulates the result of guessing on a ranking test.
- umbrella.m, simulates the umbrella problem.
- walk.m, simulates a walk from the corner of (M+1,M+1) to (1,1).