This is just a simple collection of simulations of various interesting probelms discussed by Joseph Blitzstein in Statistics110@havard.
I think I needed these programs because although I understood the mathematics behind the solutions but I couldn't just convince myself with proofs alone, thus I took the simulation way.
-
Birthday Problem
-
Monty Hall Problem
- This is a generic version of the monty hall problem, You can run it in C++ compiler of your choice
-
Expectation of a Geometric Distribution
- Run on c++ compiler of your choice
- The program assumes a random value of probability of success of a single trial and then carries out multiple simulationson it.
-
Expected number of local maximas (Taken from putnam competition)
- Run putnam.cpp on a c++ compiler of your choice
- The program uses the random_shuffle function of c++ to produce multiple permutations of a vector and count the number of expectations.
- When asked by the prompt: keep n<1000000 if you want to run 100 simulations in a time limit that doesn't test your patience.