Probability simulations and computations using Matlab

The first rule of programming is, never write a program from scratch! Start with an existing program that does something close to what you want to do, and modify it until it does what you want. In order for this to work, you have to have access to some model programs.

Some simple probability experiments

ch1/prob.m

A Matlab notebook of probability demos

Here's the notebook itself:

demo/probdemos.m

Here's the resulting pdf output: demo/probdemos.pdf

Grinstead and Snell

Here are Matlab programs akin to the BASIC programs Grinstead and Snell discuss.

Chapter 1

CoinTosses

ch1/cointosses.m

DeMere1 and DeMere2

ch1/demere1.m

ch1/demere2.m

HTSimulation

ch1/htsim.m

Chapter 2

Monte Carlo evaluation of an integral

ch2/montecarlo.m

Bar graph for samples of a normal distribution

ch2/normaldensitybargraph.m

CDF of a normal random variable via simulation

ch2/normalcdf.m

Cantor's `Devil's Staircase' as a CDF

ch2/cantor.m

Throwing darts

ch2/dart.m

ch2/dartluck.m

ch2/dartsqrt.m



Peter G. Doyle 2012-03-29