Lesson 10: Discrete and Continuous Simulation
November 11, 2026
Review:
- Exam 2
- Coin Toss and Dice Roll Simulation
Presentation:
- Random Variables
- Discrete Random Variables
- Probability distribution table
- Dice Simulation
- =RANDBETWEEN()
- Continuous Random Variables
- Stock Market simulation
- Assume normal distribution
- =norminv(rand(),$B$2,$B$3)
- Discrete Random Variables
Activity:
- Simulate Chuck-a-luck where the player rolls 3 dice
- Here are the rules
- Apply the following simplifying assumptions
- If sum of 3 dice >10, player wins the “Big” (1 to 1 odds)
- If the roll is three of a kind, player wins “Any Triple” (30 to 1 odds)
- All other outcomes, player loses the bet
- Will the “House” win money over time with these rules?
- Make some simplifying assumptions to illustrate.
- Stock Market Simulation in Sheets
- Use Annual Stock Market Return data as a starting point
- Generate a 40-year simulation (you’ll need to modify the automation script)
- Make a histogram of your ending balances
- Use the simulation to estimate the % likelihood of reaching $2M in retirement.
- Run 4 separate simulations with the following combinations.
- Starting balance = $2,000 and Annual contribution = $1,000
- Starting balance = $2,000 and Annual contribution = $5,000
- Starting balance = $10,000 and Annual contribution = $1,000
- Starting balance = $10,000 and Annual contribution = $5,000
- Run 4 separate simulations with the following combinations.
function CopyEndBalances() {
let spreadsheet = SpreadsheetApp.getActive();
let startRow = 2;
let numOfRows = 32;
let outputColumn = “H”;
let srcValue = “F31”;
for(let i = startRow; i < numOfRows; i++){
let cellRef = outputColumn + i;
spreadsheet.getRange(srcValue).copyTo(spreadsheet.getRange(cellRef), SpreadsheetApp.CopyPasteType.PASTE_VALUES, true);
SpreadsheetApp.flush();
}
};