This Shiny web application provides both analytical and simulated solutions for famous probability problems. The app is designed for anyone interested in understanding and visualizing classic probability puzzles.
- Monty Hall: Classic problem on 3 doors - 2 goats and 1 car.
- Birthday: Demonstrates how the probability of two people sharing a birthday in a group is surprisingly high.
- Newton-Pepys: Probability problem concerning the probability of throwing sixes from a certain number of dice.
- St Petersburg: Paradox involving the game of flipping a coin where the expected payoff of the lottery game is infinite but nevertheless seems to be worth only a very small amount to the participants
- Montmort: Consider a well shuffled deck of n cards labeled 1 through n. You flip over the cards one by one, saying the numbers 1 through n as you do so. You win the game if, at some point, the number you say aloud is the same as the number on the number on the card being flipped over
To run this Shiny web application locally, follow the steps below:
- Install R and RStudio: If you haven't already, download and install R and RStudio.
- Install Shiny: Open RStudio and install the Shiny package by running the following command in your R console:
install.packages("shiny") - Clone the repo: Clone the repo and run the code!